LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 01-17-2012, 07:52 AM   #1
mccartjd
Member
 
Registered: Apr 2008
Posts: 108

Rep: Reputation: 15
Smile Auto Mount using/etc/fstab a remote CIFS Windows share


Using RHEL 5. In my /etc/fstab I have the below entries (the last one is what I entered):
dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
//192.168.10.5/Data /mnt cifs credentials=/etc/sambapasswords,_netdev,uid=testuser,gid=501 0 0

When I view the details of the boot procesess, the result is Mount Error 13 Permission Denied see refer to mount.cifs man page.

I have verified the file /etc/sambapasswords exisist and has the correct authentication data (username=testuser password=Password1.). Can anyone tell me what I need to do to correct this? If I manually mount the share it works fine using testuser and entering the password when prompted.
A million thanks for any help,
Johnn Mac
 
Old 01-17-2012, 09:09 AM   #2
bhuff
LQ Newbie
 
Registered: Sep 2011
Posts: 4

Rep: Reputation: Disabled
Is that host part of a DOMAIN? Did you try using username=<DOMAIN>/username in the credentials file? Another thing that you can try is do do the mount from the command line specifying the credentials directly with the user= password= options until you figure out what username and password combination is required and then modify the sambapasswords file accordingly.
 
Old 01-17-2012, 11:38 AM   #3
mccartjd
Member
 
Registered: Apr 2008
Posts: 108

Original Poster
Rep: Reputation: 15
Smile

I will enter the DOMAIN name and let you know.

Take care,
John
 
Old 01-17-2012, 11:52 AM   #4
mccartjd
Member
 
Registered: Apr 2008
Posts: 108

Original Poster
Rep: Reputation: 15
DOMAIN entry

Sorry that did not work. I will as you suggest, mount from the command line specifying the credentials directly with the user= password= options until you figure out what username and password combination is required and then modify the sambapasswords file accordingly, instead I will refer to the .creds file. The .creds file allows for it to connect but the permissions are not perfect so I will setup a cron job. For more information on .creds see below:

http://opensuse.swerdna.org/susesambacifs.html

Hiding the username and password

Any Linux user on the client machine who chooses to view the file fstab can of course read the {username,password} credentials required to be sent to the server to effect the mount. If this is undesirable, you can put the credentials in a hidden file, e.g. ".creds". For additional security you can make the file ".creds" readable only by the owner (rw----). The entry in fstab then becomes (all on one line):

//192.168.44.100/share /path_to/mount cifs
credentials=/path_to/.creds,_netdev,uid=client_user,gid=users 0 0
And the contents of ".creds" are two lines, like this:

username=server_user
password=secret
 
  


Reply


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
Not accepting the encryped file in fstab to mount win.. share through cifs raju.muppana Linux - Networking 3 06-25-2010 10:58 AM
unable to mount cifs (windows) partition through fstab pratikp Linux - Newbie 5 05-03-2010 06:47 AM
trying to auto mount xp share in fstab babag Linux - Networking 3 07-12-2008 04:48 AM
Mounting windows share via cifs (fstab entry) - error 13 opening credentials file O(V)eGA_l2el) Linux - Networking 2 12-05-2006 11:22 AM
Win share will not auto mount, inclu in Fstab ZingSter SUSE / openSUSE 4 04-06-2005 07:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:31 AM.

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