LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-11-2016, 05:11 PM   #1
thllgo
Member
 
Registered: Sep 2003
Location: Laurel MD
Posts: 296

Rep: Reputation: 32
autofs and mounting cifs mounts on centos 6.3


I am trying to automount cifs mounts on centos 6.3 and failing. I have the following
/etc/auto.master
Quote:
/mnt/cifs /etc/auto.smb --timeout=60
+auto.master
/etc/auto.smb original unedited
/etc/auto.smb.fileshare {where fileshare is the name of the windows file server}
Quote:
username=user
password=password
where username and password are the username and password for the credentials of the file server. I restart autofs and nada, no error no nothing. No error in /var/log/messages or any other file that I can find.
If I run the command
Quote:
mount //fileserver/Software -o username=username -t cifs /mnt/cifs
it asks for a password, I enter it the mount works. What am I missing in the autofs portion?
Any help will be appreciated.
Thank you
 
Old 04-11-2016, 08:00 PM   #2
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
When I set up a couple windows automounts, I created a credentials file for the windows login. Verified it worked manually, then change the autofs.smb file to use the credentials file. I used /mnt/subdir mount points for the automounted shares.

Worked for me from Fedora 23 system.
 
Old 04-11-2016, 09:06 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
please double check the version
Cent only supports the current minor version
that is CentOS 6.7

you are 5 minor versions and 3 years out of date
and missing 3 years of security updates

Code:
cat /etc/redhat-release
needs to state CentOS 6.7
 
Old 04-12-2016, 09:04 AM   #4
thllgo
Member
 
Registered: Sep 2003
Location: Laurel MD
Posts: 296

Original Poster
Rep: Reputation: 32
I found a centos 7 system to work on. Currently I have
/etc/auto.master
Quote:
/mnt/cifs /etc/auto.fileprint01 --timeout=60
/etc/auto.fileprint01
Quote:
soft -fstype=cifs,rw,noperm,credentials=/etc/auto.smb.fileprint01 ://fileprint01/Software
/etc/auto.smb.fileprint01
Quote:
username=uname
password=pword
where uname and pword are the username and password of a valid account
 
Old 04-12-2016, 09:35 AM   #5
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
Hi,

So now after restarting the autofs service by systemctl restart autofs, and then ls -l /mnt/cifs/soft, what is the output?
 
Old 04-12-2016, 10:08 AM   #6
thllgo
Member
 
Registered: Sep 2003
Location: Laurel MD
Posts: 296

Original Poster
Rep: Reputation: 32
The /mnt/cifs dir is empty. I get nothing, not even an error.
 
Old 04-13-2016, 01:39 PM   #7
thllgo
Member
 
Registered: Sep 2003
Location: Laurel MD
Posts: 296

Original Poster
Rep: Reputation: 32
Yea I figured it out. In the auto.master file I had to add the option "--ghost". Everything I read said it was optional, for me it was not.
 
Old 04-13-2016, 06:08 PM   #8
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
Happy to hear you got it resolved. I'm gonna check my configuration and see if I used --ghost. The documentation for automount is "sparse"

Just looked, yep, I used that option too. I don't even know what it does.
 
Old 04-14-2016, 12:49 PM   #9
thllgo
Member
 
Registered: Sep 2003
Location: Laurel MD
Posts: 296

Original Poster
Rep: Reputation: 32
according to what I've read is that it is supposed to make a place holder even when the share is not mounted. So if you are mounting a share to /mnt/Share --ghost will keep a dir for Share whereas if you don't use the option /mnt/Share will only exist when the share is mounted otherwise there will only be /mnt without a Share dir.
 
Old 04-14-2016, 03:13 PM   #10
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
Thanks for the info!
 
Old 04-14-2016, 04:15 PM   #11
thllgo
Member
 
Registered: Sep 2003
Location: Laurel MD
Posts: 296

Original Poster
Rep: Reputation: 32
no problem
 
  


Reply



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
[B]RHEL & CENTOS: What is the best practice for mounting NFS/CIFS/DISKS[/B] person_of_interest Linux - Newbie 1 02-22-2015 08:16 AM
cifs mounting in CentOS siruss899 Linux - Networking 1 08-21-2014 07:53 PM
Autofs mounts, but doesn't umount Linux.tar.gz Slackware 5 04-27-2010 07:13 AM
[SOLVED] autofs, fstab and manual cifs mounts fail if using credentials file carltm Red Hat 1 12-02-2009 06:39 AM
autofs/ldap limit mounts dziqus83 Linux - Server 1 07-07-2009 07:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:14 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