SAMBA not working for Sonos | Core 152

Hello

I upgraded to Core 152 this morning and now I can’t access the Samba share from my SONOS system from my router. Before the update it worked fine but now it just doesn’t work anymore. I need support because otherwise my kids will dance on my head because the audio books were on the share :laughing:

[Audio-Share]
path = /var/AudioDaten
comment = Share
browseable = yes
writeable = yes
create mask = 7777
directory mask = 7777
public = no
guest ok = no
write list = share-rw

maybe the smbversion is the problem please have a look @

and

maybe

too.

Cheers DJ

You can enable SMBv1 at your own risk. (It’s really dangerous)

echo "server min protocol = NT1" >> /var/ipfire/samba/smb.conf.local

and after this go to webif and save the settings again.

(I have edited a typo!)

The access via Windows works against it.
SMBv3

I agree with Arne. Just my 2 cents, i would not use any devices whitch not support smb2 or higher. I have only googled the matter informally.

Blockquote
The access via Windows works against it.
SMBv3

hm ok what does the log say about this?

Did you try disabling encryption?

Under absolutely no circumstances enable SMBv1. You can simply throw your whole system away then.

I would also recommend writing a strongly worded letter to Sonos. SMBv1 is deprecated for the best part of a decade and SMBv2 is thirteen years old. They are not selling great software at Sonos it seems.

1 Like

Hello Arne,

with the parameiter “min server protocol = NT1” it unfortunately did not work and the encryption to deactivate is not offered.

sorry. My fault. The parameter is “server min protocol = NT1”

If i do this new file is created in /var/ipfire/samba/ smb.conf.local
Inside is deformed text “server min protocol = NT1”
Is this normal?

No. cut and paste seems not working correctly with the " charakters.
the file should contain only
server min protocol = NT1
and a line feed.

With this NT1 everything is working. I known this is security issue. Only one win7 was unable to connect. Tried everything. So in despair i write username in password and password in username and it is working. Strange.

Even with the line “server min protocol = NT1” the access via SONOS does not work.
With the vCore 151 it still worked and SMB2 was still enabled, right? Was SMBv1 still active until Core 151?

I also have SMB1 support active since my old NAS from Synology can’t support any other protocol.

SMB1_Win10

Testrouter: \10.10.1.250\Audio-Share

Have you saved the WebIF page after creating the smb.conf.local ?

Yes I have saved this and the line appears in the configuration. Enclosed are my configuration files.

# File: smb.conf.local

server min protocol = NT1



---------------------------------------
---------------------------------------

# File: smb.conf


[global]
server string = Samba on IPFire

workgroup = group.dom
realm = group.dom
passdb backend = smbpasswd

map to guest = Bad User

guest account = samba
unix password sync = no

bind interfaces only = true
interfaces = green0 blue0 127.0.0.0/8
remote announce = 
remote browse sync = 

winbind separator = +
winbind uid = 10000-20000
winbind gid = 10000-20000
winbind use default domain = yes

##### Log to syslog
logging = syslog

##### Enable support for Apple
vfs objects = catia fruit streams_xattr recycle

##### Enable following symlinks
wide links = yes

server role = standalone
server min protocol = NT1

##### Export all printers
[printers]
path = /var/spool/samba/
printable = yes

[Audio-Share]
path = /var/AudioDaten
comment = Share
browseable = yes
writeable = yes
create mask = 7777
directory mask = 7777
public = no
guest ok = no
write list = share-rw



---------------------------------------
---------------------------------------

# File: shares

[Audio-Share]
path = /var/AudioDaten
comment = Share
browseable = yes
writeable = yes
create mask = 7777
directory mask = 7777
public = no
guest ok = no
write list = share-rw



---------------------------------------
---------------------------------------

# File:  smb.conf.default

#####======================= Global Settings =====================================
[global]

##### workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
   workgroup = MYGROUP

##### server string is the equivalent of the NT Description field
   server string = Samba Server

