Bug 472565 - authconfig --enablenis breaks DNS
Summary: authconfig --enablenis breaks DNS
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: authconfig
Version: 5.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Tomas Mraz
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-21 19:16 UTC by Konstantin Olchanski
Modified: 2008-11-24 20:09 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-24 20:09:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Konstantin Olchanski 2008-11-21 19:16:57 UTC
authconfig-5.3.21-3.el5.x86_64 option "--enablenis" changes /etc/nsswitch.conf to read "hosts: files nis dns". Notice how by adding the "nis" entry, this configures DNS to query NIS before querying any name servers.

This behaviour is surprising. As a long time NIS user and administrator I have never ever used NIS to resolve DNS queries.

This actually happens to misbehave. I see programs stuck inside gethostbyname(), with gethostbyname() in turn being stuck trying to make NIS calls. (This is a no-bug - do not use NIS to do DNS!)

RHEL4 does not seem to have this problem. I see most of my SL4 machines read "hosts: files dns", so at least some older versions of authconfig did not have this problem.

Anyhow, I see no mention of any of this in authconfig documentation, authconfig rpm changelog or in Red Hat bugzilla.

To undo this unwanted change, run this sed script:

sed 's/^hosts:.*/hosts: files dns/' -i /etc/nsswitch.conf

K.O.

Comment 1 Tomas Mraz 2008-11-24 20:09:12 UTC
As far as I know this was always the case - even in the RHEL-4 authconfig that if you enable nis for user information it will add it to hosts: in nsswitch.conf. 

So this is no regression.

But in the 5.3 update of Red Hat Enterprise Linux, there will be a new enhancement of authconfig that it will support --enablepreferdns option which will make it to put dns just after files before any other services such as nis.


Note You need to log in before you can comment on or make changes to this bug.