LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   smbd starts and dies instantly (https://www.linuxquestions.org/questions/linux-server-73/smbd-starts-and-dies-instantly-4175577786/)

FrizzledOldButt 04-19-2016 01:51 AM

smbd starts and dies instantly
 
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.

tshikose 04-19-2016 03:27 AM

Hi,

What about the content of /var/log/messages?

pnm 04-19-2016 03:50 AM

Exactly the same problem here. Additional points:

* 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.

tshikose 04-19-2016 04:43 AM

Hi,

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.

Magnus J 04-19-2016 04:58 AM

@pnm, Thank you, had the same problem, working now.

Looks like there was a security update
https://launchpad.net/ubuntu/+source...buntu0.14.04.2
They made it so secure it wouldn't even start and no logs to go off at all.

FrizzledOldButt 04-19-2016 06:00 AM

@pnm, the security = user didn't work for me.

@Magnus_J, I can confirm it was the samba update that I ran with apt-get update this morning.

pnm 04-19-2016 06:23 AM

This may be useful:

http://ubuntuforums.org/showthread.php?t=1962617

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.

I copied in the vanilla configuation file here

https://www.howtoforge.com/samba-ser...untu-14.04-lts

to check that the thing worked at all before copying back "my" file to start the process of elimination.

Magnus J 04-19-2016 06:31 AM

@FrizzledOldBut I just deleted the security line completely. Shutdown and restarted services and it started working again.

FrizzledOldButt 04-19-2016 06:33 AM

Quote:

Originally Posted by pnm (Post 5533278)
This may be useful:

Thanks, but I had already eliminated that earlier.

FrizzledOldButt 04-19-2016 06:39 AM

Quote:

Originally Posted by Magnus J (Post 5533281)
I just deleted the security line completely. Shutdown and restarted services and it started working again.

Jeez, that worked with my original smb.conf!!??

I'm starting to think that Linux et al is designed by a bunch of sadists, but many thanks to you and the others for easing the pain at this end :-)

Cheers

pnm 04-19-2016 07:13 AM

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!

FrizzledOldButt 04-19-2016 05:19 PM

Quote:

Originally Posted by pnm (Post 5533300)
When this sort of thing happens it can seem so (the sadists comment).

Yea, sorry about my feeble attempt at sarcasm and humour. But you know probably sense where I was coming from... ;)

georgeb2005 05-28-2016 09:36 AM

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

brokenpromises 12-19-2016 09:56 PM

Quote:

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.


All times are GMT -5. The time now is 07:56 AM.