LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 08-11-2014, 10:10 PM   #1
thealmightyos
Member
 
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:
Code:
mount -t cifs //host.name/share -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 auto.network file that my auto.master points to:

Code:
host.name        -fstype=cifs,rw,noperm,user=user,pass=pass ://host.name/share
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:
Code:
 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, 04:53 PM   #2
thealmightyos
Member
 
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$ (:\\host.name\D$)
autofs DOES NOT like the $. It was trying to mount \\host.name\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/host.name. 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 host.name and made it just /network, the mount worked flawlessly and even mounted the host.name 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, 09:26 AM   #3
MadeInGermany
Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 893

Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
The /net/ trick

Just saw this, and think it needs an explanation.
For 2. ensure your /etc/auto.master has
Code:
/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
Code:
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/
 
  


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 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 08:36 AM
automount 5.0.3 with auto.smb script yields "key "<name>" not found in map" rbergen Linux - Software 0 01-01-2010 12:27 PM
DVD automount fails with "CDROM not ready yet" and "unaligned transfer" erica Linux - Hardware 1 12-14-2009 07:59 PM
"Enter Key" not working, how to map "Enter Key" functionality to "F9" Key srinihi Linux - Newbie 1 04-03-2009 02:46 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:44 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration