1

I have samba installed on ubuntu 14.04 and I want it to start on system boot. Anybody help?

2 Answers2

2

Simply run the following command in a terminal :

sudo update-rc.d samba defaults
hg8
  • 13,462
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