Samba/how-to/restart

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< Samba‎ | how-to
Jump to navigation Jump to search

How to restart the Samba server

Note: This page is somewhat out of date, though mostly still not wrong.

If you have Fedora Core, there's a convenient little "services" application you can use to restart Samba and several dozen other services. For the rest of us, however, there's a command you have to execute from a root terminal.

On Ubuntu, and probably other Debian-based systems:

sudo restart smbd

Prior to Ubuntu 10.04 or so (maybe 9?), this was:

sudo /etc/init.d/samba restart

On SuSE 10.0 and Fedora Core 4:

sudo /etc/init.d/smb restart

This will ask for a password; type in your password (not root's) unless you have reconfigured your sudo setup. (This assumes you have sudo privileges; if not, su to get root access and then type the rest of the command without the "sudo".)

On Red Hat, I'm told the command would be:

/sbin/samba restart

(Possibly substituting "smb" for "samba"; ls the directory in question to find a list of services.) This is the same general technique used for restarting services, which should itself probably be documented somewhere. (The Samba share configuration GUI program really ought to have a "restart Samba server" button, though, even if it does this automatically when you change parameters -- because there is no way to know if it is doing this otherwise.)