Cannot connect my Raspberry Pi to my Sonos speakers


Please help!

The Problem: I am trying to add a new share to my iPad Sonos application, but cannot get it to link to my raspberry pi to play music.

I have loaded SMB via My OSMC and can play music from the Pi on my PC via my wired network.
Also, I have FileBrowser on my iPad and can play music from the raspberry on this too.
I have enabled UPnP on the Pi and my Sonos speakers are recognised in the Add Music browser

The Pi is called 'mediacenter', the HDD My Book and the file 'Music'.
I thought the path should be: \\mediacenter\My Book\Music, but this and every conceivable combination doesn't work, (with or without a space between My Book). I have tried using passwords, osmc/osmc & pi/raspberry and also using the Pi's IP Address.

I have tried every conceivable combination - what am I doing wrong!!

The equipment: Raspberry Pi Model 3 B+, (running a new install of OSMC), My Book HDD, (not my Cloud) connected via USB directly to the Pi

This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

14 replies

No need for UPnP on the Pi, Sonos doesn't need it and it will just be using CPU cycles. You do need to enable SMB v1, at least until Sonos upgrades their units to support SMB v2 or above.
Hi jgatie, thank you for the quick reply.
I have turned UPnP off and I had already installed Samba, which is version 1.2.2 - I assume it is the installation of this which allows me to use these files on the PC and iPad. Unfortunately, I still cannot listen on my Sonos speakers
Probably time for direct contact to Sonos support, either by phone or email.
Userlevel 7
Badge +21
Did you enable SMB v1, can't tell from your answer above. If you didn't enable it your Pi will refuse to takl to your Sonos.

In your /etc/samba/smb.conf file:
[global]
ntlm auth=yes
Hi Stanley_4
Yes SMB v 1.2.2 is installed.
I can play the Raspberry Pi files on my PC with no problem, so I assume the network is fine, (however, I am no expert!)
Thanks
Ian
Userlevel 7
Badge +21
It does not mater what version of SMB you have installed! That is not the v1 we are talking about.

What matters is if you have enabled SMB v1 / "ntlm auth" in the SMB program of whatever version you are using.

Step by step:

Open a terminal window on your PI to edit the file and restart the daemon.

Type: cd /etc/samba
Press Enter
Type: sudo nano smb.conf
Press Enter
Scroll down to the [global] section
On a blank line in that section type: ntlm auth=yes
Press: CTRL-o
Press Enter
Press CTRL-x

Next restart your smbd, the Samba / SMB daemon.
Type: service smbd restart
Press Enter

Once it restarts you should be able to connect.
Hi Stanley_4
Thank you so much for your assistance.
Following your instruction I have looked in 'global and cannot find ntlm auth=yes anywhere.
Completing your instructions, I cannot restart smbd. I am asked for a password, (I tried OSMC) and AUTHENTIFICATION FAILED Failed to restart smbd.service: Access Denied
However, I do feel we are making progress!
Userlevel 7
Badge +21
You are not finding the "ntlm auth=yes" in the [global] section because it is not part of the default SMB setup, you need to open a blank line, add it and save the edited file before restarting the daemon.

Try changing the restart command to include a sudo and it may allow you to do it:

sudo service smbd restart

If that doesn't work rebooting the Pi will also force the daemon to restart.
Thank you so much, great help !!!
Hi Stanley_4
Thank you so very much, after two weeks of pain, everything now works!!
Ian
It does not mater what version of SMB you have installed! That is not the v1 we are talking about.

What matters is if you have enabled SMB v1 / "ntlm auth" in the SMB program of whatever version you are using.

Step by step:

Open a terminal window on your PI to edit the file and restart the daemon.

Type: cd /etc/samba
Press Enter
Type: sudo nano smb.conf
Press Enter
Scroll down to the [global] section
On a blank line in that section type: ntlm auth=yes
Press: CTRL-o
Press Enter
Press CTRL-x

Next restart your smbd, the Samba / SMB daemon.
Type: service smbd restart
Press Enter

Once it restarts you should be able to connect.
Thank you. You solved my problem with ntlm=yes. I spent hours trying to get sonos to work before I found your post.
I added the line but so far no luck. Now Win 10 isn’t seeing it on the network either but I connect to it. I am on week 3 of getting this to work.
Userlevel 7
Badge +21
Have you done each step here: https://www.raspberrypi.org/magpi/samba-file-server

Normally once SAMBA is installed and the Pi rebooted it is visible and can be connected to by Windows and other SMB using systems with no configuration aside from the [music] block. https://en.community.sonos.com/troubleshooting-228999/raspberry-pi-nas-with-sonos-configuration-issues-help-6805556#post16224521

You don't need the 'ntlm auth=yes' for that, only for allowing access by legacy systems like Sonos.