Samba server not starting on boot
Solution 1
Have you checked to see that you have all these links ?
/etc/rc5.d/S20samba
/etc/rc4.d/S20samba
/etc/rc3.d/S20samba
/etc/rc2.d/S20samba
If not, then samba is not set to autostart, and you should set it up to do so with something like :
update-rc.d samba defaults
Edit:
Ok, so what is reported in the log files around system start up time ?
/var/log/samba/log.smbd
/var/log/samba/log.nmbd
check those two and see if there's anything suspicious in there.
Solution 2
I recently added some shares that are based on UnionFS and now the samba server will not start at boot and I have to launch it manually
When and how do these UnionFS things get mounted? Are they all done in the /etc/fstab, or do you have some script that mounts them. The important question is are they mounted before the system attempts to start Samba?
Related videos on Youtube
Oli
Hi, I'm Oli and I'm a "full-stack" web-dev-op. Eurgh. I'm also allergic to jargon BS. I spend most of my professional time writing Django websites and webapps for SMEs. I write a lot of Python outside of Django sites too. I administer various Linux servers for various tasks. I contribute to the open source projects that I use when I can. I'm a full-time Linux user and that has lead to helping other people live the dream. I am an official Ubuntu Member and I earnt my ♦ on SE's own Ask Ubuntu in 2011's moderator election. That's probably where I spend most of my unpaid time. I also run thepcspy.com which has been my place to write for the last decade or so. If you need to contact me for extended help, you can do so via my website, just remember that I have bills so if I feel your request is above and beyond normal duty, I might ask for remuneration for one-on-one support. For more social contact, you can usually find me (or just my computer) lurking in the Ask Ubuntu General Chat Room and on Freenode in #ubuntu and #ubuntu-uk under the handle Oli or Oli``.
Updated on September 17, 2022Comments
-
Oli over 1 year
I've got an Ubuntu server. I installed Samba to share files with Windows clients and it started off fine. I recently added some shares that are based on UnionFS and now the samba server will not start at boot and I have to launch it manually (
/etc/init.d/samba start
works without error)It's annoying and it's going to cause problems when the server gets restarted when I'm not there. Can anybody suggest an idea why it's not booting and/or give me a way to make sure it does.
Edit: Just restarted. Here's the log for the boot-up.
[2009/05/15 10:04:21, 0] smbd/server.c:main(1260) smbd version 3.3.2 started. Copyright Andrew Tridgell and the Samba Team 1992-2009 [2009/05/15 10:04:21, 0] printing/print_cups.c:cups_connect(103) Unable to connect to CUPS server localhost:631 - Connection refused [2009/05/15 10:04:21, 0] printing/print_cups.c:cups_connect(103) Unable to connect to CUPS server localhost:631 - Connection refused [2009/05/15 10:04:21, 0] lib/interface.c:load_interfaces(546) WARNING: no network interfaces found [2009/05/15 10:04:22, 0] smbd/server.c:open_sockets_smbd(554) open_sockets_smbd: No sockets available to bind to.
I realise I need to clean out some CUPS nonsense.. The "no network interfaces" part is really odd because it will start up (albeit manually).
Here's the log when I run
/etc/init.d/samba start
[2009/05/15 10:09:03, 0] smbd/server.c:main(1260) smbd version 3.3.2 started. Copyright Andrew Tridgell and the Samba Team 1992-2009
No grief about CUPS. No moaning about network interfaces. No nagging about sockets. How I like it.
-
Oli about 15 yearsJust looking at those logs, could it be the network adapter not being connected before samba starts? I'm specifying it in the conf. I'll turn that off and give it another go.
-
-
Oli about 15 yearsYeah they already exist. I ran the command anyway but just got: "System startup links for /etc/init.d/samba already exist."
-
GodEater about 15 yearsVery good point, I'd not thought of that.
-
Oli about 15 yearsThey're mounted in fstab so I can't see how they'd not be mounted by the time samba was loading.
-
Oli about 15 yearsEdited to show logs.
-
Oli about 15 yearsI'm accepting this answer as it is most likely going to fix things for the next person that comes in this thread with a faulty samba set up.