Recently I was faced with a weird problem on my samba server (Ubuntu 10.04 LTS am64) when all shares were "suddenly" inaccessible to the clients. Tracking down the error revealed that smbd was not started on boot-up. From the syslog:
[...]
Dec 4 12:28:45 takkat-home dhclient:
Dec 4 12:28:45 takkat-home NetworkManager: <info> DHCP: device eth0 state changed (null) -> preinit
Dec 4 12:28:45 takkat-home init: smbd main process (1027) terminated with status 255
Dec 4 12:28:45 takkat-home init: smbd main process ended, respawning
Dec 4 12:28:45 takkat-home dhclient: Listening on LPF/eth0/00:24:1d:25:40:e4
Dec 4 12:28:45 takkat-home dhclient: Sending on LPF/eth0/00:24:1d:25:40:e4
Dec 4 12:28:45 takkat-home dhclient: Sending on Socket/fallback
Dec 4 12:28:45 takkat-home avahi-daemon[917]: No service file found in /etc/avahi/services.
Dec 4 12:28:45 takkat-home init: smbd main process (1045) terminated with status 255
Dec 4 12:28:45 takkat-home init: smbd main process ended, respawning
Dec 4 12:28:45 takkat-home init: smbd main process (1050) terminated with status 255
Dec 4 12:28:45 takkat-home init: smbd main process ended, respawning
[...]
and smbd.log:
[...]
[2010/12/04 12:28:45, 0] smbd/server.c:1069(main)
smbd version 3.4.7 started.
Copyright Andrew Tridgell and the Samba Team 1992-2009
[2010/12/04 12:28:45, 0] printing/print_cups.c:103(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2010/12/04 12:28:45, 0] printing/print_cups.c:103(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2010/12/04 12:28:45, 0] smbd/server.c:1115(main)
standard input is not a socket, assuming -D option
[2010/12/04 12:28:45, 0] passdb/pdb_interface.c:253(guest_user_info)
guest_user_info: Unable to locate guest account [guest]!
[2010/12/04 12:28:45, 0] smbd/server.c:1201(main)
ERROR: failed to setup guest info.
[2010/12/04 12:28:45, 0] smbd/server.c:1069(main)
smbd version 3.4.7 started.
Copyright Andrew Tridgell and the Samba Team 1992-2009
[...]
it was clear that smbd crashed.
Before that I did not change anything to the samba configuration, did not install anything but security updates and did not create or delete any new users. Today, I got everything repaired and running smooth as usual by simply running
sudo smbd restart
The crashes on boot are gone and shares are available to clients again.
Still, I have no clue what process was responsible for this behaviour and I am worried on how to avoid this in the future. Any ideas of what process could be made responsible for smbd crashing would be much appreciated. Also I'd be interested to hear what restarting smbd could possibly have repaired and if this was a good idea to do at all.