-   Debian (
-   -   samba auto start on reboot (

vMatthews 11-08-2005 03:36 PM

samba auto start on reboot
I am using Sarge.
How do you get Samba to start automatically when you reboot?

dastrike 11-08-2005 03:40 PM

Samba starts automatically on reboot if you installed it through apt-get and haven't manually removed the symlinks from the rc directories.


ls -l /etc/rc2.d/*samba
should report something like

lrwxrwxrwx  1 root root 15 2004-06-10 22:42 /etc/rc2.d/S20samba -> ../init.d/samba
If it doesn't, I don't know why, try recreating the symlink so it looks like that then.

vMatthews 11-08-2005 03:45 PM

Thanks for the quick response!!
It says:
lrwxrwxrwx 1 root root 6 2005-10-11 21:45 /etc/rc2.d/s91samba -> /samba

danimalz 11-08-2005 06:24 PM

You can use


to manage the startup of services.

Ive heard that it's not a good idea to use anymore, but im not sure why...

(perhaps someone can tell us..!)

farslayer 11-08-2005 06:40 PM

man update-rc.d


When run with either the defaults, start, or stop options, update-rc.d makes links /etc/rcrun-
level.d/[SK]NNname pointing to the script /etc/init.d/name,

If any files /etc/rcrunlevel.d/[SK]??name already exist then update-rc.d does nothing. This is so
that the system administrator can rearrange the links, provided that they leave at least one link
remaining, without having their configuration overwritten.

If defaults is used then update-rc.d will make links to start the service in runlevels 2345 and
stop the service in runlevels 016. By default all the links will have sequence code 20, but this
can be overridden by supplying one NN or two SS and KK arguments; one argument overrides the
sequence code for both start and stop links whereas of two arguments the first overrides the code
for start links and the second that for stop links.

Insert links using the defaults:
update-rc.d foobar defaults

Equivalent command using explicit argument sets:
update-rc.d foobar start 20 2 3 4 5 . stop 20 0 1 6 .

or in your case...

update-rc.d samba start 20 2 3 4 5 . stop 20 0 1 6 .

All times are GMT -5. The time now is 05:36 PM.