Page 1 of 1

RHEL autofs/automount issue

Posted: Mon Jun 09, 2014 7:57 pm
by cah
I was working on a RHEL 6.4 server (laxm1281) and trying to register it with RHN Satellite server.
When I tried to create a directory, I got the following error message:

Code: Select all

# laxm1281:/apps.mdt%mkdir ks
mkdir: cannot create directory `ks': Permission denied
I searched online and found some clues.
First, I can use 'fuser' command to check on the directory.

Code: Select all

# laxm1281:/root%fuser -mv /apps.mdt
                     USER        PID ACCESS COMMAND
/apps.mdt:           root       2995 f.... automount
Then, I can kill or stop this process and the directory will become writable.

Code: Select all

# service autofs stop
Automount reads from /etc/auto.master file for the list of automounted file systems/directories.
After checking the file, I didn't see anything in it. Then, I checked /etc/nsswitch.conf file. It has the folloiwng setting for automount:

Code: Select all

automount:     files nis
This means automount will read an auto.master file from NIS that I have no access. I believe /apps.mdt and others reside in NIS auto.master file.

Once I remove "nis" from automount line in /etc/nsswitch.conf, /apps.mdt is no longer automounted after restarting autofs/automount.

Code: Select all

laxm1281:/etc%service autofs restart    
Stopping automount:                                        [  OK  ]
Starting automount:                                        [  OK  ]