Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this output

 user123@Matrix-Server:~$ /etc/init.d/samba stop
    bash: /etc/init.d/samba: No such file or directory
    sputnik@Matrix-Server:~$ sudo /etc/init.d/samba restart
    sudo: /etc/init.d/samba: command not found

 user123@Matrix-Server:~$ sudo apt-get install samba smbfs
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    samba is already the newest version.
    smbfs is already the newest version.
    The following packages were automatically installed and are no longer required:
      linux-headers-2.6.32-19-generic linux-headers-2.6.32-19
    Use 'apt-get autoremove' to remove them.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
share|improve this question
up vote 2 down vote accepted

Samba is composed of two separated daemons:

  • smbd which provides the file and printer sharing services
  • nmbd which provides the NetBIOS-to-IP-address name service

to restart completely samba you need to restart both of them so the correct sequence of commands is

sudo /etc/init.d/smbd restart
sudo /etc/init.d/nmbd restart

or in a more "ubuntish" way

sudo service smbd restart
sudo service nmbd restart
share|improve this answer
Thanks. All the guides out there say to start/stop the "samba" service. I saw the smbd and nmbd but wasn't positive if those were what I needed ... are they new in this version or something? On a related note, how would I check that? – Daniel B. Jun 23 '11 at 1:51
sudo /etc/init.d/samba start

Try that or try

cd /etc/init.d/
sudo ./samba start

If that fails as well reinstall samba:

sudo apt-get install --reinstall samba

And then try restarting it.

share|improve this answer
I checked /etc/init.d directory and see smbd over there and it worked but not samba – John Apr 23 '10 at 4:38
strange. what version of ubuntu? – David Rickman Apr 23 '10 at 10:45

You can also run this on a single line

restart smbd && restart nmbd

If this won't work opt for Fen0x's suggestion.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.