Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, I have a ubuntu 14.04 LTS based headless server that has been running my mythtv-backend. It is also a file server using samba.
All of a sudden today the smbd service stopped working and refuses to start. Clues are few:
after a reboot dmesg | grep smbd gives me
Code:
[ 17.799737] init: smbd main process (914) terminated with status 1
[ 17.799748] init: smbd main process ended, respawning
[ 17.836466] init: smbd main process (1288) terminated with status 1
[ 17.836477] init: smbd main process ended, respawning
[ 17.873055] init: smbd main process (1292) terminated with status 1
[ 17.873066] init: smbd main process ended, respawning
[ 17.910454] init: smbd main process (1296) terminated with status 1
[ 17.910467] init: smbd main process ended, respawning
[ 17.946262] init: smbd main process (1300) terminated with status 1
[ 17.946273] init: smbd main process ended, respawning
[ 17.983340] init: smbd main process (1304) terminated with status 1
[ 17.983351] init: smbd main process ended, respawning
[ 18.024073] init: smbd main process (1309) terminated with status 1
[ 18.024088] init: smbd main process ended, respawning
[ 18.063328] init: smbd main process (1325) terminated with status 1
[ 18.063339] init: smbd main process ended, respawning
[ 18.099738] init: smbd main process (1330) terminated with status 1
[ 18.099751] init: smbd main process ended, respawning
[ 18.136788] init: smbd main process (1334) terminated with status 1
[ 18.136798] init: smbd main process ended, respawning
[ 18.173524] init: smbd main process (1338) terminated with status 1
[ 18.173535] init: smbd respawning too fast, stopped
[ 892.127203] init: smbd main process (4007) terminated with status 1
[ 892.127214] init: smbd main process ended, respawning
[ 892.168251] init: smbd main process (4011) terminated with status 1
[ 892.168261] init: smbd main process ended, respawning
[ 892.206764] init: smbd main process (4015) terminated with status 1
[ 892.206776] init: smbd main process ended, respawning
[ 892.251153] init: smbd main process (4019) terminated with status 1
[ 892.251164] init: smbd main process ended, respawning
[ 892.292537] init: smbd main process (4023) terminated with status 1
[ 892.292561] init: smbd main process ended, respawning
[ 892.335705] init: smbd main process (4027) terminated with status 1
[ 892.335720] init: smbd main process ended, respawning
[ 892.380034] init: smbd main process (4031) terminated with status 1
[ 892.380052] init: smbd main process ended, respawning
[ 892.419567] init: smbd main process (4035) terminated with status 1
[ 892.419578] init: smbd main process ended, respawning
[ 892.459946] init: smbd main process (4039) terminated with status 1
[ 892.459956] init: smbd main process ended, respawning
[ 892.502952] init: smbd main process (4043) terminated with status 1
[ 892.502963] init: smbd main process ended, respawning
[ 892.544529] init: smbd main process (4047) terminated with status 1
[ 892.544553] init: smbd respawning too fast, stopped
service smbd status gives me
Code:
smbd stop/ waiting
service smbd start gives me something like
Code:
smbd start/running, process 4339
but another status request confirms smbd is not running.
/var/crash is empty, i.e. there are no crash logs
/var/log/samba/log.smbd is empty
Other services like nmbd, mysql, mythtv, apache2, vnc etc are running OK.
I've spent most of the day on this but have hit a brick wall. If anyone has any ideas how to the smbd service going again I'd be most grateful. The alternative is a clean re-install, I suppose.
* samba was running (for years) until a standard aptitude safe-upgrade yesterday (which upgraded the samba packages).
* the upgrade updated the timestamp on smb.conf, but I can't see that anything was changed in the file.
* /var/log/messages is empty, nothing in the samba logs (that I can find) and syslog just shows smbd stopping, exactly as in the original post.
Update -- through trial and error (checking with a vanilla smb.conf and then systematically working through the existing smb.conf): the problem seems to have been security = SHARE. Changed this to security = user and everything seems to be as before. Note to self: should really try to find out *why*, but if I'm lucky this will just now work until the next panic, which on average would seem to be about 5 years.
Last edited by pnm; 04-19-2016 at 04:14 AM.
Reason: Found a solution
Normally new packages try to do their best to not "disturb" existing configuration files.
Do you have any configuration file such as smb.conf.rpmsave or just launch updatedb ; locate smb.conf to see everything similar.
I have an extremely simple setup (just a single public share) and the other bits connected to security = user were obviously already in place or not needed, so that was the single change necessary in my case.
When this sort of thing happens it can seem so (the sadists comment).
On the other hand -- Samba was a simple solution to a specific need and easy enough to configure about 15 years ago, when security-wise the world was a very different place. It's worked more or less without problems since, in spite of -- I now know -- deprecated config values for about the last five years. In that perspective I can live with today's hour of panic!
Hi to all, for me the fix was to chmod -R 0700 /var/lib/samba
/var was mounted in another location
this was the last log
[2016/05/27 10:57:44.913942, 0] ../lib/util/util.c:285(directory_create_or_exist_strict)
invalid permissions on directory '/var/lib/samba/private/msg.sock': has 0755 should be 0700
[2016/05/27 22:54:12.217808, 0] ../lib/util/util.c:285(directory_create_or_exist_strict)
invalid permissions on directory '/var/lib/samba/private/msg.sock': has 0755 should be 0700
[2016/05/27 23:20:18.981385, 0] ../lib/util/util.c:285(directory_create_or_exist_strict)
invalid permissions on directory '/var/lib/samba/private/msg.sock': has 0755 should be 0700
[2016/05/27 23:21:01.022978, 0] ../lib/util/util.c:285(directory_create_or_exist_strict)
invalid permissions on directory '/var/lib/samba/private/msg.sock': has 0755 should be 0700
[2016/05/27 23:25:53.501980, 0] ../lib/util/util.c:285(directory_create_or_exist_strict)
invalid permissions on directory '/var/lib/samba/private/msg.sock': has 0755 should be 0700
[2016/05/27 23:33:00.381323, 0] ../lib/util/util.c:285(directory_create_or_exist_strict)
invalid permissions on directory '/var/lib/samba/private/msg.sock': has 0755 should be 0700
Update -- through trial and error (checking with a vanilla smb.conf and then systematically working through the existing smb.conf): the problem seems to have been security = SHARE. Changed this to security = user and everything seems to be as before. Note to self: should really try to find out *why*, but if I'm lucky this will just now work until the next panic, which on average would seem to be about 5 years.
Just logged in to thank this man - I've been banging my head for a wall about this and this did it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.