0

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)

1 Answer 1

0

The solution that finally solved the above was the Legacy Raspbian release (still fully supported with updates). Worked like a charm after 5 min setup.

Raspbian Buster January 28th 2022 (kernel 4.10.63) with smbd --version 4.9.5 https://www.raspberrypi.com/software/operating-systems/

After testing with later versions of Raspbian (August 2022 release) it seems that this bug is no longer present and there is no need to use the legacy OS.

3
  • 1
    Sorry, but downgrading to an old version is nowhere near a "solution". It would be one thing if your post had shown actual troubleshooting steps that show it as unsolvable in 4.13 (e.g. does the service refuse to start because of something that only the Debian Samba maintainers can solve), but not when a downgrade is straight up offered to other readers as the first thing to do. Feb 20, 2022 at 11:00
  • I added more detail for troubleshooting (thanks for the feedback), it might be that I am not knowledgeable enough to fix this. Honestly I tried everything I could. Also, "The samba service is running" (stated clearly in the top paragraph), it is the shares that cannot be accessed because of some "failed to retrieve share list" error on the user side.
    – Gerge
    Feb 20, 2022 at 15:13
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Feb 20, 2022 at 15:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .