Click to See Complete Forum and Search --> : run at startup (samba)


lsaunders
07-29-2002, 06:19 AM
Hi, just wondering how/where I go about getting something to run at startup.

More specifically Samba. I know smbd and nmbd need to run, which you can do using the filename as commands or with 'service smb start'. But how do I do this automagically at startup?

thanks
lee

Redhat 7.3 - Win98SE - VB 6.0 Enterprise

Elijah
07-29-2002, 09:22 AM
edit /etc/rc.d/rc.local

as for the samba thing, I believe someone has already posted this thing somewhere in this forum. It's always best to search the forums first before posting, you'll find the answer faster that way :)

chikn
07-29-2002, 09:42 AM
Im sure redhat has a control panel that (or linuxconf) that will allow you to select what services you want to start at boot.

jaffo
07-29-2002, 12:29 PM
lsaunders ,

I was able to get samba running at startup just by doing this:

in /etc/rc.d/rc3.d create a symbolic link from S91smb to /etc/rc.d/init.d/smb

i believe the syntax I used was:
ln -s /etc/rc.d/init.d/smb S91smb

I found this info in this document:
http://www.tldp.org/HOWTO/SMB-HOWTO-5.html

In that document, it was this line that caught my eye:

"To run the daemons from the system startup scripts, put the following script in file called /etc/rc.d/init.d/smb (for most distributions) and symbolically link it to the files specified in the comments: "

And below that it had this listed:
---
# The following files should be synbolic links to this file:
# symlinks: /etc/rc.d/rc1.d/K35smb (Kills SMB services on shutdown)
# /etc/rc.d/rc3.d/S91smb (Starts SMB services in multiuser mode)
# /etc/rc.d/rc6.d/K35smb (Kills SMB services on reboot
---

Well I checked in those directories (rc1.d, rc3.d, and rc6.d) - rc1.d/K35smb already existed, and rc6.d/K35smb already existed - all I had to do was create the S91smb file in the rc3.d directory.

Probably more of an explanation than you needed, but I wanted to make sure I got my point across :)

Hope this helped.

windoze killa
07-29-2002, 05:28 PM
Not sure but I think if you boot into gui you might want to do a similar link for /etc/rc.d/rc5.d

lsaunders
07-29-2002, 06:48 PM
Thanks for the response guys, I went through and made the changes, but couldn't work out why it wasn't starting. It does indeed need the symlink to S91smb in rc5.d, thankyou Windoze Killa.

So it's now loading all hoopy :)

lee

windoze killa
07-29-2002, 07:45 PM
You are welcome.

I just thought I would throw that one in as I guessed you might be an ex windoze user and like me want to use a gui interface. Most of the people on here seem to offer great assistance so long as you are using a terminal. Not knocking their help, it is invaluable but I just wish some would realise that if we wanted to type things in on a black screen with exciting white writing we would buy an XT and run dos 3.3.

I know there are a few thing that must be run from a terminal but not that many. Happy gui'ing.

lsaunders
07-29-2002, 07:54 PM
Hehe, yeah that's so true. Using terminals and such with no GUI is a little difficult when you are just starting. Once you know the shortcuts and wotnot I guess it's easier, but until I do I'll stick to the "pointy clicky things" and save my eyes.

I need a gui on here anyhow, because its upto the mrs to restart the thing if it goes balls-up when im out, and she's a diehard M$'er :P

Anyhow, back to trying to get samba to do what I want :)

cheers
lee

PLBlaze
07-29-2002, 08:02 PM
You could just simply put this in /etc/rc.d/rc.local:

echo "Starting SAMBA ..."
nmbd -D &
smbd -D &

windoze killa
07-29-2002, 09:04 PM
Originally posted by lsaunders

I need a gui on here anyhow, because its upto the mrs to restart the thing if it goes balls-up when im out, and she's a diehard M$'er :P



Thats the main reason I need a gui too. I would be in deep @#$% if the wife was presented with a terminal screen saying login:

"Get this crap of my computer."

I can hear it echoing around the room now.

cowanrl
07-30-2002, 12:51 PM
The biggest problem with GUI configuration programs is that there are just too many of them. Each Linux distribution seems to have their own GUI for configuring Networks, Sound, Samba, just about everything. Nobody can be familiar with all of them.
Usually instructions on how to configure something from the command line will work on any distro of Linux.

windoze killa
07-30-2002, 05:17 PM
Originally posted by cowanrl
The biggest problem with GUI configuration programs is that there are just too many of them. Each Linux distribution seems to have their own GUI for configuring Networks, Sound, Samba, just about everything. Nobody can be familiar with all of them.
Usually instructions on how to configure something from the command line will work on any distro of Linux.

This is true to an extent. So long as each distro puts files in the same place which they don't.