Hi,
We've got a fresh CentOS 5.4 box, and the only glitch so far is that /etc/init.d/smb doesn't start smbd. It claims it does - shows "[ok]" - but only nmbd ends up running. Even setting a higher debugging level in the smbd flags, nothing logs or shows on the console as to why smbd is immediatly quitting.
To make it stranger, doing this works fine:
. /etc/init.d/functions daemon smbd -D
That's the core of how the /etc/init.d/smb file is set up to start it. Except from there it's not working - despite the reported "[ok]".
Anyone seen this, or have advice on how to debug it?
Thanks, Whit
On 5/20/2010 9:21 AM, Whit Blauvelt wrote:
Hi,
We've got a fresh CentOS 5.4 box, and the only glitch so far is that /etc/init.d/smb doesn't start smbd. It claims it does - shows "[ok]" - but only nmbd ends up running. Even setting a higher debugging level in the smbd flags, nothing logs or shows on the console as to why smbd is immediatly quitting.
To make it stranger, doing this works fine:
. /etc/init.d/functions daemon smbd -D
That's the core of how the /etc/init.d/smb file is set up to start it. Except from there it's not working - despite the reported "[ok]".
Anyone seen this, or have advice on how to debug it?
Thanks, Whit _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Have you run 'testparm' to verify the samba configuration does not contain any errors that are preventing the smbd daemon from loading?
On Thu, May 20, 2010 at 10:21:51AM -0400, Ryan Manikowski wrote:
Have you run 'testparm' to verify the samba configuration does not contain any errors that are preventing the smbd daemon from loading?
I had not. Doesn't seem to tell us anything:
# testparm Load smb config files from /etc/samba/smb.conf Processing section "[homes]" Processing section "[printers]" Processing section "[obscured]" Loaded services file OK. Server role: ROLE_STANDALONE Press enter to see a dump of your service definitions
[global] workgroup = MYGROUP server string = Samba Server Version %v cups options = raw
[homes] comment = Home Directories read only = No browseable = No
[printers] comment = All Printers path = /var/spool/samba printable = Yes browseable = No
[obscured] path = /obscured valid users = xbase, obs_user read only = No guest ok = Yes
Thanks for the idea, though.
Whit
Whit Blauvelt writes:
On Thu, May 20, 2010 at 10:21:51AM -0400, Ryan Manikowski wrote:
Have you run 'testparm' to verify the samba configuration does not contain any errors that are preventing the smbd daemon from loading?
I had not. Doesn't seem to tell us anything:
Increase the debug level for smbd by adding -d N (N = 0 ... 10) to SMBDOPTIONS in /etc/sysconfig/samba, restart smbd.
--------------------------------------------------------------- This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message. ---------------------------------------------------------------
Increase the debug level for smbd by adding -d N (N = 0 ... 10) to SMBDOPTIONS in /etc/sysconfig/samba, restart smbd.
That was the first thing I tried. Nothing got logged or reported to console - at all. The nmbd logs showed up as requested, but for smbd, nada.
Thanks for the suggestion, Whit
On 5/20/2010 10:45 AM, Whit Blauvelt wrote:
On Thu, May 20, 2010 at 10:21:51AM -0400, Ryan Manikowski wrote:
Have you run 'testparm' to verify the samba configuration does not contain any errors that are preventing the smbd daemon from loading?
I had not. Doesn't seem to tell us anything:
<snip>
As your config appears to be clean and free of errors that would prevent smbd from starting have you...
...tried starting smbd from the command line NOT using the init scripts?
Make sure nmbd is started first: nmbd -D
Try using the -i and -F flag to start smbd:
e.g. smbd -iF
This will start smbd interactively, log to standard out, and prevent the smbd process from daemonizing and thus keeping it active in the terminal from which it was launched. Combine this with strace to see what exactly the process is doing and why it is failing.
e.g. strace smbd -iF
Prior to doing any of this ensure that there are no other services listening on the ports samba uses:
netstat -pan | grep 139
On Thu, May 20, 2010 at 10:58:07AM -0400, Ryan Manikowski wrote:
As your config appears to be clean and free of errors that would prevent smbd from starting have you...
...tried starting smbd from the command line NOT using the init scripts?
Make sure nmbd is started first: nmbd -D
Try using the -i and -F flag to start smbd:
e.g. smbd -iF
Thanks Ryan. I'll try that when the mount is next free. Note that per my initial report it _does_ work perfectly to start it with:
. /etc/init.d/functions daemon smbd -D
So I'm not sure I'll be able to get it to fail from the command line.
The question for getting it to work from the init.d script is what's different? Would there be a dependency in the environment (say, something about the initial path) that could cause the problem? It sources /etc/sysconfig/samba, which is the default:
# Options to smbd SMBDOPTIONS="-D" # Options to nmbd NMBDOPTIONS="-D" # Options for winbindd WINBINDOPTIONS=""
I've tried it with SMBDOPTIONS="-D -d 3" and SMBDOPTIONS="-D -d 3 -l /var/log" but those fail too, including doing no loging for smbd
It also sources /etc/sysconfig/network, but that has
NETWORKING=yes
which appears to be all it's checking for there.
And it succeeds with touching /var/lock/subsys/smb, which means its return values for both smbd and nmbd were 0. Everything in the start sequence should work, indicates it's working, but then smbd isn't there. Yet starting by hand as above, it is.
Whit
On Thu, May 20, 2010 at 11:41:22AM -0400, Whit Blauvelt wrote:
. /etc/init.d/functions daemon smbd -D
It also seems perfectly happy with just "smbd -D" to start it, after system startup.
But the two lines above do not work when from /etc/rc.local. Haven't tried the simpler invocation there yet....
The init.d file still fails. So the problem is to debug why it fails - which is probably the same reason why /etc/rc.local won't do it - which eludes me.
Whit
On Thu, May 20, 2010 at 10:58:07AM -0400, Ryan Manikowski wrote:
Make sure nmbd is started first: nmbd -D
You know, that's not the order the init.d/smb file has it in:
start() { KIND="SMB" echo -n $"Starting $KIND services: " daemon smbd $SMBDOPTIONS RETVAL=$? echo KIND="NMB" echo -n $"Starting $KIND services: " daemon nmbd $NMBDOPTIONS RETVAL2=$? echo [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/smb || \ RETVAL=1 return $RETVAL }
If that needs to be the other way around - which it certainly ends up being when I'm starting smbd by hand - then someone we got a file with the wrong order specified in it. I'll test that later - other staff's back on the mounted stuff now.
Whit
On 5/20/2010 12:39 PM, Whit Blauvelt wrote:
On Thu, May 20, 2010 at 10:58:07AM -0400, Ryan Manikowski wrote:
Make sure nmbd is started first: nmbd -D
You know, that's not the order the init.d/smb file has it in:
start() { KIND="SMB" echo -n $"Starting $KIND services: " daemon smbd $SMBDOPTIONS RETVAL=$? echo KIND="NMB" echo -n $"Starting $KIND services: " daemon nmbd $NMBDOPTIONS RETVAL2=$? echo [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ]&& touch /var/lock/subsys/smb || \ RETVAL=1 return $RETVAL }
If that needs to be the other way around - which it certainly ends up being when I'm starting smbd by hand - then someone we got a file with the wrong order specified in it. I'll test that later - other staff's back on the mounted stuff now.
That looks like the stock init file - but it might be a good idea to run 'rpm -V samba' to see if everything is standard. Running the init script with 'sh -x' might give you a hint about what it is doing - or you'll have to figure out a way to strace the startup with output still connected to the console or dumped to a file.
On Thu, May 20, 2010 at 12:47:50PM -0500, Les Mikesell wrote:
That looks like the stock init file - but it might be a good idea to run 'rpm -V samba' to see if everything is standard. Running the init script with 'sh -x' might give you a hint about what it is doing - or you'll have to figure out a way to strace the startup with output still
Curiously "sh -x smb" (evoked in the /etc/init.d dir) starts it just fine (but with no trace output). So does "sh smb". But "./smb" does not - only starts nmbd, despite getting an OK out of both.
Figuring how to tie strace to this is beyond my skills.
Whit
More data:
"service smb restart" - does NOT get smbd running (although shows "OK")
"sh /etc/init.d/smb restart" - DOES get smbd running
The "service" man page claims the only environment variables it passes are LANG and TERM. But that can't be the key, since
"/etc/init.d/smb restart" - does NOT get smbd running (although shows "OK")
For that matter
"bash /etc/init.d/smb restart" - DOES get smbd running
Changing the first line of init.d/smb to /bin/bash from /bin/sh changes all this not at all.
What the heck can this be?
Whit
On Thu, 2010-05-20 at 17:41 -0400, Whit Blauvelt wrote:
More data:
"service smb restart" - does NOT get smbd running (although shows "OK")
"sh /etc/init.d/smb restart" - DOES get smbd running
The "service" man page claims the only environment variables it passes are LANG and TERM. But that can't be the key, since
"/etc/init.d/smb restart" - does NOT get smbd running (although shows "OK")
For that matter
"bash /etc/init.d/smb restart" - DOES get smbd running
Changing the first line of init.d/smb to /bin/bash from /bin/sh changes all this not at all.
What the heck can this be?
--- Maybe try "rpm -V samba" to verify all the samba files. You get any output then you have problems.
JOhn
Maybe try "rpm -V samba" to verify all the samba files. You get any output then you have problems.
I take it this output:
# rpm -V samba S.5....T c /etc/rc.d/init.d/smb S.5....T c /etc/samba/smbusers .......T c /etc/sysconfig/samba
merely shows that these are files that don't precisely match the rpm contents? In any case, earlier today we did a complete reinstall of the rpm, and in that form it failed. /etc/rc.d/init.d/smb has had some edits in testing stuff, but is back to the original. /etc/samba/smbusers we most recently had as
# Unix_name = SMB_name1 SMB_name2 ... root = administrator admin # nobody = guest pcguest smbguest
but removing that # from the nobody line doesn't fix things - although it brings it into identity with a Redhat version of the same file on another box. /etc/sysconfig/samba is also back to its original form, which precisely matches Redhat in this, too:
# Options to smbd SMBDOPTIONS="-D" # Options to nmbd NMBDOPTIONS="-D" # Options for winbindd WINBINDOPTIONS=""
It's crazy. We have 3 Redhat boxes configured the same, and they work. But this one CentOS has this bizarre failure. I've seen bad init.d files in my career in various distros, but this one should be too simple to fail. Yet it does.
I thank everyone for their suggestions. I'm afraid this is giving CentOS a bad rep among my coworkers. Y'all are great though. Should I be filing a bug report on this?
Whit
On Thu, 2010-05-20 at 18:39 -0400, Whit Blauvelt wrote:
Maybe try "rpm -V samba" to verify all the samba files. You get any output then you have problems.
I take it this output:
# rpm -V samba S.5....T c /etc/rc.d/init.d/smb S.5....T c /etc/samba/smbusers .......T c /etc/sysconfig/samba
merely shows that these are files that don't precisely match the rpm contents? In any case, earlier today we did a complete reinstall of the rpm, and in that form it failed. /etc/rc.d/init.d/smb has had some edits in testing stuff, but is back to the original. /etc/samba/smbusers we most recently had as
# Unix_name = SMB_name1 SMB_name2 ... root = administrator admin # nobody = guest pcguest smbguest
but removing that # from the nobody line doesn't fix things - although it brings it into identity with a Redhat version of the same file on another box. /etc/sysconfig/samba is also back to its original form, which precisely matches Redhat in this, too:
# Options to smbd SMBDOPTIONS="-D" # Options to nmbd NMBDOPTIONS="-D" # Options for winbindd WINBINDOPTIONS=""
It's crazy. We have 3 Redhat boxes configured the same, and they work. But this one CentOS has this bizarre failure. I've seen bad init.d files in my career in various distros, but this one should be too simple to fail. Yet it does.
I thank everyone for their suggestions. I'm afraid this is giving CentOS a bad rep among my coworkers. Y'all are great though. Should I be filing a bug report on this?
---- not until you run the command as suggested much earlier...
/usr/sbin/smbd -iF
which will launch it iteractively and output everything to standard out - the console itself and then let us know what it says.
Craig
On Thu, May 20, 2010 at 03:50:20PM -0700, Craig White wrote:
not until you run the command as suggested much earlier...
/usr/sbin/smbd -iF
which will launch it iteractively and output everything to standard out
- the console itself and then let us know what it says.
Hi Craig,
/usr/sbin/smbd -D as reported earlier works. The problem is when it's started from the /etc/init.d/smb script in the normal way.
But to be sure:
# /usr/sbin/smbd -iF smbd version 3.0.33-3.28.el5 started. Copyright Andrew Tridgell and the Samba Team 1992-2008
That's all that shows, it stops there. It's running at first:
# ps aux | grep smbd root 10268 0.0 0.0 135576 4568 pts/0 S+ 19:14 0:00 /usr/sbin/smbd -iF
... for a few minutes. Then it goes away. But there's no message as to why it's failed to show anything more on the open console. But the process is gone. Does that tell us anything yet?
On the other hand, a /usr/sbin/smbd -D started process is fully persistent.
Whit
On Thu, 2010-05-20 at 19:35 -0400, Whit Blauvelt wrote:
On Thu, May 20, 2010 at 03:50:20PM -0700, Craig White wrote:
not until you run the command as suggested much earlier...
/usr/sbin/smbd -iF
which will launch it iteractively and output everything to standard out
- the console itself and then let us know what it says.
Hi Craig,
/usr/sbin/smbd -D as reported earlier works. The problem is when it's started from the /etc/init.d/smb script in the normal way.
But to be sure:
# /usr/sbin/smbd -iF smbd version 3.0.33-3.28.el5 started. Copyright Andrew Tridgell and the Samba Team 1992-2008
That's all that shows, it stops there. It's running at first:
# ps aux | grep smbd root 10268 0.0 0.0 135576 4568 pts/0 S+ 19:14 0:00 /usr/sbin/smbd -iF
... for a few minutes. Then it goes away. But there's no message as to why it's failed to show anything more on the open console. But the process is gone. Does that tell us anything yet?
On the other hand, a /usr/sbin/smbd -D started process is fully persistent.
---- sounds like a hardware issue - have you run memtest86 on this computer?
Craig
On Thu, 2010-05-20 at 16:40 -0700, Craig White wrote:
On Thu, 2010-05-20 at 19:35 -0400, Whit Blauvelt wrote:
On Thu, May 20, 2010 at 03:50:20PM -0700, Craig White wrote:
not until you run the command as suggested much earlier...
/usr/sbin/smbd -iF
which will launch it iteractively and output everything to standard out
- the console itself and then let us know what it says.
Hi Craig,
/usr/sbin/smbd -D as reported earlier works. The problem is when it's started from the /etc/init.d/smb script in the normal way.
But to be sure:
# /usr/sbin/smbd -iF smbd version 3.0.33-3.28.el5 started. Copyright Andrew Tridgell and the Samba Team 1992-2008
That's all that shows, it stops there. It's running at first:
# ps aux | grep smbd root 10268 0.0 0.0 135576 4568 pts/0 S+ 19:14 0:00 /usr/sbin/smbd -iF
... for a few minutes. Then it goes away. But there's no message as to why it's failed to show anything more on the open console. But the process is gone. Does that tell us anything yet?
On the other hand, a /usr/sbin/smbd -D started process is fully persistent.
sounds like a hardware issue - have you run memtest86 on this computer?
---- I should have added that there should be a core dump in /var/log/samba/cores/smbd which if you could analyze, would give you some hints
Craig
On Thu, May 20, 2010 at 04:44:20PM -0700, Craig White wrote:
I should have added that there should be a core dump in /var/log/samba/cores/smbd which if you could analyze, would give you some hints
As you might expect at this point, that's a totally empty directory. The lack of a core dump means it's less likely to be a hardware error?
Thanks again, Whit
On Thu, May 20, 2010 at 04:40:26PM -0700, Craig White wrote:
sounds like a hardware issue - have you run memtest86 on this computer?
No, haven't. My experience with hardware issues is that they rarely introduce 100% repeatable software errors. This one is entirely consistent in its behavior, and isolated to this one init.d script. So maybe it's the first time I see one like this?
I'll suggest memtest86 to someone onsite. I'm hundreds of miles away, and we don't have an OOB card in this box, so can't do that myself.
Whit
On 5/20/2010 6:39 PM, Whit Blauvelt wrote:
I'm afraid this is giving CentOS a bad rep among my coworkers.
<snip>
Tell them to join the debian-users list and see what kind of intelligent discussion goes on there. They will be back to Centos in a week. =)
On Thu, May 20, 2010 at 6:39 PM, Whit Blauvelt whit@transpect.com wrote:
Maybe try "rpm -V samba" to verify all the samba files. You get any output then you have problems.
I take it this output:
# rpm -V samba S.5....T c /etc/rc.d/init.d/smb S.5....T c /etc/samba/smbusers .......T c /etc/sysconfig/samba
---
I'm not sure but I really think you have the wrong permissions on the files ""S""
Correct them then try the service command and not by init.d.
If that want work gice the whole smb.conf and samba version.
John
On Thu, May 20, 2010 at 9:42 PM, John Stan jses27@gmail.com wrote:
On Thu, May 20, 2010 at 6:39 PM, Whit Blauvelt whit@transpect.com wrote:
Maybe try "rpm -V samba" to verify all the samba files. You get any output then you have problems.
I take it this output:
# rpm -V samba S.5....T c /etc/rc.d/init.d/smb S.5....T c /etc/samba/smbusers .......T c /etc/sysconfig/samba
I'm not sure but I really think you have the wrong permissions on the files ""S""
No, S and T stand for size and time of modification (M,U,G would have been output for differing mode/user/group; no idea what 5 stands for).
-----Original Message----- From: Tom H Sent: Thursday, May 20, 2010 22:22 To: CentOS mailing list Subject: Re: [CentOS] Odd failure of smbd to start from init.d - CentOS 5.4
On Thu, May 20, 2010 at 9:42 PM, John Stan jses27@gmail.com wrote:
On Thu, May 20, 2010 at 6:39 PM, Whit Blauvelt
whit@transpect.com wrote:
Maybe try "rpm -V samba" to verify all the samba files.
You get any
output then you have problems.
I take it this output:
# rpm -V samba S.5....T c /etc/rc.d/init.d/smb S.5....T c /etc/samba/smbusers .......T c /etc/sysconfig/samba
I'm not sure but I really think you have the wrong
permissions on the
files ""S""
No, S and T stand for size and time of modification (M,U,G would have been output for differing mode/user/group; no idea what 5 stands for).
md5sum
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100 - - +1 (443) 269-1555 x333 Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00.
On Thu, May 20, 2010 at 10:29 PM, Jason Pyeron jpyeron@pdinc.us wrote:
From: Tom H Sent: Thursday, May 20, 2010 22:22
# rpm -V samba S.5....T c /etc/rc.d/init.d/smb S.5....T c /etc/samba/smbusers .......T c /etc/sysconfig/samba
I'm not sure but I really think you have the wrong
permissions on the
files ""S""
No, S and T stand for size and time of modification (M,U,G would have been output for differing mode/user/group; no idea what 5 stands for).
md5sum
Thanks. Was too busy/lazy yesterday to check...
On Thu, 2010-05-20 at 22:22 -0400, Tom H wrote:
On Thu, May 20, 2010 at 9:42 PM, John Stan jses27@gmail.com wrote:
On Thu, May 20, 2010 at 6:39 PM, Whit Blauvelt whit@transpect.com wrote:
Maybe try "rpm -V samba" to verify all the samba files. You get any output then you have problems.
I take it this output:
# rpm -V samba S.5....T c /etc/rc.d/init.d/smb S.5....T c /etc/samba/smbusers .......T c /etc/sysconfig/samba
I'm not sure but I really think you have the wrong permissions on the files ""S""
No, S and T stand for size and time of modification (M,U,G would have been output for differing mode/user/group; no idea what 5 stands for).
--- Yes you would be right. I had thoughts maybe the file was not executable as in "M" . Was what I was looking for to fast. Couldn't really remember, and should have looked it up like I just did.
John
On Thu, May 20, 2010 at 5:41 PM, Whit Blauvelt whit@transpect.com wrote:
More data:
"service smb restart" - does NOT get smbd running (although shows "OK")
"sh /etc/init.d/smb restart" - DOES get smbd running
The "service" man page claims the only environment variables it passes are LANG and TERM. But that can't be the key, since
"/etc/init.d/smb restart" - does NOT get smbd running (although shows "OK")
For that matter
"bash /etc/init.d/smb restart" - DOES get smbd running
Changing the first line of init.d/smb to /bin/bash from /bin/sh changes all this not at all.
What the heck can this be?
The service scripts can check for lock files. Do you have any stale locks in /var/run/subsys?
On Thu, May 20, 2010 at 06:49:33PM -0400, Kwan Lowe wrote:
The service scripts can check for lock files. Do you have any stale locks in /var/run/subsys?
Thanks Kwan.
If I remove /var/run/smbd.pid (and /var/run/nmbd.pid for that matter), the init.d/smb file still fails to get smbd running persistently. Same thing with removing /var/lock/subsys/smb - which gets touched by init.d/smb only after both files return 0 for successful starts, and does get touched in this case, even though of course smbd hasn't really run, if at all, for more than an instant.
Plus, if it were a lock file problem, those scripts shouldn't be showing "[ OK ]," right?
Also, since "sh /etc/init.d/smb (re)start" works but "/etc/init.d/smb (re)start" doesn't, I can't see how the difference between those two invocations would change the handling of the lock files. It's still the same script being run. Just some change in the environment whose subtlety escapes me.
Whit
On 05/20/2010 04:46 PM, Whit Blauvelt wrote:
Also, since "sh /etc/init.d/smb (re)start" works but "/etc/init.d/smb (re)start" doesn't, I can't see how the difference between those two invocations would change the handling of the lock files. It's still the same script being run. Just some change in the environment whose subtlety escapes me.
I would start by comparing the values of all the environment variables between running as /bin/sh and /bin/bash:
env > bash_env.txt /bin/sh env > sh_env.txt exit diff bash_env.txt sh_env.txt
On Thu, May 20, 2010 at 04:55:29PM -0700, Jerry Franz wrote:
I would start by comparing the values of all the environment variables between running as /bin/sh and /bin/bash:
env > bash_env.txt /bin/sh env > sh_env.txt exit diff bash_env.txt sh_env.txt
Jerry,
That's a good idea. To repeat my earlier findings both these work:
"bash /etc/init.d/smb start" "sh /etc/init.d/smb start"
and that's with either #!/bin/sh or #!/bin/bash as the first line.
Meanwhile this doesn't work
"/etc/init.d/smb start"
and that's with either #!/bin/sh or #!/bin/bash as the first line.
Also, if I go to sh as the shell:
"/etc/init.d/smb start" - doesn't work
"sh /etc/init.d/smb start" starts - well, it shows blank rather than [ OK ] for SMB services, which is different, but it starts both smbd and nmbd just fine.
and
"bash /etc/init.d/smb start" works in the sh shell just fine too.
So the difference in envars isn't the difference in whether it runs, unless running a shell within a shell (within a shell) does something odd to them.
In any case:
# diff bash_env.txt sh_env.txt 2d1 < TERM=rxvt 3a3
TERM=rxvt
6d5 < OLDPWD=/var/log/samba/cores/smbd 10d8 < MAIL=/var/spool/mail/root 12c10,11 < INPUTRC=/etc/inputrc ---
MAIL=/var/spool/mail/root _=/bin/env
13a13
INPUTRC=/etc/inputrc
15d14 < SHLVL=1 16a16
SHLVL=2
22d21 < _=/bin/env
Do you see something there I don't?
I'm starting to feel the bad hardware hypothesis might be the only one left standing. The smb script and environment seems too simple to go so wrong.
Whit
On 05/20/2010 05:28 PM, Whit Blauvelt wrote:
On Thu, May 20, 2010 at 04:55:29PM -0700, Jerry Franz wrote:
I would start by comparing the values of all the environment variables between running as /bin/sh and /bin/bash:
env> bash_env.txt /bin/sh env> sh_env.txt exit diff bash_env.txt sh_env.txt
Jerry,
That's a good idea. To repeat my earlier findings both these work:
[...]
Do you see something there I don't?
Nope.
I'm starting to feel the bad hardware hypothesis might be the only one left standing. The smb script and environment seems too simple to go so wrong.
Have you looked in /var/log/messages for errors from smbd? I don't remember seeing that anywhere in your T/S list.
On Thu, May 20, 2010 at 06:17:10PM -0700, Benjamin Franz wrote:
Have you looked in /var/log/messages for errors from smbd? I don't remember seeing that anywhere in your T/S list.
Yup. I've grepped all the logs. Nothing from smbd at all. I also enabled kern and daemon logs, just in case those would catch something messages wasn't. What they've caught isn't anything from smbd.
I'm leaning towards it being, as suggested by someone, somehow symptom of a hardware problem, since it seems we've run through everything else remotely possible. I should have memtest86 results from a colleague soon. That it's been such an isolated problem, so consistent in its behavior, has made me think it must be something in the OS configuration. But that hypothesis is about played out.
Appreciate everyone's suggestions.
Whit
On Thu, May 20, 2010 at 9:30 PM, Whit Blauvelt whit@transpect.com wrote:
On Thu, May 20, 2010 at 06:17:10PM -0700, Benjamin Franz wrote:
Have you looked in /var/log/messages for errors from smbd? I don't remember seeing that anywhere in your T/S list.
Yup. I've grepped all the logs. Nothing from smbd at all. I also enabled kern and daemon logs, just in case those would catch something messages wasn't. What they've caught isn't anything from smbd.
I'm leaning towards it being, as suggested by someone, somehow symptom of a hardware problem, since it seems we've run through everything else remotely possible. I should have memtest86 results from a colleague soon. That it's been such an isolated problem, so consistent in its behavior, has made me think it must be something in the OS configuration. But that hypothesis is about played out.
My gut tells me it's not hardware but willing to take it :)
Have you tried adding a "set -x" to the top of the the smb startup scripts? I didn't see any such output in your replies so far.
On Fri, May 21, 2010 at 07:49:16AM -0400, Kwan Lowe wrote:
My gut tells me it's not hardware but willing to take it :)
Have you tried adding a "set -x" to the top of the the smb startup scripts? I didn't see any such output in your replies so far.
Here you go:
# ./smb start + '[' -f /etc/init.d/functions ']' + . /etc/init.d/functions ++ TEXTDOMAIN=initscripts ++ umask 022 ++ PATH=/sbin:/usr/sbin:/bin:/usr/bin ++ export PATH ++ '[' -z '' ']' ++ COLUMNS=80 ++ '[' -z '' ']' +++ /sbin/consoletype ++ CONSOLETYPE=pty ++ '[' -f /etc/sysconfig/i18n -a -z '' ']' ++ . /etc/profile.d/lang.sh +++ sourced=0 +++ for langfile in /etc/sysconfig/i18n '$HOME/.i18n' +++ '[' -f /etc/sysconfig/i18n ']' +++ . /etc/sysconfig/i18n ++++ LANG=en_US.UTF-8 ++++ SYSFONT=latarcyrheb-sun16 +++ sourced=1 +++ for langfile in /etc/sysconfig/i18n '$HOME/.i18n' +++ '[' -f /root/.i18n ']' +++ '[' -n '' ']' +++ '[' 1 = 1 ']' +++ '[' -n en_US.UTF-8 ']' +++ export LANG +++ '[' -n '' ']' +++ unset LC_ADDRESS +++ '[' -n '' ']' +++ unset LC_CTYPE +++ '[' -n '' ']' +++ unset LC_COLLATE +++ '[' -n '' ']' +++ unset LC_IDENTIFICATION +++ '[' -n '' ']' +++ unset LC_MEASUREMENT +++ '[' -n '' ']' +++ unset LC_MESSAGES +++ '[' -n '' ']' +++ unset LC_MONETARY +++ '[' -n '' ']' +++ unset LC_NAME +++ '[' -n '' ']' +++ unset LC_NUMERIC +++ '[' -n '' ']' +++ unset LC_PAPER +++ '[' -n '' ']' +++ unset LC_TELEPHONE +++ '[' -n '' ']' +++ unset LC_TIME +++ '[' -n '' ']' +++ unset LC_ALL +++ '[' -n '' ']' +++ unset LANGUAGE +++ '[' -n '' ']' +++ unset LINGUAS +++ '[' -n '' ']' +++ unset _XKB_CHARSET +++ consoletype=pty +++ '[' -z pty ']' +++ '[' -n '' ']' +++ '[' -n '' ']' +++ '[' -n en_US.UTF-8 ']' +++ case $LANG in +++ '[' rxvt = linux ']' +++ unset SYSFONTACM SYSFONT +++ unset sourced +++ unset langfile ++ '[' -z '' ']' ++ '[' -f /etc/sysconfig/init ']' ++ . /etc/sysconfig/init +++ BOOTUP=color +++ GRAPHICAL=yes +++ RES_COL=60 +++ MOVE_TO_COL='echo -en \033[60G' +++ SETCOLOR_SUCCESS='echo -en \033[0;32m' +++ SETCOLOR_FAILURE='echo -en \033[0;31m' +++ SETCOLOR_WARNING='echo -en \033[0;33m' +++ SETCOLOR_NORMAL='echo -en \033[0;39m' +++ LOGLEVEL=3 +++ PROMPT=yes +++ AUTOSWAP=no ++ '[' pty = serial ']' ++ '[' color '!=' verbose ']' ++ INITLOG_ARGS=-q ++ __sed_discard_ignored_files='/(~|.bak|.orig|.rpmnew|.rpmorig|.rpmsave)$/d' + unset TMPDIR + . /etc/sysconfig/network ++ NETWORKING=yes ++ NETWORKING_IPV6=no ++ HOSTNAME=skywalker.eis.local + '[' -f /etc/sysconfig/samba ']' + . /etc/sysconfig/samba ++ SMBDOPTIONS=-D ++ NMBDOPTIONS=-D ++ WINBINDOPTIONS= + '[' yes = no ']' + '[' -f /etc/samba/smb.conf ']' + RETVAL=0 + '[' start = status ']' + '[' -w /etc/samba/smb.conf ']' + case "$1" in + start + KIND=SMB + echo -n 'Starting SMB services: ' Starting SMB services: + daemon smbd -D + local gotbase= force= nicelevel corelimit + local pid base= user= nice= bg= pid_file= + nicelevel=0 + '[' smbd '!=' smbd ']' + '[' -z '' ']' + base=smbd + __pids_var_run smbd '' + local base=smbd + local pid_file=/var/run/smbd.pid + pid= + '[' -f /var/run/smbd.pid ']' + return 3 + '[' -n '' -a -z '' ']' + corelimit='ulimit -S -c 0' + '[' -n '' ']' + '[' color = verbose -a -z '' ']' + '[' -z '' ']' + /bin/bash -c 'ulimit -S -c 0 >/dev/null 2>&1 ; smbd -D' + '[' 0 -eq 0 ']' + success 'smbd startup' + '[' color '!=' verbose -a -z '' ']' + echo_success + '[' color = color ']' + echo -en '\033[60G' + echo -n '[' [+ '[' color = color ']' + echo -en '\033[0;32m' + echo -n ' OK ' OK + '[' color = color ']' + echo -en '\033[0;39m' + echo -n ']' ]+ echo -ne '\r' + return 0 + return 0 + RETVAL=0 + echo
+ KIND=NMB + echo -n 'Starting NMB services: ' Starting NMB services: + daemon nmbd -D + local gotbase= force= nicelevel corelimit + local pid base= user= nice= bg= pid_file= + nicelevel=0 + '[' nmbd '!=' nmbd ']' + '[' -z '' ']' + base=nmbd + __pids_var_run nmbd '' + local base=nmbd + local pid_file=/var/run/nmbd.pid + pid= + '[' -f /var/run/nmbd.pid ']' + return 3 + '[' -n '' -a -z '' ']' + corelimit='ulimit -S -c 0' + '[' -n '' ']' + '[' color = verbose -a -z '' ']' + '[' -z '' ']' + /bin/bash -c 'ulimit -S -c 0 >/dev/null 2>&1 ; nmbd -D' + '[' 0 -eq 0 ']' + success 'nmbd startup' + '[' color '!=' verbose -a -z '' ']' + echo_success + '[' color = color ']' + echo -en '\033[60G' + echo -n '[' [+ '[' color = color ']' + echo -en '\033[0;32m' + echo -n ' OK ' OK + '[' color = color ']' + echo -en '\033[0;39m' + echo -n ']' ]+ echo -ne '\r' + return 0 + return 0 + RETVAL2=0 + echo
+ '[' 0 -eq 0 -a 0 -eq 0 ']' + touch /var/lock/subsys/smb + return 0 + exit 0
So that's two Ok's and RETVAL's of 0, but immediately afterwards:
# ps aux | grep mbd | grep -v grep root 5504 0.0 0.0 107732 1544 ? Ss 14:40 0:00 nmbd -D
So once again smbd has gone immediately away.
But # smbd -D # ps aux | grep mbd | grep -v grep root 5504 0.0 0.0 107732 1544 ? Ss 14:40 0:00 nmbd -D root 5664 0.0 0.0 135580 2596 ? Ss 14:43 0:00 smbd -D root 5665 0.0 0.0 135580 1408 ? S 14:43 0:00 smbd -D rec_user 5666 0.0 0.0 135888 2712 ? S 14:43 0:00 smbd -D
... it's quite possible to run it directly.
So it remains strange and hard to explain.
Whit
On May 21, 2010, at 2:47 PM, Whit Blauvelt whit@transpect.com wrote:
- /bin/bash -c 'ulimit -S -c 0 >/dev/null 2>&1 ; smbd -D'
What happens when you manually try to execute the above commands?
-Ross
On Fri, May 21, 2010 at 03:12:02PM -0400, Ross Walker wrote:
What happens when you manually try to execute the above commands?
# /bin/bash -c 'ulimit -S -c 0 >/dev/null 2>&1 ; smbd -D'
Not sure what that might in theory do, but it works:
# ps aux | grep mbd | grep -v grep root 7870 0.0 0.0 135952 2592 ? Ss 15:46 0:00 smbd -D root 7871 0.0 0.0 135952 1408 ? S 15:46 0:00 smbd -D
Whit
On May 21, 2010, at 3:48 PM, Whit Blauvelt whit@transpect.com wrote:
On Fri, May 21, 2010 at 03:12:02PM -0400, Ross Walker wrote:
What happens when you manually try to execute the above commands?
# /bin/bash -c 'ulimit -S -c 0 >/dev/null 2>&1 ; smbd -D'
Not sure what that might in theory do, but it works:
# ps aux | grep mbd | grep -v grep root 7870 0.0 0.0 135952 2592 ? Ss 15:46 0:00 smbd -D root 7871 0.0 0.0 135952 1408 ? S 15:46 0:00 smbd -D
Idea wa to see if there was a ulimit set that is preventing smbd from starting.
Need to look back at the debug output to see if it included a restrictive ulimit...
-Ross
On 5/21/2010 4:37 PM, Ross Walker wrote:
On May 21, 2010, at 3:48 PM, Whit Blauveltwhit@transpect.com wrote:
On Fri, May 21, 2010 at 03:12:02PM -0400, Ross Walker wrote:
What happens when you manually try to execute the above commands?
# /bin/bash -c 'ulimit -S -c 0>/dev/null 2>&1 ; smbd -D'
Not sure what that might in theory do, but it works:
# ps aux | grep mbd | grep -v grep root 7870 0.0 0.0 135952 2592 ? Ss 15:46 0:00 smbd -D root 7871 0.0 0.0 135952 1408 ? S 15:46 0:00 smbd -D
Idea wa to see if there was a ulimit set that is preventing smbd from starting.
Need to look back at the debug output to see if it included a restrictive ulimit...
That shouldn't change between doing an 'sh script start' and 'script start'. But then again, neither should anything else...
Whit Blauvelt wrote:
Also, since "sh /etc/init.d/smb (re)start" works but "/etc/init.d/smb (re)start" doesn't, I can't see how the difference between those two invocations would change the handling of the lock files. It's still the same script being run. Just some change in the environment whose subtlety escapes me.
What shell does the script specify at the top and what is found following $PATH?
On Thu, May 20, 2010 at 08:52:31PM -0500, Les Mikesell wrote:
What shell does the script specify at the top and what is found following $PATH?
Here's from the console:
# echo $PATH /usr/kerberos/sbin:/usr/kerberos/bin:/home/OpenBase/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
# which sh /bin/sh
Here's the path seen within the init.d/smb script (from an inserted echo $PATH > file):
/sbin:/usr/sbin:/bin:/usr/bin
Whit
On Fri, May 21, 2010 at 02:36:30PM -0400, Whit Blauvelt wrote:
Here's the path seen within the init.d/smb script (from an inserted echo $PATH > file):
/sbin:/usr/sbin:/bin:/usr/bin
And if I set that path in a console session, smbd still works when called directly:
# export PATH=/sbin:/usr/sbin:/bin:/usr/bin
# ps aux | grep smb root 6449 0.0 0.0 61148 732 pts/1 S+ 14:58 0:00 grep smb
# smbd -D
# ps aux | grep smb root 6452 0.0 0.0 135580 2592 ? Ss 14:58 0:00 smbd -D root 6453 0.0 0.0 135580 1404 ? S 14:58 0:00 smbd -D rec_user 6454 0.0 0.0 135888 2708 ? S 14:58 0:00 smbd -D root 6456 0.0 0.0 61148 732 pts/1 S+ 14:58 0:00 grep smb
So there's nothing about the longer path normally available in a console that's a dependency here.
Whit
On Fri, 2010-05-21 at 15:01 -0400, Whit Blauvelt wrote:
On Fri, May 21, 2010 at 02:36:30PM -0400, Whit Blauvelt wrote:
Here's the path seen within the init.d/smb script (from an inserted echo $PATH > file):
/sbin:/usr/sbin:/bin:/usr/bin
And if I set that path in a console session, smbd still works when called directly:
# export PATH=/sbin:/usr/sbin:/bin:/usr/bin
# ps aux | grep smb root 6449 0.0 0.0 61148 732 pts/1 S+ 14:58 0:00 grep smb
# smbd -D _
Strange. A few more things to try: Add a ulimit -a just before the daemon smbd.... line and try again with the set -x line in place.
What is the output of ls -alZ /bin/*sh
Clean /var/log/samba/ and restart it. Any information in there?
I deleted some of your older mail, so I kind of lost the history Was there a way you could force smbd to fail from a direct call from the command line? If so, could you try to start it with a -F instead of -D. Does it start then? If not, replace the -D in the SMBDOPTIONS in /etc/sysconfig/samba with the -F and see what happens.You may also want to add a -S there, so you do not rely on the logfile (-S logs to stdout). Also increase loglevel in the smb.conf file to some higher value than 1 (or again add a -d x in SMBDOPTIONS the /etc/sysconfig/samba file Please note that with the -F the script will not continue, so keep another terminal open, just in case
-----Original Message----- From: Whit Blauvelt Sent: Thursday, May 20, 2010 17:42 Subject: Re: [CentOS] Odd failure of smbd to start from init.d - CentOS 5.4
More data:
"service smb restart" - does NOT get smbd running (although shows "OK")
"sh /etc/init.d/smb restart" - DOES get smbd running
The "service" man page claims the only environment variables it passes are LANG and TERM. But that can't be the key, since
"/etc/init.d/smb restart" - does NOT get smbd running (although shows "OK")
For that matter
"bash /etc/init.d/smb restart" - DOES get smbd running
Changing the first line of init.d/smb to /bin/bash from /bin/sh changes all this not at all.
What the heck can this be?
We have this issue too. Our case it caused by a faulty ethernet card. If a user logs on with a large profile 2-8GB it will lock the card up, then samba will not start (no messages, just the [OK] and it is gone). When we powercycle the box, all is well. We have tried to rmmod/insmod the nic drivers with intermittent results. We have the new boxes to migrate, now just looking for the time to do it. PS read the remainder of the thread before replying.
-Jason
-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100 - - +1 (443) 269-1555 x333 Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00.
From: Whit Blauvelt whit@transpect.com
"service smb restart" - does NOT get smbd running (although shows "OK") "sh /etc/init.d/smb restart" - DOES get smbd running "/etc/init.d/smb restart" - does NOT get smbd running (although shows "OK") "bash /etc/init.d/smb restart" - DOES get smbd running
What's the return value? service smb start echo $?
JD
On Fri, May 21, 2010 at 03:39:53AM -0700, John Doe wrote:
What's the return value? service smb start echo $?
# service smb start Starting SMB services: [ OK ] Starting NMB services:
# echo $? 0
# ps aux | grep mbd root 2520 0.0 0.0 107732 1548 ? Ss 14:00 0:00 nmbd -D root 4545 0.0 0.0 61152 744 pts/1 S+ 14:27 0:00 grep mbd
So it returns 0, but it's not there. That's even if I run it all together:
# service smb restart;echo $?;ps aux | grep mbd | grep -v grep Shutting down SMB services: [FAILED] Shutting down NMB services: [ OK ] Starting SMB services: [ OK ] Starting NMB services: [ OK ] 0 root 4753 0.0 0.0 108456 1464 ? Ss 14:29 0:00 nmbd -D
What you see there is the failed shutdown of smbd, since the start just before didn't work for long, then the successful nmbd shutdown, followed by the apparently successful run of both of them, exit 0, but in fact only nmbd, an instant later, is in the process table.
That missing second [ OK ] in the top instance is occassional (the only inconsistent feature I'm seeing); and note nmbd is behaving fine even when it doesn't show.
Whit
On 5/20/2010 8:21 AM, Whit Blauvelt wrote:
Hi,
We've got a fresh CentOS 5.4 box, and the only glitch so far is that /etc/init.d/smb doesn't start smbd. It claims it does - shows "[ok]" - but only nmbd ends up running. Even setting a higher debugging level in the smbd flags, nothing logs or shows on the console as to why smbd is immediatly quitting.
To make it stranger, doing this works fine:
. /etc/init.d/functions daemon smbd -D
That's the core of how the /etc/init.d/smb file is set up to start it. Except from there it's not working - despite the reported "[ok]".
Anyone seen this, or have advice on how to debug it?
Does 'service smb restart' work after the rest of the system is up enough to log in? If so, maybe some of the underlying network services aren't ready when it starts at bootup.
Does 'service smb restart' work after the rest of the system is up enough to log in? If so, maybe some of the underlying network services aren't ready when it starts at bootup.
/etc/init.d/smb restart does not restart it. Shows an error on smb shutdown (of course, since it's not running), an [ok] on nmbd shutdown, then [ok] on startup for both - but smbd does not in fact run. (Now, that would be some level of bug, that it reports "[ok]" when it's immediately not the case, right? It's at least a feature lacking.)
Networking is fully up and running. Can't take smbd down right now to see if "service smb restart" works better than "/etc/init.d/smb restart" (other work being done over that mount at present), but I've yet to see any other case where an init.d script, run by root, fails, so I'm not betting that's the problem. It does, as it stands, fail on system reboot too.
Whit
On 5/20/2010 9:53 AM, Whit Blauvelt wrote:
Does 'service smb restart' work after the rest of the system is up enough to log in? If so, maybe some of the underlying network services aren't ready when it starts at bootup.
/etc/init.d/smb restart does not restart it. Shows an error on smb shutdown (of course, since it's not running), an [ok] on nmbd shutdown, then [ok] on startup for both - but smbd does not in fact run. (Now, that would be some level of bug, that it reports "[ok]" when it's immediately not the case, right? It's at least a feature lacking.)
Networking is fully up and running. Can't take smbd down right now to see if "service smb restart" works better than "/etc/init.d/smb restart" (other work being done over that mount at present), but I've yet to see any other case where an init.d script, run by root, fails, so I'm not betting that's the problem. It does, as it stands, fail on system reboot too.
I don't think there should be a difference using 'service' vs. /etc/init.d/smb. One difference between those and your direct invocation that worked is that the scripts source /etc/sysconfig/samba. Do you have anything unusual in SMBDOPTIONS there?
On May 20, 2010, at 9:21 AM, Whit Blauvelt whit@transpect.com wrote:
Hi,
We've got a fresh CentOS 5.4 box, and the only glitch so far is that /etc/init.d/smb doesn't start smbd. It claims it does - shows "[ok]"
- but
only nmbd ends up running. Even setting a higher debugging level in the smbd flags, nothing logs or shows on the console as to why smbd is immediatly quitting.
To make it stranger, doing this works fine:
. /etc/init.d/functions daemon smbd -D
That's the core of how the /etc/init.d/smb file is set up to start it. Except from there it's not working - despite the reported "[ok]".
Anyone seen this, or have advice on how to debug it?
By any chance did someone add smbd to xinetd?
If so then xinetd has the port open and the smbd process will not bind.
-Ross
On Fri, May 21, 2010 at 10:04:36AM -0400, Ross Walker wrote:
By any chance did someone add smbd to xinetd?
If so then xinetd has the port open and the smbd process will not bind.
Nope. Not sure that would explain why a slight difference in how it's invoked, through the same init.d script, makes the difference in whether it runs. That is:
sh /etc/init.d/smb start (and "/usr/sbin/smbd -D")
which always works from console, differs from
/etc/init.d/smb start (and "service smb start" too)
which doesn't ever work on this box, how? This is when smb starts with "#!/bin/sh" anyway. Only thing I can figure is that there may be a subtle difference in timing, a slowing down just enough to make the startup tolerant of hardware that's right on the margin. There's no significant difference (if any) in envars.
After questioning everything else - including close comparison to some Redhat 5.4 systems with smbd starting fine - by elimination the hardware seems the only thing left to question. But I'm still open to ideas.
Thanks, Whit
On 5/21/2010 9:44 AM, Whit Blauvelt wrote:
On Fri, May 21, 2010 at 10:04:36AM -0400, Ross Walker wrote:
By any chance did someone add smbd to xinetd?
If so then xinetd has the port open and the smbd process will not bind.
Nope. Not sure that would explain why a slight difference in how it's invoked, through the same init.d script, makes the difference in whether it runs. That is:
sh /etc/init.d/smb start (and "/usr/sbin/smbd -D")
which always works from console, differs from
/etc/init.d/smb start (and "service smb start" too)
which doesn't ever work on this box, how? This is when smb starts with "#!/bin/sh" anyway. Only thing I can figure is that there may be a subtle difference in timing, a slowing down just enough to make the startup tolerant of hardware that's right on the margin. There's no significant difference (if any) in envars.
The only difference here 'should' be that explicitly running 'sh' will invoke your own shell aliases and search PATH to execute sh, where if you omit it you'll get the #!/bin/sh interpreter specified in the script itself. Is there anything in your aliases or anything before /bin in PATH where the working shell might be found?
Or, perhaps this difference is coincidental and something is randomly killing smbd. You might be able to see something if you comment out the nmbd startup in the script and strace -f /etc/init.d/smb start but it will only be useful if smbd dies and you can see a failing system call causing it.
On May 21, 2010, at 11:24 AM, Les Mikesell lesmikesell@gmail.com wrote:
On 5/21/2010 9:44 AM, Whit Blauvelt wrote:
On Fri, May 21, 2010 at 10:04:36AM -0400, Ross Walker wrote:
By any chance did someone add smbd to xinetd?
If so then xinetd has the port open and the smbd process will not bind.
Nope. Not sure that would explain why a slight difference in how it's invoked, through the same init.d script, makes the difference in whether it runs. That is:
sh /etc/init.d/smb start (and "/usr/sbin/smbd -D")
which always works from console, differs from
/etc/init.d/smb start (and "service smb start" too)
which doesn't ever work on this box, how? This is when smb starts with "#!/bin/sh" anyway. Only thing I can figure is that there may be a subtle difference in timing, a slowing down just enough to make the startup tolerant of hardware that's right on the margin. There's no significant difference (if any) in envars.
The only difference here 'should' be that explicitly running 'sh' will invoke your own shell aliases and search PATH to execute sh, where if you omit it you'll get the #!/bin/sh interpreter specified in the script itself. Is there anything in your aliases or anything before /bin in PATH where the working shell might be found?
Or, perhaps this difference is coincidental and something is randomly killing smbd. You might be able to see something if you comment out the nmbd startup in the script and strace -f /etc/init.d/smb start but it will only be useful if smbd dies and you can see a failing system call causing it.
Or maybe a corrupt env file in /etc/profile.d?
-Ross
On Fri, May 21, 2010 at 10:24:00AM -0500, Les Mikesell wrote:
The only difference here 'should' be that explicitly running 'sh' will invoke your own shell aliases and search PATH to execute sh, where if you omit it you'll get the #!/bin/sh interpreter specified in the script itself. Is there anything in your aliases or anything before /bin in PATH where the working shell might be found?
No aliases. No modification of PATH from the stock install. All other init.d scripts are working without problem.
And as reported earlier changing the init.d/smb file to #!/bin/bash makes no difference. But invoking as "bash /etc/init.d/smb start" also works while "/etc/init.d/smb start" fails for bash as well as sh spec'd in the file (yet giving an [ OK ] both ways).
Or, perhaps this difference is coincidental and something is randomly killing smbd. You might be able to see something if you comment out the nmbd startup in the script and strace -f /etc/init.d/smb start but it will only be useful if smbd dies and you can see a failing system call causing it.
Thanks. I'll try that after lunch. The only qualification on "randomly" would be that it's 100% killing it within an instant in the not-working invocations, and 100% leaving it untouched in the working invocations.
Whit
On 5/21/2010 10:56 AM, Whit Blauvelt wrote:
On Fri, May 21, 2010 at 10:24:00AM -0500, Les Mikesell wrote:
The only difference here 'should' be that explicitly running 'sh' will invoke your own shell aliases and search PATH to execute sh, where if you omit it you'll get the #!/bin/sh interpreter specified in the script itself. Is there anything in your aliases or anything before /bin in PATH where the working shell might be found?
No aliases. No modification of PATH from the stock install. All other init.d scripts are working without problem.
But /bin isn't first in PATH. Does 'which sh' say /bin/sh? Also, sh and bash are really the same thing. Does rpm -V bash show everything stock?
On 5/21/2010 10:56 AM, Whit Blauvelt wrote:
On Fri, May 21, 2010 at 10:24:00AM -0500, Les Mikesell wrote:
The only difference here 'should' be that explicitly running 'sh' will invoke your own shell aliases and search PATH to execute sh, where if you omit it you'll get the #!/bin/sh interpreter specified in the script itself. Is there anything in your aliases or anything before /bin in PATH where the working shell might be found?
No aliases. No modification of PATH from the stock install. All other init.d scripts are working without problem.
But /bin isn't first in PATH. Does 'which sh' say /bin/sh? Also, sh and bash are really the same thing. Does rpm -V bash show everything stock?
A suggestion: in the script, add env > /tmp/smb.env
or whatever you want to call it. Then you can compare and contrast with your environment.
mark
On Fri, May 21, 2010 at 12:52:51PM -0400, m.roth@5-cent.us wrote:
A suggestion: in the script, add env > /tmp/smb.env
or whatever you want to call it. Then you can compare and contrast with your environment.
Good idea. I'll try it when the system's back up. Someone's hunting up a replacement NIC to see if that really could be the fix. I should note that this is a 2-day-old stock install from the CentOS ISO. While a coworker initially handled it, I'm sure he didn't go adding any extra versions of sh.
I'd been assuming that sh was dash, as it is in Debian-based distros. Silly of me. It is bash on CentOS. So my playing with the sh/bash thing was wasting time. Sorry I even wrote up that aspect.
Whit
On May 21, 2010, at 10:44 AM, Whit Blauvelt whit@transpect.com wrote:
On Fri, May 21, 2010 at 10:04:36AM -0400, Ross Walker wrote:
By any chance did someone add smbd to xinetd?
If so then xinetd has the port open and the smbd process will not bind.
Nope. Not sure that would explain why a slight difference in how it's invoked, through the same init.d script, makes the difference in whether it runs. That is:
sh /etc/init.d/smb start (and "/usr/sbin/smbd -D")
which always works from console, differs from
/etc/init.d/smb start (and "service smb start" too)
which doesn't ever work on this box, how? This is when smb starts with "#!/bin/sh" anyway. Only thing I can figure is that there may be a subtle difference in timing, a slowing down just enough to make the startup tolerant of hardware that's right on the margin. There's no significant difference (if any) in envars.
After questioning everything else - including close comparison to some Redhat 5.4 systems with smbd starting fine - by elimination the hardware seems the only thing left to question. But I'm still open to ideas.
Did you try debugging the init script with:
# sh -x <script> start
-Ross
On Fri, 2010-05-21 at 13:00 -0400, Whit Blauvelt wrote:
On Fri, May 21, 2010 at 11:54:26AM -0400, Ross Walker wrote:
# sh -x <script> start
The problem with debugging it like that is that when started with sh, there's no bug.
how about adding a set -x as the first line after the #!/bin/<whatever> line to get a debug on screen? I don't buy the hardware error as the fault is 100% reproducible.
Just a follow up note: We've got the same problem again on another fresh install. Totally different hardware - so the hardware hypothesis bites the dust. Since other people aren't seeing this, the remaining suspect is our configuration files. We're using an smbpasswd backed, and in both these cases moved configuration files over from working Redhat systems for this.
How that can explain the strange breakage (see the long discussion following the original post for details) is still beyond me. It should break it, or it shouldn't, and when it breaks it smbd should be able to give some message as to why ... but it doesn't.
I wonder if the more recent X version of Samba is likely to work better, or of the breakage here is related to using smbpasswd?
Whit
On Thu, May 20, 2010 at 09:21:28AM -0400, Whit Blauvelt wrote:
We've got a fresh CentOS 5.4 box, and the only glitch so far is that /etc/init.d/smb doesn't start smbd. It claims it does - shows "[ok]" - but only nmbd ends up running. Even setting a higher debugging level in the smbd flags, nothing logs or shows on the console as to why smbd is immediatly quitting.
To make it stranger, doing this works fine:
. /etc/init.d/functions daemon smbd -D
That's the core of how the /etc/init.d/smb file is set up to start it. Except from there it's not working - despite the reported "[ok]".
Anyone seen this, or have advice on how to debug it?
Thanks, Whit
Finally, a clue!
Upgraded from the stock smbd version from the 5.4 iso to 3.0.33-3.28.el5, and now an error message makes it into /var/log/messages:
May 24 15:29:12 xyz smbd[2674]: [2010/05/24 15:29:12, 0] lib/messages.c:message_init(132) May 24 15:29:12 xyz smbd[2674]: ERROR: Failed to initialise messages database
Anyone know what that's about? It's only from the invocation attempts that dependably fail (like "service smb start"), not from those (like "smbd -D") that dependably work.
Regards, Whit
Following up, that appears to be /var/cache/samba/messages.tdb it can't intialize. Which sits there with the same permissions on the not-working CentOS 5.4 systems as on the working Redhat 5.4 systems. Now what could create a problem for that when started from "/etc/init.d/smb start" but not from "sh /etc/init.d/smb start" or "smbd -D"?
All ideas are welcome. I'm seeing with the Google that Samba has long been fragile about this stuff - but haven't found the fix yet.
Whit
On Tue, May 25, 2010 at 04:56:30PM -0400, Whit Blauvelt wrote:
May 24 15:29:12 xyz smbd[2674]: [2010/05/24 15:29:12, 0] lib/messages.c:message_init(132) May 24 15:29:12 xyz smbd[2674]: ERROR: Failed to initialise messages database
At Tue, 25 May 2010 17:26:26 -0400 CentOS mailing list centos@centos.org wrote:
Following up, that appears to be /var/cache/samba/messages.tdb it can't intialize. Which sits there with the same permissions on the not-working CentOS 5.4 systems as on the working Redhat 5.4 systems. Now what could create a problem for that when started from "/etc/init.d/smb start" but not from "sh /etc/init.d/smb start" or "smbd -D"?
All ideas are welcome. I'm seeing with the Google that Samba has long been fragile about this stuff - but haven't found the fix yet.
Was this file *copied* from the Redhat 5.4 system(s) or created fresh under CentOS?
Whit
On Tue, May 25, 2010 at 04:56:30PM -0400, Whit Blauvelt wrote:
May 24 15:29:12 xyz smbd[2674]: [2010/05/24 15:29:12, 0] lib/messages.c:message_init(132) May 24 15:29:12 xyz smbd[2674]: ERROR: Failed to initialise messages database
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Tue, May 25, 2010 at 05:47:00PM -0400, Robert Heller wrote:
Was this file *copied* from the Redhat 5.4 system(s) or created fresh under CentOS?
If you mean /etc/init.d/smb, it's CentOS's version. The entire difference between the two, just for the record, is:
# diff smb /etc/init.d/smb 10a11
echo $PATH > path.txt
37c38 < RETVAL=0 ---
echo $PATH >> path.txt
38a40
RETVAL=0
where "smb" is RH's version and /etc/init.d/smb is Cent's. I can't quite imagine that a difference between overwriting or appending path.txt is at the root of what I'm seeing though.
Thanks, Whit
On Tue, May 25, 2010 at 06:05:34PM -0400, Whit Blauvelt wrote:
where "smb" is RH's version and /etc/init.d/smb is Cent's. I can't quite imagine that a difference between overwriting or appending path.txt is at the root of what I'm seeing though.
Correction: that wasn't a virgin version of Cent's. More in a moment.
Whit
On Tue, May 25, 2010 at 06:09:40PM -0400, Whit Blauvelt wrote:
Correction: that wasn't a virgin version of Cent's. More in a moment.
This gets more bizarre. To a virgin version of Cent's /etc/init.d/smb - it's a perfect match:
# diff ./smb /etc/init.d/smb #
That's right, no diff!
Yet if I run ./smb - the Redhat version, identical but for where it sits, it starts smbd with no problem. But /etc/init.d/smb of course still fails. Both are rwxr-xr-x 1 root root. So: same file contents, same file permissions and ownership, same invocation, and the one in /etc/init.d fails.
On two different CentOS systems.
WTF?
Whit
On Wed, May 26, 2010 at 12:17 AM, Whit Blauvelt whit@transpect.com wrote:
On Tue, May 25, 2010 at 06:09:40PM -0400, Whit Blauvelt wrote:
Correction: that wasn't a virgin version of Cent's. More in a moment.
This gets more bizarre. To a virgin version of Cent's /etc/init.d/smb - it's a perfect match:
# diff ./smb /etc/init.d/smb #
That's right, no diff!
Yet if I run ./smb - the Redhat version, identical but for where it sits, it starts smbd with no problem. But /etc/init.d/smb of course still fails. Both are rwxr-xr-x 1 root root. So: same file contents, same file permissions and ownership, same invocation, and the one in /etc/init.d fails.
On two different CentOS systems.
WTF?
Whit _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Maybe it's on a bad inode?
WTE? do printenv > dot.slash.env add to /etc/init.d/smb printenv > ~/init.d.smb.env then execute /etc/init.d/smb
There has got to be a difference between the two environments causing identical scripts to behave differently depending on how they're executed.
unless
PATH searches . before other directories, *and* there is a file in /etc/init.d or ~ that causes different behavior.
(hint, make sure . is last in your PATH, if it's there at all. Security breach can exploit a misplaced PATH . )
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Whit Blauvelt Sent: Tuesday, May 25, 2010 6:18 PM To: CentOS mailing list Subject: Re: [CentOS] Odd failure of smbd to start from init.d - CentOS 5.4
On Tue, May 25, 2010 at 06:09:40PM -0400, Whit Blauvelt wrote:
Correction: that wasn't a virgin version of Cent's. More in
a moment.
This gets more bizarre. To a virgin version of Cent's /etc/init.d/smb - it's a perfect match:
# diff ./smb /etc/init.d/smb #
That's right, no diff!
Yet if I run ./smb - the Redhat version, identical but for where it sits, it starts smbd with no problem. But /etc/init.d/smb of course still fails. Both are rwxr-xr-x 1 root root. So: same file contents, same file permissions and ownership, same invocation, and the one in /etc/init.d fails.
On two different CentOS systems.
WTF?
Whit _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
******************************************************************* This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. www.Hubbell.com - Hubbell Incorporated**
Hi Brian,
I've been all over the environment comparisons before, I think. The question currently is:
What can be the difference between
"/home/smb restart" - which works, and "/etc/init.d/smb restart" - which fails
when a diff between the two smb files shows no difference?
This is with both of them run from the same (bash) root shell, by hand. Those should have _exactly_ the same environments aside from the PWD envar, right? - unless there's something magical about how init.d scripts run just if they find themselves run from /etc/init.d rather than elsewhere. Maybe there is.
The smb file sources /etc/init.d/functions, but I can't find anything there that obviously cares whether the smb file sourcing it is run from /etc/init.d. Am I missing something? Also sourced are /etc/sysconfig/samba - which is the same in any case, and the same on working RH systems; and /etc/sysconfig/network - which differs in machine name, and in that ipv6 is set "on" for CentOS but not RH - but that shouldn't make a script care if it's started from /etc/init.d or elsewhere.
Best, Whit
On Tue, May 25, 2010 at 06:24:43PM -0400, Brunner, Brian T. wrote:
WTE? do printenv > dot.slash.env add to /etc/init.d/smb printenv > ~/init.d.smb.env then execute /etc/init.d/smb
There has got to be a difference between the two environments causing identical scripts to behave differently depending on how they're executed.
unless
PATH searches . before other directories, *and* there is a file in /etc/init.d or ~ that causes different behavior.
(hint, make sure . is last in your PATH, if it's there at all. Security breach can exploit a misplaced PATH . )
On 05/25/2010 04:11 PM, Whit Blauvelt wrote:
Hi Brian,
I've been all over the environment comparisons before, I think. The question currently is:
What can be the difference between
"/home/smb restart" - which works, and "/etc/init.d/smb restart" - which fails
when a diff between the two smb files shows no difference?
Are you running with SELinux on?
On Tue, May 25, 2010 at 04:33:53PM -0700, Jerry Franz wrote:
Are you running with SELinux on?
Now there's a good question, it turns out. I'd assumed CentOS followed the pattern of most distros in having it not be in strictest mode out-of-the-box, but in /etc/selinux/config:
SELINUX=enforcing
I can see where to turn it off in /etc/selinux/config. But what's the step to get it to restart, other than rebooting the system? Reload a module?
And I'd point out that _nothing_ about smbd was being logged previously, until upgrading samba from the CentOS 5.4 version to the current version started throwing this error:
May 25 19:22:26 xyz smbd[5455]: [2010/05/25 19:22:26, 0] lib/messages.c:message_init(132) May 25 19:22:26 xyz smbd[5455]: ERROR: Failed to initialise messages database
Isn't selinux supposed to be competent enough to log events that it presents? There's nothing from it in anything under /var/log. So if selinux is causing this whole problem, it's pretty incompetent at it. Anything worth blocking is certainly worth logging, right?
Whit
On Tue, May 25, 2010 at 07:55:12PM -0400, Whit Blauvelt wrote:
On Tue, May 25, 2010 at 04:33:53PM -0700, Jerry Franz wrote:
Are you running with SELinux on?
You were right Jerry!
echo 0 > /selinux/enforce
and then /etc/init.d/smb restart works! Thank you much Jerry!
Now why doesn't that fine piece of government work, selinux, do something standard and useful like log when it's instituting breakage?? I get that it's doing it "for your own good," but what good is it if it doesn't tell you what it's doing? The _first place_ I looked when we ran into this problem was the logs. Nada. Zilch.
Programs that try to be smarter than the root user are annoying enough. Programs that do that and don't try to educate the root user while they're doing it are worse. There are standards for logging. Selinux is ignoring them. If it's going to be breaking stuff by default, and failing to log the breakage by default, that's not remotely good. Yet that's how CentOS installs it. Are we downstream of some Redhat brilliance here?
Pardon my English, Whit
Whit Blauvelt wrote:
On Tue, May 25, 2010 at 07:55:12PM -0400, Whit Blauvelt wrote:
On Tue, May 25, 2010 at 04:33:53PM -0700, Jerry Franz wrote:
Are you running with SELinux on?
You were right Jerry!
echo 0 > /selinux/enforce
and then /etc/init.d/smb restart works! Thank you much Jerry!
Now why doesn't that fine piece of government work, selinux, do something standard and useful like log when it's instituting breakage?? I get that it's doing it "for your own good," but what good is it if it doesn't tell you what it's doing? The _first place_ I looked when we ran into this problem was the logs. Nada. Zilch.
Programs that try to be smarter than the root user are annoying enough. Programs that do that and don't try to educate the root user while they're doing it are worse. There are standards for logging. Selinux is ignoring them. If it's going to be breaking stuff by default, and failing to log the breakage by default, that's not remotely good. Yet that's how CentOS installs it. Are we downstream of some Redhat brilliance here?
I would have looked at selinux first for any "odd failure", but I thought it related to the process itself and couldn't see any way that the process would be different when started as "sh /etc/init.d/smb restart" than simply /etc/init.d/smb restart. Is it?
On Tue, May 25, 2010 at 07:46:56PM -0500, Les Mikesell wrote:
I would have looked at selinux first for any "odd failure", but I thought it related to the process itself and couldn't see any way that the process would be different when started as "sh /etc/init.d/smb restart" than simply /etc/init.d/smb restart. Is it?
That selinux would prevent a normal init.d startup of a common daemon like smbd, but allow the same startup in several other ways ... okay, I've never studied selinux. I usually run Ubuntu on servers. I've pretty much literally inherited a bunch of RH-based servers to admin (coworker sadly died), and we're adding more to run in parallel, so CentOS was obvious (RH-the-firm being so badly run it took staff days over the phone just to buy a single new license from them). Of course AppArmour can also get in the way, but at least it logs such actions, so it's obvious if you need to reconfig or turn it off.
I'm solidly impressed with this list. Nothing like it for Ubuntu, and back when Gentoo was my preferred server distro there was more noise surrounding that too. It shows that the interest in CentOS is entirely professional. So that's a strong upside.
But if someone can tell me why selinux thinks it's sane to block "/etc/init.d/smb start" while leaving "sh /etc/init.d/smb start" and even /some/random/dir/smb start" wide open ... I just can't believe some happy hacker at NSA thought that would count as a security scheme. Really, I'd like to know how this is supposed to be useful.
Whit
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Whit Blauvelt Sent: Tuesday, May 25, 2010 21:27 To: CentOS mailing list Subject: Re: [CentOS] Odd failure of smbd to start from init.d - CentOS 5.4 - it's that fine SELinux
On Tue, May 25, 2010 at 07:46:56PM -0500, Les Mikesell wrote:
I would have looked at selinux first for any "odd failure", but I thought it related to the process itself and couldn't see
any way that
the process would be different when started as "sh /etc/init.d/smb restart" than simply /etc/init.d/smb restart. Is it?
That selinux would prevent a normal init.d startup of a common daemon like smbd, but allow the same startup in several other ways ... okay, I've never studied selinux. I usually run Ubuntu on servers. I've pretty much literally inherited a bunch of RH-based servers to admin (coworker sadly died), and we're adding more to run in parallel, so CentOS was obvious (RH-the-firm being so badly run it took staff days over the phone just to buy a single new license from them). Of course AppArmour can also get in the way, but at least it logs such actions, so it's obvious if you need to reconfig or turn it off.
I'm solidly impressed with this list. Nothing like it for Ubuntu, and back when Gentoo was my preferred server distro there was more noise surrounding that too. It shows that the interest in CentOS is entirely professional. So that's a strong upside.
But if someone can tell me why selinux thinks it's sane to block "/etc/init.d/smb start" while leaving "sh /etc/init.d/smb start" and even /some/random/dir/smb start" wide open ... I just can't believe some happy hacker at NSA
If you look at it as the two different commands, then they may have different permissions, owners, contexts, etc...
/bin/sh vs /etc/init.d/smb
I am just logically guessing here but ...
thought that would count as a security scheme. Really, I'd like to know how this is supposed to be useful.
Whit _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100 - - +1 (443) 269-1555 x333 Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00.
On Tue, May 25, 2010 at 10:03:38PM -0400, Jason Pyeron wrote:
If you look at it as the two different commands, then they may have different permissions, owners, contexts, etc...
/bin/sh vs /etc/init.d/smb
I am just logically guessing here but ...
Let me follow your logic here. So the extra selinux labels differentiate what /bin/sh, as a shell, calling the /etc/init.d/smb script, can do from what /etc/init.d/smb, which in its first line invokes /bin/sh to run it, can do. Okay, that sort of makes sense.
So with selinux, in general any script that selinux would stop from running due to the script's own extra selinux file tags can be run if Evil Intruder simply invokes the same script with its shell first - sh or perl or python or whatever? That counts as security? Through what? The obscurity of this devious workaround?
Whit
Whit Blauvelt wrote, On 05/25/2010 11:09 PM:
On Tue, May 25, 2010 at 10:03:38PM -0400, Jason Pyeron wrote:
If you look at it as the two different commands, then they may have different permissions, owners, contexts, etc...
/bin/sh vs /etc/init.d/smb
I am just logically guessing here but ...
Let me follow your logic here. So the extra selinux labels differentiate what /bin/sh, as a shell, calling the /etc/init.d/smb script, can do from what /etc/init.d/smb, which in its first line invokes /bin/sh to run it, can do. Okay, that sort of makes sense.
So with selinux, in general any script that selinux would stop from running due to the script's own extra selinux file tags can be run if Evil Intruder simply invokes the same script with its shell first - sh or perl or python or whatever? That counts as security? Through what? The obscurity of this devious workaround?
At least for some of us delving into what and how selinux is working is recipe for brain explosions. :) but there are some like Daniel J Walsh & Stephen Smalley who seem to be able to manage the deep diving into that system. I am not sure if it is proper to ask RHEL/CentOS questions in the fedora list, but there is a selinux list hosted for fedora where some of the folks with the non exploding brains hang out: https://admin.fedoraproject.org/mailman/listinfo/selinux you could at least ask there about a RHEL specific list, I don't see a list specific to CentOS: http://www.centos.org/modules/tinycontent/index.php?id=16
I see Daniel's emails on fedora users and fedora test lists quite often, and he is reasonably personable in his suggestions, solutions and explanations (at least to my opinion).
If you get an answer that helps, please drop a URL pointer line back on this thread.
On 05/25/2010 08:09 PM, Whit Blauvelt wrote:
So with selinux, in general any script that selinux would stop from running due to the script's own extra selinux file tags can be run if Evil Intruder simply invokes the same script with its shell first - sh or perl or python or whatever? That counts as security? Through what? The obscurity of this devious workaround?
Similarly, suppose I have a script (/usr/local/bin/example) with permission 0700. Now, if Evil Intruder simply copies the script elsewhere and changes its permissions, he can read and execute the script!
Similarly, if I have Firefox running as userA, then userB cannot read its memory. However, if userB runs Firefox, he can read that process' memory!
You're being silly. SELinux confines the daemons that the administrator starts so that they don't take actions that aren't allowed by policy. If an attacker gains access to the system with a higher set of privileges than the confined daemon, OF COURSE he can run the daemon with higher privileges. That doesn't negate the value of YOUR ability to DECREASE the privileges available to the daemons that run on your systems.
On Tue, 2010-05-25 at 21:27 -0400, Whit Blauvelt wrote:
But if someone can tell me why selinux thinks it's sane to block "/etc/init.d/smb start" while leaving "sh /etc/init.d/smb start" and even /some/random/dir/smb start" wide open ... I just can't believe some happy hacker at NSA thought that would count as a security scheme. Really, I'd like to know how this is supposed to be useful.
---- It had good reason to because you did inhereitly edit it as shown by the previous rpm -V. I say you will have more SEL problems if you do not do a full relabel on boot. You really need selinux for samba to prevent buffer overflows. That is how it is usefull.
John
JohnS wrote:
On Tue, 2010-05-25 at 21:27 -0400, Whit Blauvelt wrote:
But if someone can tell me why selinux thinks it's sane to block "/etc/init.d/smb start" while leaving "sh /etc/init.d/smb start" and even /some/random/dir/smb start" wide open ... I just can't believe some happy hacker at NSA thought that would count as a security scheme. Really, I'd like to know how this is supposed to be useful.
It had good reason to because you did inhereitly edit it as shown by the previous rpm -V. I say you will have more SEL problems if you do not do a full relabel on boot. You really need selinux for samba to prevent buffer overflows. That is how it is usefull.
So smbd's context is _supposed_ to be inherited from the init script instead of being inherent to the program itself? And the init script has to be executed directly instead of given to a shell for this to work? Is this documented?
On 5/25/2010 5:09 PM, Whit Blauvelt wrote:
On Tue, May 25, 2010 at 06:05:34PM -0400, Whit Blauvelt wrote:
where "smb" is RH's version and /etc/init.d/smb is Cent's. I can't quite imagine that a difference between overwriting or appending path.txt is at the root of what I'm seeing though.
Correction: that wasn't a virgin version of Cent's. More in a moment.
Try changing: daemon smbd $SMBDOPTIONS to strace -f smbd $SMBDOPTIONS and run it in the way that fails. If there's not enough left on the screen to see why it died, try strace -f smbd $SMBOPTION 2>/tmp/smblog and look at the file reading backwards to find a fatal error.
I'm still very curious about why it would work when run with 'sh'.
Les,
At risk of clogging mail boxes, see below, and note this line in the middle:
open("/var/cache/samba/messages.tdb", O_RDWR|O_CREAT, 0600) = -1 EACCES (Permission denied)
Now, if I copy that modified smb file elsewhere and run it, for one difference output stops without returning to prompt at:
[pid 5525] fcntl(20, F_GETFL) = 0 (flags O_RDONLY) [pid 5525] fcntl(20, F_SETFL, O_RDONLY|O_NONBLOCK) = 0 [pid 5525] fcntl(21, F_GETFL) = 0x1 (flags O_WRONLY) [pid 5525] fcntl(21, F_SETFL, O_WRONLY|O_NONBLOCK) = 0 [pid 5525] select(21, [19 20], NULL, NULL, NULL
and if I ctrl-C it there I get:
<unfinished ...> strace: ptrace(PTRACE_CONT,1,133): Input/output error Process 5526 detached strace: ptrace(PTRACE_CONT,1,133): Input/output error Process 5525 detached
but smbd is then running.
Also running it from outside /etc/init.d gives a _lot_ of lines which aren't in the output below, which look like:
fcntl(14, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=404, len=1}) = 0 fcntl(14, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=404, len=1}) = 0 fcntl(14, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=404, len=1}) = 0 fcntl(14, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=404, len=1}) = 0 fcntl(14, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=404, len=1}) = 0 fcntl(14, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=404, len=1}) = 0 fcntl(14, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=456, len=1}) = 0 fcntl(14, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=456, len=1}) = 0 fcntl(14, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=512, len=1}) = 0
So there is something about how the same file, from the same root shell, behaves from a different location in the file tree. As for the permissions on /var/cache/samba/, they are the same on the CentOS 5.4 and Redhat 5.4:
drwxr-xr-x 5 root root
The messages.tbd file there is -rw------- 1 root root on both Redhat and CentOS, and changing it to be more permissive does not fix the problem.
Here's the strace starting it from /etc/init.d/smb:
# ./smb restart Shutting down SMB services: [FAILED] ( -- wasn't running ) Shutting down NMB services: [ OK ] Starting SMB services: execve("/usr/sbin/smbd", ["smbd", "-D"], [/* 20 vars */]) = 0 brk(0) = 0x2b04bb416000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04ae987000 uname({sys="Linux", node="r2d2.eis.local", ...}) = 0 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=37268, ...}) = 0 mmap(NULL, 37268, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b04ae988000 close(3) = 0 open("/usr/lib64/libldap-2.3.so.0", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\277\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=238568, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04ae992000 mmap(NULL, 2333936, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04aeb88000 mprotect(0x2b04aebc0000, 2097152, PROT_NONE) = 0 mmap(0x2b04aedc0000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x38000) = 0x2b04aedc0000 close(3) = 0 open("/usr/lib64/liblber-2.3.so.0", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\2400\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=56776, ...}) = 0 mmap(NULL, 2152168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04aedc2000 mprotect(0x2b04aedcf000, 2097152, PROT_NONE) = 0 mmap(0x2b04aefcf000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd000) = 0x2b04aefcf000 close(3) = 0 open("/usr/lib64/libgssapi_krb5.so.2", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\222\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=188328, ...}) = 0 mmap(NULL, 2283888, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04aefd0000 mprotect(0x2b04aeffc000, 2097152, PROT_NONE) = 0 mmap(0x2b04af1fc000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2c000) = 0x2b04af1fc000 close(3) = 0 open("/usr/lib64/libkrb5.so.3", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\221\1\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=611280, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04af1fe000 mmap(NULL, 2706624, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04af1ff000 mprotect(0x2b04af290000, 2097152, PROT_NONE) = 0 mmap(0x2b04af490000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x91000) = 0x2b04af490000 close(3) = 0 open("/usr/lib64/libk5crypto.so.3", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260V\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=151080, ...}) = 0 mmap(NULL, 2247432, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04af494000 mprotect(0x2b04af4b8000, 2093056, PROT_NONE) = 0 mmap(0x2b04af6b7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x23000) = 0x2b04af6b7000 close(3) = 0 open("/lib64/libcom_err.so.2", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\n\200\226=\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=10000, ...}) = 0 mmap(NULL, 2103048, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04af6b9000 mprotect(0x2b04af6bb000, 2093056, PROT_NONE) = 0 mmap(0x2b04af8ba000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x2b04af8ba000 close(3) = 0 open("/usr/lib64/libcups.so.2", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\271\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=228672, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04af8bb000 mmap(NULL, 2324152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04af8bc000 mprotect(0x2b04af8f1000, 2097152, PROT_NONE) = 0 mmap(0x2b04afaf1000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x35000) = 0x2b04afaf1000 close(3) = 0 open("/usr/lib64/libz.so.1", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\36\0\225=\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=85608, ...}) = 0 mmap(NULL, 2178600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04afaf4000 mprotect(0x2b04afb08000, 2093056, PROT_NONE) = 0 mmap(0x2b04afd07000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13000) = 0x2b04afd07000 close(3) = 0 open("/lib64/libpthread.so.0", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240W\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=142696, ...}) = 0 mmap(NULL, 2204528, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04afd08000 mprotect(0x2b04afd1e000, 2093056, PROT_NONE) = 0 mmap(0x2b04aff1d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x2b04aff1d000 mmap(0x2b04aff1f000, 13168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b04aff1f000 close(3) = 0 open("/lib64/libm.so.6", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`>\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=611880, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04aff23000 mmap(NULL, 2629848, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04aff24000 mprotect(0x2b04affa6000, 2093056, PROT_NONE) = 0 mmap(0x2b04b01a5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x81000) = 0x2b04b01a5000 close(3) = 0 open("/lib64/libcrypt.so.1", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\t\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=45728, ...}) = 0 mmap(NULL, 2322880, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b01a7000 mprotect(0x2b04b01b0000, 2093056, PROT_NONE) = 0 mmap(0x2b04b03af000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x2b04b03af000 mmap(0x2b04b03b1000, 184768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b04b03b1000 close(3) = 0 open("/lib64/libpam.so.0", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300$\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=44472, ...}) = 0 mmap(NULL, 2140040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b03df000 mprotect(0x2b04b03ea000, 2093056, PROT_NONE) = 0 mmap(0x2b04b05e9000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x2b04b05e9000 close(3) = 0 open("/lib64/libattr.so.1", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\17@\226=\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=17888, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04b05ea000 mmap(NULL, 2110728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b05eb000 mprotect(0x2b04b05ef000, 2093056, PROT_NONE) = 0 mmap(0x2b04b07ee000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x2b04b07ee000 close(3) = 0 open("/lib64/libacl.so.1", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\30\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=25624, ...}) = 0 mmap(NULL, 2120904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b07ef000 mprotect(0x2b04b07f5000, 2093056, PROT_NONE) = 0 mmap(0x2b04b09f4000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000) = 0x2b04b09f4000 close(3) = 0 open("/lib64/libresolv.so.2", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\2402\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=89800, ...}) = 0 mmap(NULL, 2181864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b09f5000 mprotect(0x2b04b0a06000, 2097152, PROT_NONE) = 0 mmap(0x2b04b0c06000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11000) = 0x2b04b0c06000 mmap(0x2b04b0c08000, 6888, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b04b0c08000 close(3) = 0 open("/lib64/libnsl.so.1", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240@\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=111480, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04b0c0a000 mmap(NULL, 2194096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b0c0b000 mprotect(0x2b04b0c20000, 2093056, PROT_NONE) = 0 mmap(0x2b04b0e1f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000) = 0x2b04b0e1f000 mmap(0x2b04b0e21000, 6832, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b04b0e21000 close(3) = 0 open("/lib64/libdl.so.2", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\16\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=20424, ...}) = 0 mmap(NULL, 2109696, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b0e23000 mprotect(0x2b04b0e25000, 2097152, PROT_NONE) = 0 mmap(0x2b04b1025000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x2b04b1025000 close(3) = 0 open("/usr/lib64/libpopt.so.0", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\27\200\231=\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=34240, ...}) = 0 mmap(NULL, 2127312, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b1027000 mprotect(0x2b04b102e000, 2097152, PROT_NONE) = 0 mmap(0x2b04b122e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x2b04b122e000 close(3) = 0 open("/lib64/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\332\1\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1712216, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04b122f000 mmap(NULL, 3498328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b1230000 mprotect(0x2b04b137e000, 2093056, PROT_NONE) = 0 mmap(0x2b04b157d000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14d000) = 0x2b04b157d000 mmap(0x2b04b1582000, 16728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b04b1582000 close(3) = 0 open("/usr/lib64/libsasl2.so.2", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340F\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=103096, ...}) = 0 mmap(NULL, 2198544, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b1587000 mprotect(0x2b04b159f000, 2097152, PROT_NONE) = 0 mmap(0x2b04b179f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0x2b04b179f000 close(3) = 0 open("/lib64/libssl.so.6", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200-\1\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=312344, ...}) = 0 mmap(NULL, 2407792, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b17a0000 mprotect(0x2b04b17e6000, 2097152, PROT_NONE) = 0 mmap(0x2b04b19e6000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x46000) = 0x2b04b19e6000 close(3) = 0 open("/lib64/libcrypto.so.6", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\232\5\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1363952, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04b19ec000 mmap(NULL, 3475344, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b19ed000 mprotect(0x2b04b1b1a000, 2093056, PROT_NONE) = 0 mmap(0x2b04b1d19000, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12c000) = 0x2b04b1d19000 mmap(0x2b04b1d3a000, 14224, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b04b1d3a000 close(3) = 0 open("/usr/lib64/libkrb5support.so.0", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200"\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=33224, ...}) = 0 mmap(NULL, 2128592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b1d3e000 mprotect(0x2b04b1d46000, 2093056, PROT_NONE) = 0 mmap(0x2b04b1f45000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x2b04b1f45000 close(3) = 0 open("/lib64/libkeyutils.so.1", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\n@\226=\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=9472, ...}) = 0 mmap(NULL, 2102416, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b1f46000 mprotect(0x2b04b1f48000, 2093056, PROT_NONE) = 0 mmap(0x2b04b2147000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x2b04b2147000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04b2148000 open("/usr/lib64/libgnutls.so.13", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\332\1\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=540320, ...}) = 0 mmap(NULL, 2635816, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b2149000 mprotect(0x2b04b21c3000, 2093056, PROT_NONE) = 0 mmap(0x2b04b23c2000, 45056, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x79000) = 0x2b04b23c2000 close(3) = 0 open("/lib64/libaudit.so.0", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340&\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=96600, ...}) = 0 mmap(NULL, 2191888, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b23cd000 mprotect(0x2b04b23e4000, 2093056, PROT_NONE) = 0 mmap(0x2b04b25e3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x2b04b25e3000 close(3) = 0 open("/lib64/libselinux.so.1", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`E@\224=\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=95464, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04b25e5000 mmap(NULL, 2192784, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b25e6000 mprotect(0x2b04b25fb000, 2097152, PROT_NONE) = 0 mmap(0x2b04b27fb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x2b04b27fb000 mmap(0x2b04b27fd000, 1424, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b04b27fd000 close(3) = 0 open("/usr/lib64/tls/x86_64/libgcrypt.so.11", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/usr/lib64/tls/x86_64", 0x7fffbc7affb0) = -1 ENOENT (No such file or directory) open("/usr/lib64/tls/libgcrypt.so.11", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/usr/lib64/tls", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("/usr/lib64/x86_64/libgcrypt.so.11", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/usr/lib64/x86_64", 0x7fffbc7affb0) = -1 ENOENT (No such file or directory) open("/usr/lib64/libgcrypt.so.11", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0m\200\227=\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=468328, ...}) = 0 mmap(NULL, 2562432, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b27fe000 mprotect(0x2b04b286d000, 2093056, PROT_NONE) = 0 mmap(0x2b04b2a6c000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6e000) = 0x2b04b2a6c000 close(3) = 0 open("/usr/lib64/tls/libgpg-error.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib64/libgpg-error.so.0", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\7@\225=\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=15208, ...}) = 0 mmap(NULL, 2108192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b2a70000 mprotect(0x2b04b2a73000, 2093056, PROT_NONE) = 0 mmap(0x2b04b2c72000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x2b04b2c72000 close(3) = 0 open("/lib64/libsepol.so.1", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@=\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=245232, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04b2c73000 mmap(NULL, 2383168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b04b2c74000 mprotect(0x2b04b2caf000, 2097152, PROT_NONE) = 0 mmap(0x2b04b2eaf000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3b000) = 0x2b04b2eaf000 mmap(0x2b04b2eb0000, 40256, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b04b2eb0000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04b2eba000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04b2ebb000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04b2ebc000 arch_prctl(ARCH_SET_FS, 0x2b04b2ebbb20) = 0 mprotect(0x2b04b157d000, 16384, PROT_READ) = 0 mprotect(0x2b04b1025000, 4096, PROT_READ) = 0 mprotect(0x2b04b0e1f000, 4096, PROT_READ) = 0 mprotect(0x2b04b0c06000, 4096, PROT_READ) = 0 mprotect(0x2b04b03af000, 4096, PROT_READ) = 0 mprotect(0x2b04b01a5000, 4096, PROT_READ) = 0 mprotect(0x2b04aff1d000, 4096, PROT_READ) = 0 mprotect(0x2b04aeb86000, 4096, PROT_READ) = 0 munmap(0x2b04ae988000, 37268) = 0 set_tid_address(0x2b04b2ebbbb0) = 5454 set_robust_list(0x2b04b2ebbbc0, 0x18) = 0 futex(0x7fffbc7b28cc, FUTEX_WAKE_PRIVATE, 1) = 0 rt_sigaction(SIGRTMIN, {0x2b04afd0d380, [], SA_RESTORER|SA_SIGINFO, 0x2b04afd16b10}, NULL, 8) = 0 rt_sigaction(SIGRT_1, {0x2b04afd0d2b0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x2b04afd16b10}, NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0 getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0 brk(0) = 0x2b04bb416000 brk(0x2b04bb437000) = 0x2b04bb437000 access("/etc/selinux/", F_OK) = 0 open("/etc/selinux/config", O_RDONLY) = -1 EACCES (Permission denied) open("/proc/mounts", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04ae988000 read(3, "rootfs / rootfs rw 0 0\n/dev/root"..., 4096) = 688 close(3) = 0 munmap(0x2b04ae988000, 4096) = 0 open("/selinux/mls", O_RDONLY) = -1 EACCES (Permission denied) open("/usr/lib64/samba/upcase.dat", O_RDONLY) = 3 mmap(NULL, 131072, PROT_READ, MAP_SHARED, 3, 0) = 0x2b04ae993000 close(3) = 0 open("/usr/lib64/samba/lowcase.dat", O_RDONLY) = 3 mmap(NULL, 131072, PROT_READ, MAP_SHARED, 3, 0) = 0x2b04ae9b3000 close(3) = 0 open("/etc/localtime", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 fstat(3, {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04ae9d3000 read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\0"..., 4096) = 3519 lseek(3, -2252, SEEK_CUR) = 1267 read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\5\0\0\0\0"..., 4096) = 2252 close(3) = 0 munmap(0x2b04ae9d3000, 4096) = 0 geteuid() = 0 getegid() = 0 open("/dev/urandom", O_RDONLY) = 3 setresuid(0, 0, 0) = 0 setuid(0) = 0 geteuid() = 0 getuid() = 0 setresgid(0, 0, 0) = 0 setgid(0) = 0 getegid() = 0 getgid() = 0 rt_sigaction(SIGSEGV, {0x2b04ae59d550, [SEGV], SA_RESTORER|SA_RESTART, 0x2b04afd16b10}, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGBUS, {0x2b04ae59d550, [BUS], SA_RESTORER|SA_RESTART, 0x2b04afd16b10}, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGABRT, {0x2b04ae59d550, [ABRT], SA_RESTORER|SA_RESTART, 0x2b04afd16b10}, {SIG_DFL, [], 0}, 8) = 0 mkdir("/var/log/samba/cores", 0700) = -1 EEXIST (File exists) mkdir("/var/log/samba/cores/smbd", 0700) = -1 EEXIST (File exists) getgid() = 0 getuid() = 0 chown("/var/log/samba/cores/smbd", 0, 0) = 0 chmod("/var/log/samba/cores/smbd", 0700) = 0 getrlimit(RLIMIT_CORE, {rlim_cur=0, rlim_max=RLIM_INFINITY}) = 0 setrlimit(RLIMIT_CORE, {rlim_cur=16384*1024, rlim_max=RLIM_INFINITY}) = 0 getrlimit(RLIMIT_CORE, {rlim_cur=16384*1024, rlim_max=RLIM_INFINITY}) = 0 prctl(0x4, 0x1, 0, 0xffffffffffffffff, 0x3) = 0 rt_sigaction(SIGTERM, {0x2b04ae662fd0, [TERM], SA_RESTORER|SA_RESTART, 0x2b04afd16b10}, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGHUP, {0x2b04ae662fb0, [HUP], SA_RESTORER|SA_RESTART, 0x2b04afd16b10}, {SIG_DFL, [], 0}, 8) = 0 rt_sigprocmask(SIG_BLOCK, [PIPE], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [FPE], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [USR2], NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [HUP], NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [USR1], NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [TERM], NULL, 8) = 0 umask(0) = 022 geteuid() = 0 getegid() = 0 getgid() = 0 getegid() = 0 setresgid(4294967295, 0, 4294967295) = 0 getegid() = 0 setgid(0) = 0 getgroups(0, 0x7fffbc7b2634) = 7 getgroups(7, [0, 1, 2, 3, 4, 6, 10]) = 7 setresgid(0, 0, 4294967295) = 0 getegid() = 0 getgid() = 0 umask(022) = 0 open("/var/log/samba/smbd.log", O_WRONLY|O_CREAT|O_APPEND, 0644) = 4 umask(0) = 022 dup2(4, 2) = 2 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 geteuid() = 0 write(4, "[2010/05/25 19:22:26, 0] smbd/se"..., 49) = 49 geteuid() = 0 write(4, " smbd version 3.0.33-3.28.el5 s"..., 40) = 40 geteuid() = 0 write(4, " Copyright Andrew Tridgell and "..., 57) = 57 umask(022) = 0 open("/var/log/samba/smbd.log", O_WRONLY|O_CREAT|O_APPEND, 0644) = 5 close(4) = 0 umask(0) = 022 dup2(5, 2) = 2 stat("/etc/samba/smb.conf", {st_mode=S_IFREG|0644, st_size=10018, ...}) = 0 uname({sys="Linux", node="r2d2.eis.local", ...}) = 0 open("/etc/samba/smb.conf", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=10018, ...}) = 0 read(4, "# This is the main Samba configu"..., 10018) = 10018 close(4) = 0 open("/usr/lib/locale/locale-archive", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=56432752, ...}) = 0 mmap(NULL, 56432752, PROT_READ, MAP_PRIVATE, 4, 0) = 0x2b04b2ebd000 close(4) = 0 open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=25464, ...}) = 0 mmap(NULL, 25464, PROT_READ, MAP_SHARED, 4, 0) = 0x2b04b648f000 close(4) = 0 futex(0x2b04b1581f38, FUTEX_WAKE_PRIVATE, 2147483647) = 0 open("/usr/lib64/gconv/UTF-16.so", O_RDONLY) = 4 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\5\0\0\0\0\0\0"..., 832) = 832 fstat(4, {st_mode=S_IFREG|0755, st_size=10208, ...}) = 0 mmap(NULL, 2105400, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x2b04b6496000 mprotect(0x2b04b6498000, 2093056, PROT_NONE) = 0 mmap(0x2b04b6697000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x1000) = 0x2b04b6697000 close(4) = 0 open("/usr/lib64/gconv/IBM850.so", O_RDONLY) = 4 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\4\0\0\0\0\0\0"..., 832) = 832 fstat(4, {st_mode=S_IFREG|0755, st_size=10184, ...}) = 0 mmap(NULL, 2105376, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x2b04b6699000 mprotect(0x2b04b669b000, 2093056, PROT_NONE) = 0 mmap(0x2b04b689a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x1000) = 0x2b04b689a000 close(4) = 0 brk(0x2b04bb458000) = 0x2b04bb458000 brk(0x2b04bb479000) = 0x2b04bb479000 open("/usr/lib64/samba/valid.dat", O_RDONLY) = 4 mmap(NULL, 65536, PROT_READ, MAP_SHARED, 4, 0) = 0x2b04b689c000 close(4) = 0 futex(0x2b04afaf35ec, FUTEX_WAKE_PRIVATE, 2147483647) = 0 open("/root/.cups/client.conf", O_RDONLY) = -1 EACCES (Permission denied) open("/root/.cupsrc", O_RDONLY) = -1 EACCES (Permission denied) open("/etc/cups/client.conf", O_RDONLY) = 4 fcntl(4, F_GETFD) = 0 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 stat("/var/run/cups/cups.sock", {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0 read(4, "", 4096) = 0 close(4) = 0 open("/etc/nsswitch.conf", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=1696, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04b68ac000 read(4, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1696 read(4, "", 4096) = 0 close(4) = 0 munmap(0x2b04b68ac000, 4096) = 0 open("/etc/ld.so.cache", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=37268, ...}) = 0 mmap(NULL, 37268, PROT_READ, MAP_PRIVATE, 4, 0) = 0x2b04b68ac000 close(4) = 0 open("/lib64/libnss_files.so.2", O_RDONLY) = 4 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\37\0\0\0\0\0\0"..., 832) = 832 fstat(4, {st_mode=S_IFREG|0755, st_size=53880, ...}) = 0 mmap(NULL, 2139432, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x2b04b68b6000 mprotect(0x2b04b68c0000, 2093056, PROT_NONE) = 0 mmap(0x2b04b6abf000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x9000) = 0x2b04b6abf000 close(4) = 0 mprotect(0x2b04b6abf000, 4096, PROT_READ) = 0 munmap(0x2b04b68ac000, 37268) = 0 open("/etc/services", O_RDONLY) = 4 fcntl(4, F_GETFD) = 0 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 fstat(4, {st_mode=S_IFREG|0644, st_size=362031, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04b68ac000 read(4, "# /etc/services:\n# $Id: services"..., 4096) = 4096 read(4, "rotocol\nntp\t\t123/tcp\nntp\t\t123/ud"..., 4096) = 4096 close(4) = 0 munmap(0x2b04b68ac000, 4096) = 0 rt_sigaction(SIGPIPE, {0x1, [], SA_RESTORER, 0x2b04afd16b10}, NULL, 8) = 0 access("/etc/gcrypt/fips_enabled", F_OK) = -1 ENOENT (No such file or directory) open("/proc/sys/crypto/fips_enabled", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04b68ac000 read(4, "0\n", 4096) = 2 close(4) = 0 munmap(0x2b04b68ac000, 4096) = 0 brk(0x2b04bb49a000) = 0x2b04bb49a000 brk(0x2b04bb4bb000) = 0x2b04bb4bb000 access("/dev/random", R_OK) = 0 access("/dev/urandom", R_OK) = 0 open("/dev/urandom", O_RDONLY) = 4 fcntl(4, F_GETFD) = 0 fcntl(4, F_SETFD, FD_CLOEXEC) = 0 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "\301\242\312\1\226\335\211u\321\242.M\337\322$pt\351;\211v\347!\31KH\314\324\31_(\222"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "\21R\37\353\34f$n\344\251\315\275\r\4\260\331\257\360\t\225p\264u\340\31u\206-\363\36^\6"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "/7\330\360\214=g\234_a\374o\17\336\267\342\276\315y\361\265}\252\305\302\265\314J<\323\334\373"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "\36y\304sx\264r\360\334\362lkY\345=\311\202\252\247\245\304\233\354\31\263\215\261<A\37\273\223"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "\17\222\250\236\227c-B\254\263z\10\254/h^L\264\32\206V-\212\16'\322Y\6\206J\360\25"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "\377\274<\274Q\276\1\271\200\251~\10\206\360On\262\0[\1\331\21\230t\214\320\370!\342F~!"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "Fc\233\367\235\276\311`\324%\343\342\207\334Pm\3144\310\230`\204O^axq!\204\rF\370"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "\217\357\274\356\207\222e\317?|1KO\177\2000\350\227D\245\32G|\331\273\255\337\225\35\300\240\277"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "\227\344\204\355\301+\3C\02374\21#\200\330\353\334\346p$8\373\266\265%\327\236\365zb(\7"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, ">\227w\274\221\U\262$\252%0\332\302 \251t\270\273\270\224Iz\270\243_\24\324\245g\237\217"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "\244\tJ\202\236\307\302\r\335\336\264\246\2529Yp%\315\32G\225\35\16c65,\263\271\244\247m"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "\305\20\271Y\361AG\366\260i\377\3262\250=:\17\311P\3473p\2621;R\240b\220\375w?"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "\r\311.\231\325\32\257\224\277\230\346\317\323\315\272B\245\217\253\222\224\275\335\250\341\3165\20\320\237\253\354"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "\360)\315\337\207\345G\202)\na\205\353\32\240\23\5\372\260\230\235\247\206%\6r\323C\2479\177\267"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "\\315z\346\331\221\302E\343\361,F\203H\3\211\300\360\203\357\343\212\365f\32277\262,*y\315"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "29\274\371\306\312\275\230,\276\217\222\340hJ\203h#\5\214\315n}\362\333\242\217\345H\254\245\257"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "b\254\267\320\342\201\367\0\321#\274V\213\314`\302\371\330\30\2\304|#\n\313\305:F"j%\271"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "\366\365?}\367\227X\323/+\372{\2306\1\2r\254\312\350O7%\342B\177\334\273\302\2027\341"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "({\330\305\225\314\333\332?\24\3\327\337\360\2110\223w\362\4)\261\316\236\236\2\270mo\230\355\311"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "\304\272(\312\235Y\3651\263\373^:-S\37\34\305\205\275\213\353\324<\354\322\207\314\270kg\316\317"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "\350\\244^\365\t\202\330j`\226z\226G"hn\245\30\344\275\301\35\205\240\262\254\314\v\370x\372"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "\263\246\335\356l\326\207\342bD\275\361\375\326^\341^C\4\6m\247\30&\237\10=\23?\2137\271"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, " \216\310\306\\234\20\345\332@\335$\37\254Z\21\341&\33\324\367g3C\fr\264\276\212+\230\34"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "\325\374\200\177\220\225\177\204\1#\245hv)\37@\236\266\353N\306D\217c\236\307\347\201\207*\253\25"..., 120) = 120 select(5, [4], NULL, NULL, {3, 0}) = 1 (in [4], left {3, 0}) read(4, "\360E\0270M\16B\n\216\232\32191T5uF\314\227\33231\16~|r\374Bi\267\26\217"..., 120) = 120 getrusage(RUSAGE_SELF, {ru_utime={0, 23996}, ru_stime={0, 7998}, ...}) = 0 times({tms_utime=2, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 430381011 socket(PF_FILE, SOCK_STREAM, 0) = 6 setsockopt(6, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 setsockopt(6, SOL_TCP, TCP_NODELAY, [1], 4) = -1 EOPNOTSUPP (Operation not supported) fcntl(6, F_SETFD, FD_CLOEXEC) = 0 connect(6, {sa_family=AF_FILE, path="/var/run/cups/cups.sock"...}, 26) = 0 access("/usr/share/locale/en_US/cups_en_US.po", F_OK) = -1 ENOENT (No such file or directory) access("/usr/share/locale/en/cups_en.po", F_OK) = -1 ENOENT (No such file or directory) open("/usr/share/locale/C/cups_C.po", O_RDONLY) = -1 ENOENT (No such file or directory) sendto(6, "POST / HTTP/1.1\r\nContent-Length:"..., 134, 0, NULL, 0) = 134 sendto(6, "\1\1@\2\0\0\0\1\1G\0\22attributes-charset\0\5"..., 129, 0, NULL, 0) = 129 poll([{fd=6, events=POLLIN}], 1, 1000) = 1 ([{fd=6, revents=POLLIN}]) recvfrom(6, "HTTP/1.1 100 Continue\r\n\r\nHTTP/1."..., 2048, 0, NULL, NULL) = 340 sendto(6, "POST / HTTP/1.1\r\nContent-Length:"..., 134, 0, NULL, 0) = 134 sendto(6, "\1\1@\5\0\0\0\1\1G\0\22attributes-charset\0\5"..., 129, 0, NULL, 0) = 129 poll([{fd=6, events=POLLIN}], 1, 1000) = 1 ([{fd=6, revents=POLLIN}]) recvfrom(6, "HTTP/1.1 100 Continue\r\n\r\nHTTP/1."..., 2048, 0, NULL, NULL) = 340 close(6) = 0 rt_sigaction(SIGPIPE, {0x1, [], SA_RESTORER, 0x2b04afd16b10}, NULL, 8) = 0 socket(PF_FILE, SOCK_STREAM, 0) = 6 setsockopt(6, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 setsockopt(6, SOL_TCP, TCP_NODELAY, [1], 4) = -1 EOPNOTSUPP (Operation not supported) fcntl(6, F_SETFD, FD_CLOEXEC) = 0 connect(6, {sa_family=AF_FILE, path="/var/run/cups/cups.sock"...}, 26) = 0 sendto(6, "POST / HTTP/1.1\r\nContent-Length:"..., 134, 0, NULL, 0) = 134 sendto(6, "\1\1@\2\0\0\0\1\1G\0\22attributes-charset\0\5"..., 129, 0, NULL, 0) = 129 poll([{fd=6, events=POLLIN}], 1, 1000) = 1 ([{fd=6, revents=POLLIN}]) recvfrom(6, "HTTP/1.1 100 Continue\r\n\r\nHTTP/1."..., 2048, 0, NULL, NULL) = 340 sendto(6, "POST / HTTP/1.1\r\nContent-Length:"..., 134, 0, NULL, 0) = 134 sendto(6, "\1\1@\5\0\0\0\1\1G\0\22attributes-charset\0\5"..., 129, 0, NULL, 0) = 129 poll([{fd=6, events=POLLIN}], 1, 1000) = 1 ([{fd=6, revents=POLLIN}]) recvfrom(6, "HTTP/1.1 100 Continue\r\n\r\nHTTP/1."..., 2048, 0, NULL, NULL) = 340 close(6) = 0 stat("", 0x7fffbc7b1d60) = -1 ENOENT (No such file or directory) umask(022) = 0 open("/var/log/samba/smbd.log", O_WRONLY|O_CREAT|O_APPEND, 0644) = 6 close(5) = 0 umask(0) = 022 dup2(6, 2) = 2 stat("/etc/samba/smb.conf", {st_mode=S_IFREG|0644, st_size=10018, ...}) = 0 umask(022) = 0 open("/var/log/samba/smbd.log", O_WRONLY|O_CREAT|O_APPEND, 0644) = 5 close(6) = 0 umask(0) = 022 dup2(5, 2) = 2 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 6 ioctl(6, SIOCGIFCONF, {80, {{"lo", {AF_INET, inet_addr("127.0.0.1")}}, {"eth0", {AF_INET, inet_addr("192.168.1.20")}}}}) = 0 ioctl(6, SIOCGIFADDR, {ifr_name="eth0", ifr_addr={AF_INET, inet_addr("192.168.1.20")}}) = 0 ioctl(6, SIOCGIFFLAGS, {ifr_name="eth0", ifr_flags=IFF_UP|IFF_BROADCAST|IFF_RUNNING|IFF_MULTICAST}) = 0 ioctl(6, SIOCGIFNETMASK, {ifr_name="eth0", ifr_netmask={AF_INET, inet_addr("255.255.255.0")}}) = 0 ioctl(6, SIOCGIFADDR, {ifr_name="lo", ifr_addr={AF_INET, inet_addr("127.0.0.1")}}) = 0 ioctl(6, SIOCGIFFLAGS, {ifr_name="lo", ifr_flags=IFF_UP|IFF_LOOPBACK|IFF_RUNNING}) = 0 ioctl(6, SIOCGIFNETMASK, {ifr_name="lo", ifr_netmask={AF_INET, inet_addr("255.0.0.0")}}) = 0 close(6) = 0 getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0 setrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=10020}) = 0 setrlimit(RLIMIT_NOFILE, {rlim_cur=10020, rlim_max=10020}) = 0 getrlimit(RLIMIT_NOFILE, {rlim_cur=10020, rlim_max=10020}) = 0 open("/etc/samba/secrets.tdb", O_RDWR|O_CREAT, 0600) = 6 fcntl(6, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}) = 0 read(6, "TDB file\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 168) = 168 fstat(6, {st_mode=S_IFREG|0600, st_size=8192, ...}) = 0 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_SHARED, 6, 0) = 0x2b04b68ac000 fcntl(6, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=1}) = 0 read(3, "\325", 1) = 1 clone(Process 5455 attached child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x2b04b2ebbbb0) = 5455 [pid 5454] exit_group(0) = ? [pid 5455] setsid() = 5455 [pid 5455] close(0) = 0 close(1) = 0 open("/dev/null", O_RDWR) = 0 open("/dev/null", O_RDWR) = 1 stat("/var/cache/samba", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("/var/run/smbd.pid", O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file or directory) open("/var/run/smbd.pid", O_WRONLY|O_CREAT|O_EXCL|O_NONBLOCK, 0644) = 7 fcntl(7, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}) = 0 write(7, "5455\n", 5) = 5 stat("/var/cache/samba", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("/var/cache/samba/messages.tdb", O_RDWR|O_CREAT, 0600) = -1 EACCES (Permission denied) open("/usr/share/locale/locale.alias", O_RDONLY) = 8 fstat(8, {st_mode=S_IFREG|0644, st_size=2528, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b04ae73c000 read(8, "# Locale name alias data base.\n#"..., 4096) = 2528 read(8, "", 4096) = 0 close(8) = 0 munmap(0x2b04ae73c000, 4096) = 0 open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 socket(PF_FILE, SOCK_DGRAM, 0) = 8 fcntl(8, F_SETFD, FD_CLOEXEC) = 0 connect(8, {sa_family=AF_FILE, path="/dev/log"...}, 110) = 0 sendto(8, "<27>May 25 19:22:26 smbd[5455]: "..., 90, MSG_NOSIGNAL, NULL, 0) = 90 geteuid() = 0 fstat(5, {st_mode=S_IFREG|0644, st_size=3538, ...}) = 0 write(5, "[2010/05/25 19:22:26, 0] lib/mes"..., 58) = 58 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 sendto(8, "<27>May 25 19:22:26 smbd[5455]: "..., 80, MSG_NOSIGNAL, NULL, 0) = 80 geteuid() = 0 write(5, " ERROR: Failed to initialise me"..., 48) = 48 exit_group(1) = ? Process 5455 detached
Starting NMB services: [ OK ]
-- but --
# ps aux | grep smb | grep -v grep # [nothing]
Whit
On Tue, May 25, 2010 at 05:24:09PM -0500, Les Mikesell wrote:
Try changing: daemon smbd $SMBDOPTIONS to strace -f smbd $SMBDOPTIONS and run it in the way that fails. If there's not enough left on the screen to see why it died, try strace -f smbd $SMBOPTION 2>/tmp/smblog and look at the file reading backwards to find a fatal error.
I'm still very curious about why it would work when run with 'sh'.
-- Les Mikesell lesmikesell@gmail.com
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Tue, 2010-05-25 at 17:24 -0500, Les Mikesell wrote:
On 5/25/2010 5:09 PM, Whit Blauvelt wrote:
On Tue, May 25, 2010 at 06:05:34PM -0400, Whit Blauvelt wrote:
where "smb" is RH's version and /etc/init.d/smb is Cent's. I can't quite imagine that a difference between overwriting or appending path.txt is at the root of what I'm seeing though.
Correction: that wasn't a virgin version of Cent's. More in a moment.
Try changing: daemon smbd $SMBDOPTIONS to strace -f smbd $SMBDOPTIONS and run it in the way that fails. If there's not enough left on the screen to see why it died, try strace -f smbd $SMBOPTION 2>/tmp/smblog and look at the file reading backwards to find a fatal error.
I'm still very curious about why it would work when run with 'sh'.
Maybe try an ls -alZ fopr both sh and bash. There may be a suble difference there. If selinux gets in the way for one but not the other there may be something fishy with the selinux settings of the shell (or the /etc/init.d/samba file) Louis
Whit Blauvelt wrote, On 05/25/2010 06:05 PM:
On Tue, May 25, 2010 at 05:47:00PM -0400, Robert Heller wrote:
Was this file *copied* from the Redhat 5.4 system(s) or created fresh under CentOS?
If you mean /etc/init.d/smb, it's CentOS's version. The entire difference between the two, just for the record, is:
# diff smb /etc/init.d/smb 10a11
echo $PATH > path.txt
37c38
< RETVAL=0
echo $PATH >> path.txt
38a40
RETVAL=0
where "smb" is RH's version and /etc/init.d/smb is Cent's. I can't quite imagine that a difference between overwriting or appending path.txt is at the root of what I'm seeing though.
I have not been following this thread closely, but perhaps Robert was pointing at SELINUX and the need to keep the SE permissions intact as you copy/edit the file.
i.e. you may need to: A) restorecon /etc/init.d/smb and any other samba files that you have copied/edited. B) look in one of the /var/log/ files for selinux messages when you are starting samba.
Good luck.
On Tue, May 25, 2010 at 06:23:02PM -0400, Todd Denniston wrote:
I have not been following this thread closely, but perhaps Robert was pointing at SELINUX and the need to keep the SE permissions intact as you copy/edit the file.
i.e. you may need to: A) restorecon /etc/init.d/smb and any other samba files that you have copied/edited.
It doesn't work with the smb file which is virgin, as installed by CentOS.
B) look in one of the /var/log/ files for selinux messages when you are starting samba.
There are no lines in any log file with both "selinux" combined with either "mbd" or "samba". Plus selinux is just in advisory mode if not specifically configured to be in the way, isn't it?
Good luck.
I'll take it if I can. Thanks.
Whit
On 05/25/2010 04:39 PM, Whit Blauvelt wrote:
On Tue, May 25, 2010 at 06:23:02PM -0400, Todd Denniston wrote:
i.e. you may need to: A) restorecon /etc/init.d/smb and any other samba files that you have copied/edited.
It doesn't work with the smb file which is virgin, as installed by CentOS.
"restorecon" fixes the SELinux context of the file. Most other forms of repair (short of removing and reinstalling the package) will not do that. If the context is correct, you should not get the errors that you saw.
"restorecon -v" is instructive in telling you whether or not anything needed to be fixed. "ls -lZ" will show you the context which is currently set.
B) look in one of the /var/log/ files for selinux messages when you are starting samba.
There are no lines in any log file with both "selinux" combined with either "mbd" or "samba". Plus selinux is just in advisory mode if not specifically configured to be in the way, isn't it?
Look in /var/log/audit/audit.log. Specifically, watch for lines containing "AVC".
At Tue, 25 May 2010 18:05:34 -0400 CentOS mailing list centos@centos.org wrote:
On Tue, May 25, 2010 at 05:47:00PM -0400, Robert Heller wrote:
Was this file *copied* from the Redhat 5.4 system(s) or created fresh under CentOS?
If you mean /etc/init.d/smb, it's CentOS's version. The entire difference between the two, just for the record, is:
# diff smb /etc/init.d/smb 10a11
echo $PATH > path.txt
37c38
< RETVAL=0
echo $PATH >> path.txt
38a40
RETVAL=0
where "smb" is RH's version and /etc/init.d/smb is Cent's. I can't quite imagine that a difference between overwriting or appending path.txt is at the root of what I'm seeing though.
I meant the .tlb (or whatever it is file) under /var/<mumble>
Thanks, Whit _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
At Tue, 25 May 2010 15:11:45 -0400 CentOS mailing list centos@centos.org wrote:
Just a follow up note: We've got the same problem again on another fresh install. Totally different hardware - so the hardware hypothesis bites the dust. Since other people aren't seeing this, the remaining suspect is our configuration files. We're using an smbpasswd backed, and in both these cases moved configuration files over from working Redhat systems for this.
Wondering aloud: where the smbpasswd *data* files copied? If so how, exactly? And from what version of samba were the smbpasswd *data* created with? And are the permissions of the smbpasswd *data* what they should be? Just guessing, but if there is some broken about the smbpassword database files, this *could* explain some level of problem, although I would more like suspect that smbd with just never run, rather that start and die under *some* conditions, unless those conditions relate to something like library search paths or something odd.
How that can explain the strange breakage (see the long discussion following the original post for details) is still beyond me. It should break it, or it shouldn't, and when it breaks it smbd should be able to give some message as to why ... but it doesn't.
I wonder if the more recent X version of Samba is likely to work better, or of the breakage here is related to using smbpasswd?
Whit
On Thu, May 20, 2010 at 09:21:28AM -0400, Whit Blauvelt wrote:
We've got a fresh CentOS 5.4 box, and the only glitch so far is that /etc/init.d/smb doesn't start smbd. It claims it does - shows "[ok]" - but only nmbd ends up running. Even setting a higher debugging level in the smbd flags, nothing logs or shows on the console as to why smbd is immediatly quitting.
To make it stranger, doing this works fine:
. /etc/init.d/functions daemon smbd -D
That's the core of how the /etc/init.d/smb file is set up to start it. Except from there it's not working - despite the reported "[ok]".
Anyone seen this, or have advice on how to debug it?
Thanks, Whit
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Tue, May 25, 2010 at 05:38:59PM -0400, Robert Heller wrote:
Wondering aloud: where the smbpasswd *data* files copied? If so how, exactly? And from what version of samba were the smbpasswd *data* created with? And are the permissions of the smbpasswd *data* what they should be? Just guessing, but if there is some broken about the smbpassword database files, this *could* explain some level of problem, although I would more like suspect that smbd with just never run, rather that start and die under *some* conditions, unless those conditions relate to something like library search paths or something odd.
Fair questions. The smbdpasswd data files were copied from Redhat Samba Version 3.0.33-3.15.el5_4 (to CentOS Samba Version 3.0.33-3.28.el5). The UIDs in the second field were hand edited (to no discernable effect). The users (only two) can log on fine to these systems once smbd has been started (e.g. with "smbd -D").
What I'm finding in comparing a working Redhat 5.4 system is that smbd starts up with a link through /proc/[smbd pid]/fd which then includes a bunch of stuff including:
lrwx------ 1 root root 64 May 25 17:45 9 -> /var/cache/samba/messages.tdb
Now, when smbd is started as "smbd -D" on CentOS there is no /proc/[pid] set up for it. There is for nmbd, from the init.d/smb file's running, a /proc/[nmbd pid]/fd set up although that doesn't use messages.tbd.
Just where in all that the real problem is I can't say yet. Could it be in setting up the /proc/[pid] directory for smbd? Or in connecting that directory once set up to /var/cache/samba/messages.tdb? And what's that even used for, if smbd runs just fine without it?
Whit