##### Server role. Defines in which mode Samba will operate. Possible
##### values are "standalone server", "member server", "classic primary
##### domain controller", "classic backup domain controller", "active
##### directory domain controller".
#####
##### Most people will want "standalone server" or "member server".
##### Running as "active directory domain controller" will require first
##### running "samba-tool domain provision" to wipe databases and create a
##### new domain.
   server role = standalone server

##### This option is important for security. It allows you to restrict
##### connections to machines which are on your local network. The
##### following example restricts access to two C class networks and
##### the "loopback" interface. For more examples of the syntax see
##### the smb.conf man page
;   hosts allow = 192.168.1. 192.168.2. 127.

##### Uncomment this if you want a guest account, you must add this to /etc/passwd
##### otherwise the user "nobody" is used
;  guest account = pcguest

##### this tells Samba to use a separate log file for each machine
##### that connects
   log file = /usr/local/samba/var/log.%m

##### Put a capping on the size of the log files (in Kb).
   max log size = 50

##### Specifies the Kerberos or Active Directory realm the host is part of
;   realm = MY_REALM

##### Backend to store user information in. New installations should 
##### use either tdbsam or ldapsam. smbpasswd is available for backwards 
##### compatibility. tdbsam requires no further configuration.
;   passdb backend = tdbsam

##### Using the following line enables you to customise your configuration
##### on a per machine basis. The %m gets replaced with the netbios name
##### of the machine that is connecting.
##### Note: Consider carefully the location in the configuration file of
#####       this line.  The included file is read at that point.
;   include = /usr/local/samba/lib/smb.conf.%m

##### Configure Samba to use multiple interfaces
##### If you have multiple network interfaces then you must list them
##### here. See the man page for details.
;   interfaces = 192.168.12.2/24 192.168.13.2/24 

##### Where to store roving profiles (only for Win95 and WinNT)
#####        %L substitutes for this servers netbios name, %U is username
#####        You must uncomment the [Profiles] share below
;   logon path = \\%L\Profiles\%U

##### Windows Internet Name Serving Support Section:
##### WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
;   wins support = yes

##### WINS Server - Tells the NMBD components of Samba to be a WINS Client
#####	Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = w.x.y.z

##### WINS Proxy - Tells Samba to answer name resolution queries on
##### behalf of a non WINS capable client, for this to work there must be
##### at least one	WINS Server on the network. The default is NO.
;   wins proxy = yes

##### DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
##### via DNS nslookups. The default is NO.
   dns proxy = no 

##### These scripts are used on a domain controller or stand-alone 
##### machine to add or delete corresponding unix accounts
;  add user script = /usr/sbin/useradd %u
;  add group script = /usr/sbin/groupadd %g
;  add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
;  delete user script = /usr/sbin/userdel %u
;  delete user from group script = /usr/sbin/deluser %u %g
;  delete group script = /usr/sbin/groupdel %g


#####============================ Share Definitions ==============================
[homes]
   comment = Home Directories
   browseable = no
   writable = yes

##### Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
;   comment = Network Logon Service
;   path = /usr/local/samba/lib/netlogon
;   guest ok = yes
;   writable = no
;   share modes = no


##### Un-comment the following to provide a specific roving profile share
##### the default is to use the user's home directory
;[Profiles]
;    path = /usr/local/samba/profiles
;    browseable = no
;    guest ok = yes


##### NOTE: If you have a BSD-style print system there is no need to 
##### specifically define each individual printer
[printers]
   comment = All Printers
   path = /usr/spool/samba
   browseable = no
##### Set public = yes to allow user 'guest account' to print
   guest ok = no
   writable = no
   printable = yes

##### This one is useful for people to share files
;[tmp]
;   comment = Temporary file space
;   path = /tmp
;   read only = no
;   public = yes

##### A publicly accessible directory, but read only, except for people in
##### the "staff" group
;[public]
;   comment = Public Stuff
;   path = /home/samba
;   public = yes
;   writable = no
;   printable = no
;   write list = @staff

