Red Hat Bugzilla – Bug 187947
autofs (automount) may use NIS maps even if nsswitch.conf is configured for files only
Last modified: 2007-11-30 17:07:24 EST
+++ This bug was initially created as a clone of Bug #145152 +++
Description of problem:
autofs (automount) may use NIS maps even if nsswitch.conf is
configured for files only.
If the /etc/nsswitch.conf file is configured for "automount: files",
this should preclude NIS maps. However, if the local auto.master
references a map that doesn't exist locally, the /etc/init.d/autofs
startup script assumes this is an NIS map (see lines 210-232). If an
NIS map of that name is available, it uses it regardless of the
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Edit /etc/nsswitch.conf to "automount: files"
2. Edit /etc/auto.master - add "/x auto_x -ro,intr,nobrowse"
3. Create an auto_x automount map on the NIS server.
4. Restart autofs
Actual Results: The /x automount will function using the NIS map
available from the NIS server.
Expected Results: The /x automount should not function, as the NIS
map should be ignored.
-- Additional comment from email@example.com on 2005-01-14 16:01 EST --
This is a known problem. Unfortunately, some users depend on this broken
functionality. I will look into adding another flag in /etc/sysconfig/autofs.
-- Additional comment from firstname.lastname@example.org on 2005-02-11 13:57 EST --
> However, if the local auto.master
> references a map that doesn't exist locally, the /etc/init.d/autofs
> startup script assumes this is an NIS map (see lines 210-232).
Sorry, I misread this the first time through. Is this a contrived reproducer or
do you actually have instances where you run into this problem? Why would you
configure auto.master to look for maps that don't exist?
-- Additional comment from email@example.com on 2005-02-16 19:01 EST --
This particular issue is more likely to be encountered accidentally rather than
due to a deliberate configuration.
We encountered this problem when I was updating a system to have a local map
which overrode the NIS map. I couldn't figure out why the system was still using
the NIS map instead of the local map -- even when I removed NIS from the
Eventually I realized that I'd left out the /etc/ in the auto.master file and
that autofs was thus assumed it was an NIS map, even though NIS was not included
-- Additional comment from firstname.lastname@example.org on 2005-04-26 15:59 EST --
I've just been playing with U5 beta, and it looks like U5 beta has basically the
opposite problem as this (see Bug 156035) -- was that perhaps caused by an
attempt to fix this bug?
-- Additional comment from email@example.com on 2005-04-26 18:08 EST --
There have been no efforts as of yet to fix this. However, a change in
behaviour can be considered a regression, and should be addressed. Thanks for
taking the time to give a detailed report.
The init script never properly handled this case. For U5, I will ensure that
the behaviour matches that of U4. Post U5, we will work on addressing this
I built an updated version of autofs which addresses the problems reported in
this bug. Please test the package found here:
There are builds for every architecture. The changes to this package are fairly
invasive and, as such, I'd like to get testing feedback as soon as possible. If
there is any unexpected change in behaviour, please be sure to report it.
Thanks in advance!
A fix for this bug was just committed to the RHEL 4 U4 patch pool. It will be
available in autofs version 4.1.3-179 and later.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.