Hi, I've been through a long discussion of this on the CentOS list, where people are quite helpful, yet we've gotten nowhere with it. With smbd Version 3.0.33-3.14.el5 on two different CentOS 5.4 64-bit boxes, "/etc/init.d/smb start" reports OK for both nmbd and smbd, but an instant later smbd stops running, with no errors reported - just fails, no matter what logging level is requested of it. Also, "service smb start" fails. On the other hand, "smbd -D" starts and runs smbd just fine, if done from a console. Also "sh /etc/init.d/smb start" runs it just fine, if from a console. (sh = bash on CentOS, and the smb script itself specifies /bin/sh.) These are all consistent; what works works, what doesn't doesn't. I haven't found any invocation that works on system reboot, so am stuck doing it by hand for now. Changing envars so that, for instance, they are only what are available to "service smb start" still allows the manual "smbd -D" to work, so it doesn't seem to be about the shell or environment as such. Perhaps there's some timing issue that for instance allows "sh /etc/init.d/smb start" to work while "/etc/init.d/smb start" doesn't? In both cases the same bash shell is asked to run the same smb script; there should be no difference at all; yet consistently there is. This _may_ relate to these boxes being set up with smbpasswd as the back end, to match existing, working Redhat 5.4 boxes (Version 3.0.33-3.15.el5_4) and a Redhat 5.2 box (Version 3.0.28-1.el5_2.1), as smbpasswd is not the default setup on CentOS. But I can't see how that should put it in a position to start with the invocations that work, while failing on those that don't. Thanks in advance, Whit
On Tue, May 25, 2010 at 01:27:24PM -0700, tms3 at tms3.com wrote:> @reboot root /<path>/<to>/smbd -D (or you could run the script with > full path statement)Hmm. Good idea. But didn't do the trick, but meanwhile I'd also upgraded to smbd version 3.0.33-3.28.el5 - which wasn't working any better really. Except now finally there's an error message, a clue! May 25 16:40:05 xyz smbd[4092]: [2010/05/25 16:40:05, 0] lib/messages.c:message_init(132) May 25 16:40:05 xyz smbd[4092]: ERROR: Failed to initialise messages database That error doesn't occur with "smbd -D" though. Off to Google it.... Thanks, Whit
Whit Blauvelt wrote:>With smbd Version 3.0.33-3.14.el5 on two different CentOS 5.4 64-bitboxes,>"/etc/init.d/smb start" reports OK for both nmbd and smbd, but aninstant>later smbd stops running, with no errors reported - just fails, nomatter>what logging level is requested of it. Also, "service smb start" fails. > >On the other hand, "smbd -D" starts and runs smbd just fine, if donefrom>a >console. Also "sh /etc/init.d/smb start" runs it just fine, if from a >console. (sh = bash on CentOS, and the smb script itself specifies >/bin/sh.)That feels as if it could be an SELinux problem. If your initscript has been edited and picked up the wrong context, smbd will not have all the permissions it normally gets. Try ls -Z /etc/rc.d/init.d/smb restorecon -v /etc/rc.d/init.d/smb Moray. "To err is human.? To purr, feline"
On Thu, May 27, 2010 at 1:16 AM, Moray Henderson < Moray.Henderson at ict-software.org> wrote:> Whit Blauvelt wrote: > >With smbd Version 3.0.33-3.14.el5 on two different CentOS 5.4 64-bit > boxes, > >"/etc/init.d/smb start" reports OK for both nmbd and smbd, but an > instant > >later smbd stops running, with no errors reported - just fails, no > matter > >what logging level is requested of it. Also, "service smb start" fails. > > > >On the other hand, "smbd -D" starts and runs smbd just fine, if done > from > >a > >console. Also "sh /etc/init.d/smb start" runs it just fine, if from a > >console. (sh = bash on CentOS, and the smb script itself specifies > >/bin/sh.) > > That feels as if it could be an SELinux problem. If your initscript has > been edited and picked up the wrong context, smbd will not have all the > permissions it normally gets. Try > > ls -Z /etc/rc.d/init.d/smb > restorecon -v /etc/rc.d/init.d/smb > > > Moray. > "To err is human. To purr, feline" > >To test if it is selinux you might try with selinux set to permissive. I had all kinds of troubles getting samba 3.0.33 working on centos 5.4, 64-bit until I tried that. Good luck.