LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Setting up fstab to mount smbfs shares on RH ES (https://www.linuxquestions.org/questions/linux-newbie-8/setting-up-fstab-to-mount-smbfs-shares-on-rh-es-591366/)

Artalis 10-12-2007 02:42 PM

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?

David the H. 10-12-2007 08:08 PM

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: http://linux.die.net/man/8/smbmount
Most, if not all, of the options should also work in fstab.

And don't forget "man mount" and "man fstab" as well.

Artalis 10-15-2007 09:20 AM

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.


All times are GMT -5. The time now is 06:46 PM.