Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-12-2007, 03:42 PM   #1
LQ Newbie
Registered: Oct 2007
Posts: 2

Rep: Reputation: 0
Setting up fstab to mount smbfs shares on RH ES

Hi all, attempting to get a Red Hat Enterprise box to mount smbfs shares from a NAS device on boot.

Standard mount works fine (ie. mount -t smbfs -o username=username,password=password //Server/Share mountpoint)

I am concerned at all the different syntax for mounting in fstab that I have seen from various sources. I'd really rather not get a random call 3 months from now when someone reboots this Red Hat box and find out that my fstab config was screwy.

Currently it looks like this:

//Server/share /mnt/mountpoint smbfs -o username=username,password=password
//Server/othershare /mnt/othermountpoint smbfs -o username=username,password=password

Am I righteous here?

Last edited by Artalis; 10-12-2007 at 03:54 PM.
Old 10-12-2007, 09:08 PM   #2
David the H.
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
You shouldn't put user passwords directly in the fstab file. That's a major security risk. Use a credentials file instead.

In each users $HOME partition, create a text file with the username and password in it, like so:

username = <value>
password = <value>

Then just add "credentials=<filename>" to your mount options. Whenever the mount command is called, it will grab the password information from the file.

As for other options, you're right in not just taking whatever you find off the web. You should read the man pages instead and figure out which options you actually need.

Here's a copy of the smbmount(8) man page:
Most, if not all, of the options should also work in fstab.

And don't forget "man mount" and "man fstab" as well.
Old 10-15-2007, 10:20 AM   #3
LQ Newbie
Registered: Oct 2007
Posts: 2

Original Poster
Rep: Reputation: 0
I've read the man pages and they are little or no help to me (0 Linux experience) I was hoping for some syntax examples but there appears to be a real lack of that in the man pages I've been reading throughout.

I am aware of the security ramifications but I was hoping to get the actual MOUNT working, then worry about security, rather than having a multi-part problem to troubleshoot, all at once.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why fstab doesn't mount smbfs rjkfsm Linux - Newbie 3 12-16-2011 01:23 PM
Delay fstab mount of smbfs during boot Iron City Linux - General 7 01-21-2009 03:58 PM
fstab smbfs mount question. qeny Linux - Software 4 02-14-2007 11:27 PM
mounting an smbfs share using mount vs /etc/fstab sichen Linux - Networking 4 08-13-2004 07:40 PM
can anyone with rh9 mount multiple shares with smbfs in fstab? Falafel Linux - Networking 2 11-15-2003 09:15 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:45 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration