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.

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
| 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.

| 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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy