LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-19-2016, 01:51 AM   #1
FrizzledOldButt
Member
 
Registered: Dec 2015
Posts: 79

Rep: Reputation: Disabled
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.
 
Old 04-19-2016, 03:27 AM   #2
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 507

Rep: Reputation: 94
Hi,

What about the content of /var/log/messages?
 
Old 04-19-2016, 03:50 AM   #3
pnm
LQ Newbie
 
Registered: Apr 2016
Posts: 3

Rep: Reputation: Disabled
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.

Last edited by pnm; 04-19-2016 at 04:14 AM. Reason: Found a solution
 
Old 04-19-2016, 04:43 AM   #4
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 507

Rep: Reputation: 94
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.
 
Old 04-19-2016, 04:58 AM   #5
Magnus J
LQ Newbie
 
Registered: Apr 2016
Posts: 2

Rep: Reputation: Disabled
@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.

Last edited by Magnus J; 04-19-2016 at 04:59 AM. Reason: wrong user reference
 
Old 04-19-2016, 06:00 AM   #6
FrizzledOldButt
Member
 
Registered: Dec 2015
Posts: 79

Original Poster
Rep: Reputation: Disabled
@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.
 
Old 04-19-2016, 06:23 AM   #7
pnm
LQ Newbie
 
Registered: Apr 2016
Posts: 3

Rep: Reputation: Disabled
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.
 
Old 04-19-2016, 06:31 AM   #8
Magnus J
LQ Newbie
 
Registered: Apr 2016
Posts: 2

Rep: Reputation: Disabled
@FrizzledOldBut I just deleted the security line completely. Shutdown and restarted services and it started working again.
 
Old 04-19-2016, 06:33 AM   #9
FrizzledOldButt
Member
 
Registered: Dec 2015
Posts: 79

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pnm View Post
This may be useful:
Thanks, but I had already eliminated that earlier.
 
Old 04-19-2016, 06:39 AM   #10
FrizzledOldButt
Member
 
Registered: Dec 2015
Posts: 79

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Magnus J View Post
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
 
Old 04-19-2016, 07:13 AM   #11
pnm
LQ Newbie
 
Registered: Apr 2016
Posts: 3

Rep: Reputation: Disabled
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!
 
Old 04-19-2016, 05:19 PM   #12
FrizzledOldButt
Member
 
Registered: Dec 2015
Posts: 79

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pnm View Post
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...
 
Old 05-28-2016, 09:36 AM   #13
georgeb2005
LQ Newbie
 
Registered: May 2016
Posts: 1

Rep: Reputation: Disabled
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
 
Old 12-19-2016, 09:56 PM   #14
brokenpromises
Member
 
Registered: Jan 2005
Location: NZ
Distribution: Fedora / Debian
Posts: 99

Rep: Reputation: 21
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Logger in ZImbra dies out and never starts. linuxlover.chaitanya Linux - Server 2 11-01-2010 12:50 AM
Blender starts up and dies in Ubuntu 7.10 anilbh Ubuntu 1 11-27-2007 02:13 PM
OpenSSH starts and dies TimP AIX 3 10-27-2006 08:01 PM
Samba starts with two smbd processes raypen Linux - Networking 3 06-06-2006 10:49 AM
SSHD starts and dies without any error messages bugg_tb Linux - Software 3 04-19-2006 06:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration