I have changed the config file, but changes are not appearing. Do I have to restart Samba?
4 Answers
sudo /etc/init.d/samba restart
should be all you need to do.

- 1,735
- 1
- 14
- 17
-
sudo service samba restart `sudo service samba restart`. Looks like windows :)) – kolypto Dec 09 '09 at 07:16
It looks like ubuntu has changed the name of the service you need to restart to smbd. For me (on ubuntu server 12.04) the correct command was
sudo service smbd restart
Editor's notes: I can't comment, or this would be a comment to the above answer. I realize this is an old question, but I landed here looking for the very same thing, and the comment was enough of a hint to me to figure out the rest, so I thought I'd record the update.

- 249
- 5
- 15
In a production environment it's not advisable to restart a service for just configuration changes. I suggest you go with:
sudo service smbd reload
Whats the advantage of reload?
Reload will just update the configuration changes, with out restarting the service.

- 24,484
- 8
- 79
- 100

- 86
- 1
- 4
In the latest version in 2021, the following will work perfectly:
sudo /etc/init.d/smbd restart
Please see that the only difference is in the pid file name.

- 11
- 1