How to disable Samba on Ubuntu 12.04?

Solution 1:

Type the following command to stop smbd service.

To Stop Samba:

sudo service smbd stop

or

sudo /etc/init.d/smbd stop

To Start Samba:

sudo service smbd start

or

sudo /etc/init.d/smbd start

To remove it from rc.d file use the command

sudo update-rc.d -f smbd remove

To restore it to rc.d use the command

sudo update-rc.d smbd defaults

Solution 2:

Use this command to disable the Samba service:

update-rc.d -f smbd defaults 

Or use this for the Upstart service:

echo 'manual' | sudo tee /etc/init/smbd.conf

Or you can install and check for services:

apt-get install rcconf