SAMBA not working for Sonos | Core 152

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.

I think you are right. But now smbd is not running.

if i run /etc/init.d/samba start twice, second time you can see that smbd is not working.
It starts to work after starting samba in services. But SMB daemon is stil red.

smbdstart

I once reset the password with SMB1 enabled and started the service. Now I get the following message where I can still log in via Windows 10.

6

In the meantime I have put together a VM and try to test the options with Smaba version 4.13.1. Unfortunately the previous options don’t work with Sonos and the Sonos support didn’t give me any real hope.
Try to install old Samba versions on my Ubuntu 20.04 VM but it doesn’t work yet.

I try my luck with a FTP server.

Try your luck with a DNLA server like Plex or Serviio

but i think that doesn’t work also

I would invest in a new multimedia system. BTW any Smart TV is doing this… :frowning:

It is gruelling to find a solution here that does not hurt your wallet. Yes FTP does not work but why the hell doesn’t the current Samba work with SMB1 enabled?

Within my VM with SambaI have set the following values directly under [Global] and up to now they were always at the bottom of my screen. The access works now.

#======================= Global Settings =======================

[global]
server min protocol = NT1
ntlm auth = yes

###################
I am now testing it once on the router.
I was missing the info that the values must be set directly under [Global].

With these values, you’ll finally be able to access and share your files in Sonos. Unfortunately after saving the file “/var/ipfire/samba/smb.conf” is changed again and the entries are missing.
How can I make sure that the values are always stored in the file below [Global]?

Is it better for security reasons to store the SMB share on a VM and away from the ipfire system? Does this share make the router (ipfire) vulnerable?

Hi,

yes, it is a good idea to move the Samba server away from IPFire in terms of security. :slight_smile:

Thanks, and best regards,
Peter Müller