How to restart samba server?












87















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
















87















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














87












87








87


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

52k20136221




52k20136221










asked Nov 14 '11 at 7:45









user784637user784637

3,505133653




3,505133653








  • 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










5 Answers
5






active

oldest

votes


















132














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



















11














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

































    9














    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

































      8














      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



















      0














      I had to do sudo smbd in order to start samba.






      share|improve this answer








      New contributor




      wyatt jackson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















        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

























        5 Answers
        5






        active

        oldest

        votes








        5 Answers
        5






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        132














        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
















        132














        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














        132












        132








        132







        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

        60k26179208




        60k26179208








        • 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













        11














        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






























          11














          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




























            11












            11








            11







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




            17.4k2272106























                9














                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














                  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












                    9








                    9







                    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

                    34.7k27112164




                    34.7k27112164










                    answered Aug 10 '14 at 22:42









                    derdonnderdonn

                    9111




                    9111























                        8














                        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
















                        8














                        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














                        8












                        8








                        8







                        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

                        20924




                        20924








                        • 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











                        0














                        I had to do sudo smbd in order to start samba.






                        share|improve this answer








                        New contributor




                        wyatt jackson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.

























                          0














                          I had to do sudo smbd in order to start samba.






                          share|improve this answer








                          New contributor




                          wyatt jackson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.























                            0












                            0








                            0







                            I had to do sudo smbd in order to start samba.






                            share|improve this answer








                            New contributor




                            wyatt jackson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.










                            I had to do sudo smbd in order to start samba.







                            share|improve this answer








                            New contributor




                            wyatt jackson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.









                            share|improve this answer



                            share|improve this answer






                            New contributor




                            wyatt jackson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.









                            answered 19 mins ago









                            wyatt jacksonwyatt jackson

                            1




                            1




                            New contributor




                            wyatt jackson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.





                            New contributor





                            wyatt jackson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.






                            wyatt jackson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.






























                                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

                                香粉寮

                                GameSpot