cancel
Showing results for 
Search instead for 
Did you mean: 

Mounting cifs via fstab

Nigel.S
Occasional Advisor

Mounting cifs via fstab

Hi

System = RHEL 5.4 Tikanga

I am able to perform the following command from the command line successfully

mount -t cifs //server/user /home/user/windows -o username=user,password=pass

However when I try to mount using fstab it fails

I have a /home/user/.creds file that includes
username=user
password=pass

And the following line has been added to /etc/fstab

//server/user /home/user/windows cifs credentials=/home/user/.creds,_netdev,soft 0 0

I receive the following error message
mount error 13 = Permission denied

I have also tried adding domain=domain to the .creds file but it still fails, can anybody show some light please
6 REPLIES
Steven E. Protter
Exalted Contributor

Re: Mounting cifs via fstab

Shalom,

Has this system joined the domain?

If not, that could explain these issues.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Nuwan Alwis
Valued Contributor

Re: Mounting cifs via fstab

Hi Nigel,
Did you try this with selinux off.

i suggest you to try this fstab entry with plain text username and password and see if it works so we can go to next level

Good Luck...
NJ
dirk dierickx
Honored Contributor

Re: Mounting cifs via fstab

i'm not a big fan myself of using cifs mountpoints directly in fstab, i use automounter for this. you should check it out as well.
Nigel.S
Occasional Advisor

Re: Mounting cifs via fstab

Hi SELinux is currently turned off.

I can mount it using the fstab with the following line

//server/user /home/user/windows cifs user=user,password=pass,_netdev,soft 0 0

However when I use the line below it still fails

//server/user /home/user/windows cifs credentials=/home/user/.creds,_netdev,soft 0 0

The user owns /home/user/.creds

But I still recieve mount error 13 = Permission denied, any more ideas out there?
Nuwan Alwis
Valued Contributor

Re: Mounting cifs via fstab

Hi,
did you try this with root account's username and password. This seems to me a pure rights issue.

Good Luck...!
Nigel.S
Occasional Advisor

Re: Mounting cifs via fstab

Hi All,

I was able to resolve the issue by just deleting the file and recreating it. Is it a known bug in the latest version of the samba client for x86_64 where the credentials file is not parsed corectly. If you use a hex editor you will be able to see an extra character before the last character in the password.

Hope this helps somebody else