I have samba installed on ubuntu 14.04 and I want it to start on system boot. Anybody help?
Asked
Active
Viewed 1.7k times
1
-
Did you checked this ? http://askubuntu.com/questions/48321/how-do-i-start-applications-automatically-on-login – Gaurav Gandhi Oct 08 '15 at 09:28
2 Answers
2
Simply run the following command in a terminal :
sudo update-rc.d samba defaults

hg8
- 13,462
-
I believe it is now called
smbd
instead ofsamba
, at least in my Ubuntu 18.04... – mjbeyeler Jun 01 '22 at 12:32
0
You can try the following ways. I don't know about samba, but it worked for me in running some other services.
There are three ways to do it.
Alternative 1# Creating New Script in /etc/init.d/
We can create new startup service by creating a new script inside the init.d
directory
Note: Donot forget to make the script executable
Alternative 2# By adding commands to /etc/rc.local
The technique is illustrated by the following example :
vi /etc/rc.local
/path/to/my/script.sh || exit 1
exit 0
Alternative 3# The third way to achieve that is by adding an Upstart Job
Create /etc/init/myjob.conf
Add the following entries to the file
description "my Job"
start on startup
task
exec /path/to/my/script.sh
Here in description you can use any name. In the path of exec
give the path of the samba binary.

Bidyut
- 759
- 7
- 14