10

This question has been asked before, but I've tried all the suggested approaches, short of uninstalling.

sudo service smbd stop

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

sudo update-rc.d -f smbd remove

all work until the next reboot. I've even removed the init conf file, and it still starts. How do I disable them until I wish to use them?

Huaidan
  • 351

1 Answers1

16

This is Ubuntu 17.04 and it uses systemd to control and maintain its service so try these commands:

sudo systemctl stop smbd
sudo systemctl disable smbd

And I believe that should stop it first then prevent it from restarting at reboot. To permanently disable it and prevent it from being started even when needed by another service or task use:

sudo systemctl mask smbd

See the link provided by jfs for more information on this

George Udosen
  • 37,534