Answered

Raspberry PI NAS with SONOS - configuration issues - HELP!!!!

  • 10 April 2018
  • 8 replies
  • 1595 views

Userlevel 2
Badge +3
Background:
I'm trying to setup a Raspberry PI NAS to work with SONOS. However, I am hitting a few issues and could do with some assistance.

Problem:
-The path to the share is correct.
- Can be seen on the network and connected to by my mac.
- While trying to add a share I get 'Access to the shared folder "NAS share //IP-OF-PI/share" is denied - check the username and/or password'

Parameters:
- Raspberry PI 3B running Raspian
- 2TB USB hard drive formatted as FAT 32 with existing media on it.
- All required ports open.
- All devices on the same subnet as the PI NAS.

Potential causes:
- Issues with preexisting FAT 32 volumes being managed by the PI
- Issues with SMB v1
- Issues with smb.conf (below)

[global]
workgroup = SIMPLE

[share]
comment = Share for mounted HDD
path = /mnt/share/
read only = No
guest only = Yes
guest ok = Yes
public = Yes
writeable = Yes
browsable = Yes
create mask = 0777
directory mask = 0777

Requests:
- A working smb.conf file used on a Pi NAS thats successfully connecting to SONOS.
icon

Best answer by Stanley_4 10 April 2018, 22:28

The whole file is kind of big and most sections don't apply but here are the changes to the default Raspberry Pi file. Without enabling SMB v1 with the "ntlm auth" option pwt mentioned above nothing will work with Sonos.

[global]
# enable v1 authentication for Sonos access
ntlm auth=yes

[music]
Comment = Pi shared folder
Path = /mnt/ssd-music
Browseable = yes
Writeable = Yes
only guest = no
create mask = 0555
directory mask = 0555
Public = yes
Guest ok = yes

Only other change I made to the default PI setup was a permanent mount for the SSD instead of letting the auto-mounter deal with it as that can become confused when other devices are added or removed from the Pi. I used the UUID mounting option and had a problem getting the right UUID which is wat the # commented notes are for. The /dev/sda1 permanent mount also works but again can become confused if you add devices to the Pi.

#/dev/sda1 /mnt/ssd-music xfs defaults,auto,users,rw 0 0
#PARTUUID="54285699-bf0c-4f92-b846-082114177b6b" is the whole drive
#PARTUUID="d450bd65-603d-4e13-8b32-41ed9ea3e354" is sda1
PARTUUID="d450bd65-603d-4e13-8b32-41ed9ea3e354" /mnt/ssd-music xfs defaults,auto,users,rw 0 0
# If UID mount fails this will work until you can fix it
#/dev/sda1 /mnt/ssd-music xfs defaults,auto,users,rw 0 0
View original

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.

8 replies

Userlevel 7
Badge +20
You don't mention what versions of Raspbian/Samba you are running, but try adding the following to the [global] section:
ntlm auth=yes

Then reboot, or restart Samba. This enables SMB v1.
Userlevel 7
Badge +21
The whole file is kind of big and most sections don't apply but here are the changes to the default Raspberry Pi file. Without enabling SMB v1 with the "ntlm auth" option pwt mentioned above nothing will work with Sonos.

[global]
# enable v1 authentication for Sonos access
ntlm auth=yes

[music]
Comment = Pi shared folder
Path = /mnt/ssd-music
Browseable = yes
Writeable = Yes
only guest = no
create mask = 0555
directory mask = 0555
Public = yes
Guest ok = yes

Only other change I made to the default PI setup was a permanent mount for the SSD instead of letting the auto-mounter deal with it as that can become confused when other devices are added or removed from the Pi. I used the UUID mounting option and had a problem getting the right UUID which is wat the # commented notes are for. The /dev/sda1 permanent mount also works but again can become confused if you add devices to the Pi.

#/dev/sda1 /mnt/ssd-music xfs defaults,auto,users,rw 0 0
#PARTUUID="54285699-bf0c-4f92-b846-082114177b6b" is the whole drive
#PARTUUID="d450bd65-603d-4e13-8b32-41ed9ea3e354" is sda1
PARTUUID="d450bd65-603d-4e13-8b32-41ed9ea3e354" /mnt/ssd-music xfs defaults,auto,users,rw 0 0
# If UID mount fails this will work until you can fix it
#/dev/sda1 /mnt/ssd-music xfs defaults,auto,users,rw 0 0
Userlevel 2
Badge +3
@pwt and @Stanley_4 worked like a charm gentlemen. I am in your debt. My wife can now play her Rachmaninoff FLAC files anywhere she wishes. Thank you very much for your help.

As you both said the missing element was:

[global] section:
ntlm auth=yes

For those of you wanting to do the same here is my working smb.conf file:

[global]
workgroup = SIMPLE
ntlm auth=yes
[share]
comment = Share for mounted HDD
path = /mnt/share/
read only = No
guest only = Yes
guest ok = Yes
public = Yes
writeable = Yes
browsable = Yes
create mask = 0777
directory mask = 0777
I am sill having issues getting it to connect. I though I would post my smb.conf file. Can anyone see what I am doing wrong? I can see it on Windows 10 perfectly.

[global]
workgroup = WORKGROUP
dns proxy = no
ntlm auth=yes

####### Authentication #######
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user


############ Misc ############
usershare allow guests = yes

#======================= Share Definitions =======================
read only = no
create mask = 0700
directory mask = 0700
valid users = %S

[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no

[nas]
comment = NAS Folder
path = /media/NASHDD1
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
read only = no
guest ok = yes
guest only = Yes
writeable = Yes
browsable = Yes
Userlevel 7
Badge +21
Way too much stuff in that conf file, cut out all the optional stuff that may well be the source of your problem, it should look more like h1lt0n's to get started. I'll put my full conf file below, some lines may be optional but it works with my Sonos. I don't know if it works with Win 10 or not and I don't have one handy to test.

Your path=/media/NASHDD1 looks like it might be a relic of the auto-mounter that is not to be trusted for shared drives. Put in a hard mount (/etc/fstab) that puts the drive in a sub directory of the /mnt directory.

============================
[global]
ntlm auth=yes

# disable printing support and stop logging failure
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes

passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user

[homes]
comment = Home Directories
browseable = no
read only = yes
create mask = 0700
directory mask = 0700
valid users = %S

[music]
Comment = Pi shared folder
Path = /mnt/ssd-music
Browseable = yes
Writeable = Yes
only guest = no
create mask = 0555
directory mask = 0555
Public = yes
Guest ok = yes
=========================================
Here is my stab file. Does this explain the path=/media/NASHDD1 line?
proc /proc proc defaults 0 0
/dev/mmcblk0p6 /boot vfat defaults 0 2
/dev/mmcblk0p7 / ext4 defaults,noatime 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
/dev/sda1 /media/NASHDD1 auto gid=Music,uid=Music,noatime 0 0
Userlevel 7
Badge +21
That looks like you just reused the /media mount point that the auto-mounter uses rather than using the more usual /mnt. I try to avoid directories like /media that are used by the operating system tools but it should work as long as the auto mounting tool doesn't interfere.

the /dev/sda1 is subject to failure if the drive location is changed by adding another USB device. The UUID mounting method is the most stable and error-proof.

You are also using a file system type of auto, possibly inherited from the auto-mounter. Again that should work but using an actual file system type there would be less prone to future problems.

All of these should work so they probably aren't the source of your current visibility to Sonos issue. I'd concentrate on the SMB v1 issue for now and save these tweaks for later if you decide to do them.
That did it! Yes! You made my week! Thank you so much.