Discussion Locked

Automatically start samba

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

How do I have the samba server start automatically
whenever the linux machine is booted? I have no
problems running samba, just want it to start if or
when the linux is rebooted or restarted.
I'm using RedHat 7.1 Professional Server and I'm
fairly new at using linux.

7 replies

by noorazman

login as root
type ntsysv, press enter
select the all services u want to start during boot
exit ntsysv
reboot the machine

Hope this might help.

by bruye

Reboot is not right.
As root print "/etc/init.d/smb start"
This comand starts samba daemon.

Also U can change start scripts by hands.
In /etc/inittab find line "id:X:initdefault:", where X may be 3 or 5 (it`s default runlevel).
In /etc/rc.d/rcX.d , where X - 3 or 5 (see above) find something like this: K96smb and rename it S96smb. Number 96 may be not 96 :-).

Next reboot samba will start automatically.
I hope I help U understanding how daemons starts.

by cdargent

If 7.1 has chkconfig then you could add it to that
chkconfig --levels 345 smb on
that will make smb start on run levels 3,4&5
think chkconfig is in /sbin if not then /usr/sbin
i use chkconfig a lot but thats in 7.3 and 8 so see if 7.1 has it andstart using that :)

This discussion is closed to new replies.