How to restart samba server?












90















Sorry this is a little embarassing but I'm trying to set up my own server for the first time. I found great tutorial online.



http://www.intac.net/build-your-own-server/



I'm stuck at the 2nd to last line of step 4. Apparently there is no samba directory in init.d.



Why isn't there a samba directory in init.d?



Would the following work?



# sudo restart smbd
# sudo restart nmdb









share|improve this question




















  • 1





    If your # means you are logged in as superuser, then you don't need to run the commands with sudo, else the commands you mentioned are fine.

    – htorque
    Feb 5 '12 at 12:10











  • If you're embarrassed as a first timer, what does that make me when I've had a server running for years and needed this question :)

    – Sridhar-Sarnobat
    Dec 18 '16 at 6:40
















90















Sorry this is a little embarassing but I'm trying to set up my own server for the first time. I found great tutorial online.



http://www.intac.net/build-your-own-server/



I'm stuck at the 2nd to last line of step 4. Apparently there is no samba directory in init.d.



Why isn't there a samba directory in init.d?



Would the following work?



# sudo restart smbd
# sudo restart nmdb









share|improve this question




















  • 1





    If your # means you are logged in as superuser, then you don't need to run the commands with sudo, else the commands you mentioned are fine.

    – htorque
    Feb 5 '12 at 12:10











  • If you're embarrassed as a first timer, what does that make me when I've had a server running for years and needed this question :)

    – Sridhar-Sarnobat
    Dec 18 '16 at 6:40














90












90








90


24






Sorry this is a little embarassing but I'm trying to set up my own server for the first time. I found great tutorial online.



http://www.intac.net/build-your-own-server/



I'm stuck at the 2nd to last line of step 4. Apparently there is no samba directory in init.d.



Why isn't there a samba directory in init.d?



Would the following work?



# sudo restart smbd
# sudo restart nmdb









share|improve this question
















Sorry this is a little embarassing but I'm trying to set up my own server for the first time. I found great tutorial online.



http://www.intac.net/build-your-own-server/



I'm stuck at the 2nd to last line of step 4. Apparently there is no samba directory in init.d.



Why isn't there a samba directory in init.d?



Would the following work?



# sudo restart smbd
# sudo restart nmdb






samba






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 25 '14 at 19:59









Braiam

52.3k20138223




52.3k20138223










asked Nov 14 '11 at 7:45









user784637user784637

3,595133653




3,595133653








  • 1





    If your # means you are logged in as superuser, then you don't need to run the commands with sudo, else the commands you mentioned are fine.

    – htorque
    Feb 5 '12 at 12:10











  • If you're embarrassed as a first timer, what does that make me when I've had a server running for years and needed this question :)

    – Sridhar-Sarnobat
    Dec 18 '16 at 6:40














  • 1





    If your # means you are logged in as superuser, then you don't need to run the commands with sudo, else the commands you mentioned are fine.

    – htorque
    Feb 5 '12 at 12:10











  • If you're embarrassed as a first timer, what does that make me when I've had a server running for years and needed this question :)

    – Sridhar-Sarnobat
    Dec 18 '16 at 6:40








1




1





If your # means you are logged in as superuser, then you don't need to run the commands with sudo, else the commands you mentioned are fine.

– htorque
Feb 5 '12 at 12:10





If your # means you are logged in as superuser, then you don't need to run the commands with sudo, else the commands you mentioned are fine.

– htorque
Feb 5 '12 at 12:10













If you're embarrassed as a first timer, what does that make me when I've had a server running for years and needed this question :)

– Sridhar-Sarnobat
Dec 18 '16 at 6:40





If you're embarrassed as a first timer, what does that make me when I've had a server running for years and needed this question :)

– Sridhar-Sarnobat
Dec 18 '16 at 6:40










4 Answers
4






active

oldest

votes


















136














Start



sudo service smbd start


Stop



sudo service smbd stop


Restart



sudo service smbd restart





