?
Solved

How to make Samba mount on boot

Posted on 2006-05-29
6
Medium Priority
?
276 Views
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.
0
Comment
Question by:dancablam
6 Comments
 
LVL 26

Assisted Solution

by:jar3817
jar3817 earned 400 total points
ID: 16784801
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
0
 
LVL 1

Accepted Solution

by:
rich911 earned 800 total points
ID: 16785213
or you could add the following to /etc/fstab file

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

Assisted Solution

by:marxy
marxy earned 400 total points
ID: 16785271
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.
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 1

Expert Comment

by:rich911
ID: 16786109
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.
0
 
LVL 19

Assisted Solution

by:alextoft
alextoft earned 400 total points
ID: 16786210
And if you don't want your password plastering all over the fstab file, you can use:

credentials=/home/username/.smbpassword

instead :)
0
 
LVL 3

Author Comment

by:dancablam
ID: 16786409
Thank you all for your excellent assistance!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Loops Section Overview
Suggested Courses
Course of the Month16 days, 4 hours left to enroll

850 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