Results 1 to 7 of 7

Thread: How to autostart samba daemon?

  1. #1
    Join Date
    Jul 2008
    Location
    Canada
    Beans
    311
    Distro
    Ubuntu 12.04 Precise Pangolin

    How to autostart samba daemon?

    Hi,

    Using Ubuntu 9.04 x64. I could install and configure samba following various tutorials found by internet seaches. However, each time I reboot the computer, the samba dsamon is stopped. I have to run manually the command below to get it working
    sudo /etc/init.d/samba restart
    Is it samba standard design? How can I make samba start automatically at each reboot?

    Thanks in advance for any help.

  2. #2
    Join Date
    Apr 2008
    Location
    Phoenix, AZ
    Beans
    1,393
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How to autostart samba daemon?

    A forum search should reveal a good number of posts regarding this. Such as the following: http://ubuntuforums.org/showthread.php?t=151004

  3. #3
    Join Date
    Jul 2008
    Location
    Canada
    Beans
    311
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to autostart samba daemon?

    System > Administration > Services:

    The Folder Sharing Service (samba) is checked. And yet I still need to start it manually.

  4. #4
    Join Date
    Mar 2006
    Location
    Saint Petersburg, FL
    Beans
    1,123

    Re: How to autostart samba daemon?

    You can set the default runlevels to start the Samba script at boot with the following command:

    Code:
    sudo update-rc.d samba start 20 2 3 4 5 . stop 19 0 1 6 .
    If for some reason Samba still does not want to start you can change the script boot order so Samba will start later:

    First issue this command:

    Code:
    sudo update-rc.d -f samba remove
    Then follow with the modified boot order runlevels:

    Code:
    sudo update-rc.d samba start 40 2 3 4 5 . stop 19 0 1 6 .
    You can change the boot order to a higher number if needed, all the way up to 99. Type "man update-rc.d" at the prompt for more information. Also look in the directory /etc/rc2.d for a better understanding of boot script ordering.
    For those new to Ubuntu most of your answers can be found at help.ubuntu.com or ubuntuguide.org

  5. #5
    Join Date
    May 2006
    Beans
    27

    Re: How to autostart samba daemon?

    Quote Originally Posted by UranUtan View Post
    System > Administration > Services:

    The Folder Sharing Service (samba) is checked. And yet I still need to start it manually.
    I'm running 9.10, and I don't see Services in the Administration menu anymore... where did it go?

  6. #6
    Join Date
    May 2006
    Beans
    27

    Re: How to autostart samba daemon?

    I was able to use the cmdline + init scripts steps described above to get samba auto-starting, but I'm still curious as to if it's just my system or if the "Services" view disappeared in Karmic / GNOME 2.28. I know I remember seeing and using it in previous versions.

  7. #7
    Join Date
    Jul 2008
    Location
    Canada
    Beans
    311
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to autostart samba daemon?

    Still using Ubuntu 9.04 x64. Some how the instructions in post #4 don't work for me. I have tried a few combinations. The last one was
    Code:
    sudo update-rc.d -f samba remove
    sudo update-rc.d samba start 60 2 3 4 5 . stop 40 0 1 6
    After log in If I type
    Code:
    smbclient -L MyComputerName.local -U%
    I always get an error Connection to MyComputerName.local failed (Error NT_STATUS_CONNECTION_REFUSED)

    The only solution is to type manually sudo /etc/init.d/samba restart after I log in. Could that be because there is something wrong in smb.conf?
    Last edited by UranUtan; January 29th, 2010 at 05:58 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •