How to make Samba mount on boot

Posted on 2006-05-29
Last Modified: 2010-03-17
What are the steps needed to automount a SAMBA connection when my linux box starts up? I'm using FC4.
Question by:dancablam
    LVL 26

    Assisted Solution

    you can just put the command in the /etc/rc.d/rc.local file:

    mount -t smbfs -o username=blah,password=blah,rw //server/share /mount/point
    LVL 1

    Accepted Solution

    or you could add the following to /etc/fstab file

    //server/share /mount/point smbfs username=blah,password=blah,rw
    LVL 8

    Assisted Solution

    A little correction for rich911.
    File of /etc/fstab should be made by properly manner.
    Each filesystem is described on a separate line; fields on each line are separated
    by tabs or spaces.  Lines starting with ’#’ are comments.  
    The order of  records  in  fstab  is  important. Moreover there are SIX fields must be
    in the /etc/fstab.

    So th right string for SAMBA mount would be

    //server/share /mount/point smbfs username=blah,password=blah,rw 0 0

    Two zeros have some sense.
    LVL 1

    Expert Comment

    according to the fstab man page, if the 5th and 6th fields are missing they default to zeros. Though if you include them they should be both zeros in this case as marxy says.
    LVL 19

    Assisted Solution

    And if you don't want your password plastering all over the fstab file, you can use:


    instead :)
    LVL 3

    Author Comment

    Thank you all for your excellent assistance!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now