I am setting up a raspberry pi 4 server with samba (SMBD/CIFS) file-share and despite replicating tutorials and using the same setup as on a previous pi I could not get it to connect. The samba service is running and the server is visible on the network, but when connecting this error comes up: screenshot of "failed to retrieve share list" error message
What I tried (both Pis have the same smb.conf):
[global]
netbios name = Pi
server string = The Pi server
workgroup = WORKGROUP
server role = standalone
bind interfaces only = yes
interfaces = eth0
[HOMEPI]
path = /home/pi/shared
comment = server
browseable = yes
guest ok = no
read only = no
valid users = pi
write list = pi
create mask=0777
directory mask=0777
Comparing the sudo service smbd status
and sudo service nmbd status
● smbd.service - Samba SMB Daemon
Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2022-02-20 15:08:59 CET; 32min ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Main PID: 741 (smbd)
Status: "smbd: ready to serve connections..."
Tasks: 5 (limit: 3720)
CGroup: /system.slice/smbd.service
├─ 741 /usr/sbin/smbd --foreground --no-process-group
├─ 800 /usr/sbin/smbd --foreground --no-process-group
├─ 803 /usr/sbin/smbd --foreground --no-process-group
├─3766 /usr/sbin/smbd --foreground --no-process-group
└─3780 /usr/sbin/smbd --foreground --no-process-group
Feb 20 15:08:58 raspberrypi systemd[1]: Starting Samba SMB Daemon...
Feb 20 15:08:59 raspberrypi smbd[741]: [2022/02/20 15:08:59.907959, 0] ../lib/util/become_daemon.c:138(daemon_ready)
Feb 20 15:08:59 raspberrypi systemd[1]: Started Samba SMB Daemon.
Feb 20 15:08:59 raspberrypi smbd[741]: daemon_ready: STATUS=daemon 'smbd' finished starting up and ready to serve connections
● nmbd.service - Samba NMB Daemon
Loaded: loaded (/lib/systemd/system/nmbd.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2022-02-20 15:48:40 CET; 4s ago
Docs: man:nmbd(8)
man:samba(7)
man:smb.conf(5)
Main PID: 4321 (nmbd)
Status: "nmbd: ready to serve connections..."
Tasks: 1 (limit: 3720)
CGroup: /system.slice/nmbd.service
└─4321 /usr/sbin/nmbd --foreground --no-process-group
Feb 20 15:48:40 raspberrypi systemd[1]: Starting Samba NMB Daemon...
Feb 20 15:48:40 raspberrypi nmbd[4321]: [2022/02/20 15:48:40.302253, 0] ../lib/util/become_daemon.c:138(daemon_ready)
Feb 20 15:48:40 raspberrypi nmbd[4321]: daemon_ready: STATUS=daemon 'nmbd' finished starting up and ready to serve connections
Feb 20 15:48:40 raspberrypi systemd[1]: Started Samba NMB Daemon.
Feb 20 15:48:40 raspberrypi nmbd[4321]: [2022/02/20 15:48:40.305430, 0] ../source3/nmbd/nmbd_namequery.c:109(query_name_response)
Feb 20 15:48:40 raspberrypi nmbd[4321]: query_name_response: Multiple (2) responses received for a query on subnet 192.168.1.61 for name WORKGROUP<1d>.
Feb 20 15:48:40 raspberrypi nmbd[4321]: This response was from IP 192.168.1.59, reporting an IP address of 192.168.1.59.
as well as logs revealed some minor issues (nmbd recieving multiple replies from 2 interfaces of the same machine; fix here: https://thr3ads.net/samba/2000/08/1675707-query_name_response-Multiple-responses-received), but nothing about the actual cause of the issue. I turned off the other machine to test if that fixes the share, after reboot, but no. I tried setting the share to public with no users or password, that did not fix it either. Both of the Pi's reported pretty much the same, but the one running Bullseye refused connections.
Trouble shooting took long hours, multiple restarts and got nowhere. At this point the only difference between the 2 Pi's was the OS and samba package version.
NOT WORKING: (Dates refer to the OS image publication and not the latest update)
Raspbian Jan. 28 2022 Bullseye 32bit (kernel 4.10.92) with smbd --version
4.13.13
WORKING (the other older raspberry Pi that I compare to):
Raspbian Feb. 12 2020 Buster 32bit (kernel 4.10.63) with smbd --version
4.9.5
I am posting this to answer my own question to hopefully help others (samba share on raspberry seems to be a popular project)