Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 08-11-2014, 11:10 PM   #1
Registered: Mar 2009
Distribution: CentOS 6.5 / 7
Posts: 119

Rep: Reputation: 1
Automount fails with "key "xxxx" not found in map source(s)"

Seems CentOS7 keeps me in the forums today.

I am attempting to automount my windows share using this howto. I am following method four.

I got my systems so I can easily mount the shares via the command line using ether the ip or the hostname of the windows system. The command I am using is:
mount -t cifs // -o username=username,password=password /network/pc
Problem is, that is my gamming pc and I do not leave that on. So when it goes down for a night my server is going to pitch a fit. So, I want to automount so it is only mounted when the server requests data from it.

I followed the instructions in the howto exactly (well, I changed names and such where needed). Here is my file that my auto.master points to:

Code:        -fstype=cifs,rw,noperm,user=user,pass=pass ://
Now, this all looks correct going by what is shown in the howto. However, when I try to browse to my share nothing is there. I check /var/log/messages and the error I get is the one in the title:
 automount[2084]: key "Users" not found in map source(s).
(Users was the directory I attempted to cd to)

I googled the error message but came up with a wide array of issues. I don't know where to begin. Any suggestions?
Old 08-12-2014, 05:53 PM   #2
Registered: Mar 2009
Distribution: CentOS 6.5 / 7
Posts: 119

Original Poster
Rep: Reputation: 1
Ok. So I think I solved it. I had a few things wrong

First, anyone who has this problem should turn on logging in /etc/sysconfig/autofs. I just changed it from off to verbose and that gave me a lot more information to go on in log\messages.

1. I was pointing towards my media hard drive, D$ (:\\\D$)
autofs DOES NOT like the $. It was trying to mount \\\D and failing. So I created an actual share for the drive "media" and that solved that

2. The second part of this is sort of weird and I do not understand it yet, but autofs is very picky about where you mount to. I wanted to mount to /network/ The plan was to have automounts for all the networked pc's. I created the directories and that is what I listed in the /etc/auto.master. However, when I removed and made it just /network, the mount worked flawlessly and even mounted the directory as I originally intended.

All in all, the automount feature needs more documentation. I am quite proficient with the googles but could not come up usable information and examples of syntax that helped at all. It was turning the logging on and trial and error that got this working and I am concerned about the next share I am going to set up.

I would not exactly call this "solved", more like "issue resolved for the time being". But I will hit the button anyway. Hope this helps someone
Old 12-03-2015, 10:26 AM   #3
Senior Member
Registered: Dec 2011
Location: Simplicity
Posts: 2,194

Rep: Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980
The /net/ trick

Just saw this, and think it needs an explanation.
For 2. ensure your /etc/auto.master has
/net            -hosts          -nosuid,nobrowse
The mount point for this map is /net
The -hosts (special option) means:
a reference to /net/HOSTNAME will issue a
showmount -e HOSTNAME
and display whatever it finds as /net/HOSTNAME/exportpath
Knowing the server names in your network you can access everything they export through /net/


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] "Insert" & "Delete" key returns "~" in a terminal. sharky Linux - General 15 04-26-2011 09:36 AM
automount 5.0.3 with auto.smb script yields "key "<name>" not found in map" rbergen Linux - Software 0 01-01-2010 01:27 PM
DVD automount fails with "CDROM not ready yet" and "unaligned transfer" erica Linux - Hardware 1 12-14-2009 08:59 PM
"Enter Key" not working, how to map "Enter Key" functionality to "F9" Key srinihi Linux - Newbie 1 04-03-2009 03:46 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 11:18 PM > Forums > Linux Forums > Linux - General

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