Click to See Complete Forum and Search --> : Startng Samba from INETD
DekJak
05-06-2002, 08:42 AM
Hi Al,
Thanks to your words-of-wisdom and advice I finally got SAMBA to work with my Win2k box.
Thanks!
All works OK so long as I run the sercices by hand "smbd -D". I have added the recommended lines into Services and inetd.conf but they dont seem to start. If I do a ps -c smbd I get nothing back. After I start the beast from the command line I see the pid.
ps for inetd also brings up nothing. Is this OK? or is inetd not starting at boot? If not how do I tell?
Thanks for the advice
Derek
mychl
05-06-2002, 12:06 PM
What distro are you using. I think that you should try using a startup script in your /etc/init.d or /etc/rc.d/init.d
Look in those areas and let me know if you have a file called smb
That's how I start it, I just make a symlink to that init script in my /etc/rc.d/rc5.d that points to /etc/rc.d/init.d/smb and when I'm booting up, it starts the service for me.
DekJak
05-06-2002, 02:12 PM
Hi Mychl,
Distros SuSE 7.3.
No not got that file, but I have notes on what should be in it. My notes say that I should have sym links from rc1.d/K35smb(shutdown), rc3.d/S91smb(start) and rc6.d/K35smb(reboot). Is this correct?
Don't realy know what that all that does, so Inetd seemed the easier option.
Is there a NHF on boot sequence?
Ta for the advice.
DekJak
05-06-2002, 02:20 PM
Sorry about the dumb question about NFH, I just looked and found!
It helps if you read the screen before posting questons!
Sorry!
mychl
05-08-2002, 01:43 PM
OK, suse uses a different init than what I use. As far as I know, you should only need the symlink in rc5.d, as services like that are loaded in runlevel 5 (for me anyway).
You could make an init script called smb that would contain the commands you use to start samba manually, then link that script into your rc5.d directory. That way it should start up for you.
To make the script you write executable, just do chmod +x smb.
You could also put a line in it to echo the fact that samba was started.
Here is an example, you can use it if you want...
#!/bin/sh
#Script to load samba at boot
#/etc/init.d/smb
#Link me to /etc/rc.d/rc5.d/S35smb and
# /etc/rc.d/rc5.d/K35smb
/path/to/smbd -D
echo "smbd started in daemon mode"
/path/to/nmbd -D
echo "nmbd started in daemon mode"
echo "Samba services started"
#
#End of script
I can't believe that suse doesn't put that in your /etc/rc.d/init.d directory for you.
This script is REALLY basic and could use some sprucing up... but should work for what you want to do.
HTH, let's hear how it works