[CentOS] Odd failure of smbd to start from init.d - CentOS 5.4

Fri May 21 20:41:01 UTC 2010
Louis Lagendijk <louis at lagendijk.xs4all.nl>

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