share|improve this answer





















  • 3





    Why not use the Upstart syntax like mentioned by the user?

    – htorque
    Feb 5 '12 at 12:09






  • 1





    Nothing wrong with it. I'm just lazy and sudo <start|stop|status|restart|reload> <job> is just shorter. ;)

    – htorque
    Feb 5 '12 at 18:55











  • @htorque I cant really remember why I made the recommendation like this also, maybe I seen something that ticked me off and I recommended this way, or its just my brain thinking about services all the time. Thx for the input! ;)

    – Bruno Pereira
    Feb 5 '12 at 19:08








  • 2





    FYI, I had to use samba instead of smbd in my command line.

    – Ross Rogers
    Oct 31 '13 at 16:51






  • 1





    I am using Kali linux and I too, had to use samba instead of smbd

    – GaurabDahal
    Jul 29 '15 at 11:38



















12














You can also do this way:



Start



sudo /etc/init.d/smbd start


Stop



sudo /etc/init.d/smbd stop


Restart



sudo /etc/init.d/smbd restart




If you got an error, try using these commends this nmbd instead.






share|improve this answer

































    10














    you may also try this :



    check the name of the service:



    service --status-all


    restart the service



    sudo service samba restart





    share|improve this answer

































      9














      Starting with 15.04 and systemd, the command is systemctl restart smbd






      share|improve this answer





















      • 3





        the service is smbd, not smdb

        – fireb86
        Mar 11 '18 at 15:01











      • +1 for updating an old question. But Ubuntu 15.04 was first version to use systemd.

        – WinEunuuchs2Unix
        Mar 11 '18 at 21:41













      • Duh. Info online is so.. contradicting. I guess like it might be because back then it hadn't be a totally full 100% switch.

        – mirh
        Mar 13 '18 at 17:30











      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f79078%2fhow-to-restart-samba-server%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      136














      Start



      sudo service smbd start


      Stop



      sudo service smbd stop


      Restart



      sudo service smbd restart





      share|improve this answer





















      • 3





        Why not use the Upstart syntax like mentioned by the user?

        – htorque
        Feb 5 '12 at 12:09






      • 1





        Nothing wrong with it. I'm just lazy and sudo <start|stop|status|restart|reload> <job> is just shorter. ;)

        – htorque
        Feb 5 '12 at 18:55











      • @htorque I cant really remember why I made the recommendation like this also, maybe I seen something that ticked me off and I recommended this way, or its just my brain thinking about services all the time. Thx for the input! ;)

        – Bruno Pereira
        Feb 5 '12 at 19:08








      • 2





        FYI, I had to use samba instead of smbd in my command line.

        – Ross Rogers
        Oct 31 '13 at 16:51






      • 1





        I am using Kali linux and I too, had to use samba instead of smbd

        – GaurabDahal
        Jul 29 '15 at 11:38
















      136














      Start



      sudo service smbd start


      Stop



      sudo service smbd stop


      Restart



      sudo service smbd restart





      share|improve this answer





















      • 3





        Why not use the Upstart syntax like mentioned by the user?

        – htorque
        Feb 5 '12 at 12:09






      • 1





        Nothing wrong with it. I'm just lazy and sudo <start|stop|status|restart|reload> <job> is just shorter. ;)

        – htorque
        Feb 5 '12 at 18:55











      • @htorque I cant really remember why I made the recommendation like this also, maybe I seen something that ticked me off and I recommended this way, or its just my brain thinking about services all the time. Thx for the input! ;)

        – Bruno Pereira
        Feb 5 '12 at 19:08








      • 2





        FYI, I had to use samba instead of smbd in my command line.

        – Ross Rogers
        Oct 31 '13 at 16:51






      • 1





        I am using Kali linux and I too, had to use samba instead of smbd

        – GaurabDahal
        Jul 29 '15 at 11:38














      136












      136








      136







      Start



      sudo service smbd start


      Stop



      sudo service smbd stop


      Restart



      sudo service smbd restart





      share|improve this answer















      Start



      sudo service smbd start


      Stop



      sudo service smbd stop


      Restart



      sudo service smbd restart






      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Nov 14 '11 at 8:16

























      answered Nov 14 '11 at 7:49









      Bruno PereiraBruno Pereira

      60.4k26179209




      60.4k26179209








      • 3





        Why not use the Upstart syntax like mentioned by the user?

        – htorque
        Feb 5 '12 at 12:09






      • 1





        Nothing wrong with it. I'm just lazy and sudo <start|stop|status|restart|reload> <job> is just shorter. ;)

        – htorque
        Feb 5 '12 at 18:55











      • @htorque I cant really remember why I made the recommendation like this also, maybe I seen something that ticked me off and I recommended this way, or its just my brain thinking about services all the time. Thx for the input! ;)

        – Bruno Pereira
        Feb 5 '12 at 19:08








      • 2





        FYI, I had to use samba instead of smbd in my command line.

        – Ross Rogers
        Oct 31 '13 at 16:51






      • 1





        I am using Kali linux and I too, had to use samba instead of smbd

        – GaurabDahal
        Jul 29 '15 at 11:38














      • 3





        Why not use the Upstart syntax like mentioned by the user?

        – htorque
        Feb 5 '12 at 12:09






      • 1





        Nothing wrong with it. I'm just lazy and sudo <start|stop|status|restart|reload> <job> is just shorter. ;)

        – htorque
        Feb 5 '12 at 18:55











      • @htorque I cant really remember why I made the recommendation like this also, maybe I seen something that ticked me off and I recommended this way, or its just my brain thinking about services all the time. Thx for the input! ;)

        – Bruno Pereira
        Feb 5 '12 at 19:08








      • 2





        FYI, I had to use samba instead of smbd in my command line.

        – Ross Rogers
        Oct 31 '13 at 16:51






      • 1





        I am using Kali linux and I too, had to use samba instead of smbd

        – GaurabDahal
        Jul 29 '15 at 11:38








      3




      3





      Why not use the Upstart syntax like mentioned by the user?

      – htorque
      Feb 5 '12 at 12:09





      Why not use the Upstart syntax like mentioned by the user?

      – htorque
      Feb 5 '12 at 12:09




      1




      1





      Nothing wrong with it. I'm just lazy and sudo <start|stop|status|restart|reload> <job> is just shorter. ;)

      – htorque
      Feb 5 '12 at 18:55





      Nothing wrong with it. I'm just lazy and sudo <start|stop|status|restart|reload> <job> is just shorter. ;)

      – htorque
      Feb 5 '12 at 18:55













      @htorque I cant really remember why I made the recommendation like this also, maybe I seen something that ticked me off and I recommended this way, or its just my brain thinking about services all the time. Thx for the input! ;)

      – Bruno Pereira
      Feb 5 '12 at 19:08







      @htorque I cant really remember why I made the recommendation like this also, maybe I seen something that ticked me off and I recommended this way, or its just my brain thinking about services all the time. Thx for the input! ;)

      – Bruno Pereira
      Feb 5 '12 at 19:08






      2




      2





      FYI, I had to use samba instead of smbd in my command line.

      – Ross Rogers
      Oct 31 '13 at 16:51





      FYI, I had to use samba instead of smbd in my command line.

      – Ross Rogers
      Oct 31 '13 at 16:51




      1




      1





      I am using Kali linux and I too, had to use samba instead of smbd

      – GaurabDahal
      Jul 29 '15 at 11:38





      I am using Kali linux and I too, had to use samba instead of smbd

      – GaurabDahal
      Jul 29 '15 at 11:38













      12














      You can also do this way:



      Start



      sudo /etc/init.d/smbd start


      Stop



      sudo /etc/init.d/smbd stop


      Restart



      sudo /etc/init.d/smbd restart




      If you got an error, try using these commends this nmbd instead.






      share|improve this answer






























        12














        You can also do this way:



        Start



        sudo /etc/init.d/smbd start


        Stop



        sudo /etc/init.d/smbd stop


        Restart



        sudo /etc/init.d/smbd restart




        If you got an error, try using these commends this nmbd instead.






        share|improve this answer




























          12












          12








          12







          You can also do this way:



          Start



          sudo /etc/init.d/smbd start


          Stop



          sudo /etc/init.d/smbd stop


          Restart



          sudo /etc/init.d/smbd restart




          If you got an error, try using these commends this nmbd instead.






          share|improve this answer















          You can also do this way:



          Start



          sudo /etc/init.d/smbd start


          Stop



          sudo /etc/init.d/smbd stop


          Restart



          sudo /etc/init.d/smbd restart




          If you got an error, try using these commends this nmbd instead.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jun 12 '17 at 2:13









          Community

          1




          1










          answered Feb 5 '12 at 12:01









          One ZeroOne Zero

          17.5k2272106




          17.5k2272106























              10














              you may also try this :



              check the name of the service:



              service --status-all


              restart the service



              sudo service samba restart





              share|improve this answer






























                10














                you may also try this :



                check the name of the service:



                service --status-all


                restart the service



                sudo service samba restart





                share|improve this answer




























                  10












                  10








                  10







                  you may also try this :



                  check the name of the service:



                  service --status-all


                  restart the service



                  sudo service samba restart





                  share|improve this answer















                  you may also try this :



                  check the name of the service:



                  service --status-all


                  restart the service



                  sudo service samba restart






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Aug 11 '14 at 1:32









                  Seth

                  35k27112165




                  35k27112165










                  answered Aug 10 '14 at 22:42









                  derdonnderdonn

                  10112




                  10112























                      9














                      Starting with 15.04 and systemd, the command is systemctl restart smbd






                      share|improve this answer





















                      • 3





                        the service is smbd, not smdb

                        – fireb86
                        Mar 11 '18 at 15:01











                      • +1 for updating an old question. But Ubuntu 15.04 was first version to use systemd.

                        – WinEunuuchs2Unix
                        Mar 11 '18 at 21:41













                      • Duh. Info online is so.. contradicting. I guess like it might be because back then it hadn't be a totally full 100% switch.

                        – mirh
                        Mar 13 '18 at 17:30
















                      9














                      Starting with 15.04 and systemd, the command is systemctl restart smbd






                      share|improve this answer





















                      • 3





                        the service is smbd, not smdb

                        – fireb86
                        Mar 11 '18 at 15:01











                      • +1 for updating an old question. But Ubuntu 15.04 was first version to use systemd.

                        – WinEunuuchs2Unix
                        Mar 11 '18 at 21:41













                      • Duh. Info online is so.. contradicting. I guess like it might be because back then it hadn't be a totally full 100% switch.

                        – mirh
                        Mar 13 '18 at 17:30














                      9












                      9








                      9







                      Starting with 15.04 and systemd, the command is systemctl restart smbd






                      share|improve this answer















                      Starting with 15.04 and systemd, the command is systemctl restart smbd







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Mar 13 '18 at 17:30

























                      answered Jul 26 '17 at 19:19









                      mirhmirh

                      21924




                      21924








                      • 3





                        the service is smbd, not smdb

                        – fireb86
                        Mar 11 '18 at 15:01











                      • +1 for updating an old question. But Ubuntu 15.04 was first version to use systemd.

                        – WinEunuuchs2Unix
                        Mar 11 '18 at 21:41













                      • Duh. Info online is so.. contradicting. I guess like it might be because back then it hadn't be a totally full 100% switch.

                        – mirh
                        Mar 13 '18 at 17:30














                      • 3





                        the service is smbd, not smdb

                        – fireb86
                        Mar 11 '18 at 15:01











                      • +1 for updating an old question. But Ubuntu 15.04 was first version to use systemd.

                        – WinEunuuchs2Unix
                        Mar 11 '18 at 21:41













                      • Duh. Info online is so.. contradicting. I guess like it might be because back then it hadn't be a totally full 100% switch.

                        – mirh
                        Mar 13 '18 at 17:30








                      3




                      3





                      the service is smbd, not smdb

                      – fireb86
                      Mar 11 '18 at 15:01





                      the service is smbd, not smdb

                      – fireb86
                      Mar 11 '18 at 15:01













                      +1 for updating an old question. But Ubuntu 15.04 was first version to use systemd.

                      – WinEunuuchs2Unix
                      Mar 11 '18 at 21:41







                      +1 for updating an old question. But Ubuntu 15.04 was first version to use systemd.

                      – WinEunuuchs2Unix
                      Mar 11 '18 at 21:41















                      Duh. Info online is so.. contradicting. I guess like it might be because back then it hadn't be a totally full 100% switch.

                      – mirh
                      Mar 13 '18 at 17:30





                      Duh. Info online is so.. contradicting. I guess like it might be because back then it hadn't be a totally full 100% switch.

                      – mirh
                      Mar 13 '18 at 17:30


















                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f79078%2fhow-to-restart-samba-server%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      How to make a Squid Proxy server?

                      Is this a new Fibonacci Identity?

                      19世紀