##### Other examples. 
#####
##### A private printer, usable only by fred. Spool data will be placed in fred's
##### home directory. Note that fred must have write access to the spool directory,
##### wherever it is.
;[fredsprn]
;   comment = Fred's Printer
;   valid users = fred
;   path = /homes/fred
;   printer = freds_printer
;   public = no
;   writable = no
;   printable = yes

##### A private directory, usable only by fred. Note that fred requires write
##### access to the directory.
;[fredsdir]
;   comment = Fred's Service
;   path = /usr/somewhere/private
;   valid users = fred
;   public = no
;   writable = yes
;   printable = no

##### a service which has a different directory for each machine that connects
##### this allows you to tailor configurations to incoming machines. You could
##### also use the %U option to tailor it by user name.
##### The %m gets replaced with the machine name that is connecting.
;[pchome]
;  comment = PC Directories
;  path = /usr/pc/%m
;  public = no
;  writable = yes

##### A publicly accessible directory, read/write to all users. Note that all files
##### created in the directory by users will be owned by the default user, so
##### any user with access can delete any other user's files. Obviously this
##### directory must be writable by the default user. Another user could of course
##### be specified, in which case all files would be owned by that user instead.
;[public]
;   path = /usr/somewhere/else/public
;   public = yes
;   only guest = yes
;   writable = yes
;   printable = no

##### The following two entries demonstrate how to share a directory so that two
##### users can place files there that will be owned by the specific users. In this
##### setup, the directory should be writable by both users and should have the
##### sticky bit set on it to prevent abuse. Obviously this could be extended to
##### as many users as required.
;[myshare]
;   comment = Mary's and Fred's stuff
;   path = /usr/somewhere/shared
;   valid users = mary fred
;   public = no
;   writable = yes
;   printable = no
;   create mask = 0765




---------------------------------------
---------------------------------------

# File: settings

LOCALMASTER=off
WINSSRV=
UNIXEXTENSION=off
GUESTACCOUNT=samba
NETBIOSNAME=IPFire
BLUE=off
MAPTOGUEST='Bad User'
ROLE=standalone
GREEN=on
LOADPRINTERS=Yes
SYSLOGONLY=on
DOSCHARSET=CP850
WORKGRP=group.dom
ENCRYPTION=optional
REMOTESYNC=
DOMAINMASTER=off
UNIXCHARSET=UTF8
SRVSTRING='Samba router'
SYSLOGLEVEL=1
PRINTCAPNAME=cups
LOGLEVEL='3 passdb:5 auth:5 winbind:2'
PREFERREDMASTER=off
DISPLAYCHARSET=CP850
PASSWORDSYNC=off
WIDELINKS=on
OSLEVEL=33
OTHERINTERFACES=127.0.0.1
WINSSUPPORT=on
REMOTEANNOUNCE=
PRINTING=cups
SMB2=on
ORANGE=off
VPN=off
INTERFACES=' green0 127.0.0.1'
SOCKETOPTIONS='TCP_NODELAY SO_RCVBUF=819200 SO_SNDBUF=819200 SO_KEEPALIVE'

Only 1 of 5 users was working. Uninstalled and installed samba and all dependencies and now SMB Daemon is not starting. How to start daemon?
Reboot is not helping.

[root@ipfire ~]# smbd -F -S
smbd version 4.13.1 started.
Copyright Andrew Tridgell and the Samba Team 1992-2020
exit_daemon: daemon failed to start: Failed to create session, error code 1

Sound like smbd is still running or a zombie process. Try

/etc/init.d/samba stop
and
/etc/init.d/samba start

This is normal. You cannot run smbd -F -S while it is already started by the initskript.

Have you edited/created this user without SMBv1 mode? In this case you have no password hashes for SMBv1 in the database. You need to reset this with enabled SMBv1 if you plan to use it.