How to prevent user authentication from querying LDAP/NIS when it is a local user
Issue
- How do I prevent user authentications from querying LDAP/NIS, when it is a local user?
- Using the authentication default settings, if an account attempts to login locally, the login will be successful but only after querying the next authentication method. This produces unnecessary queries to the LDAP/NIS servers.
- Avoid querying LDAP/NIS when user is locally present (in
/etc/passwd
and/etc/shadow
) - Tune
/etc/nsswitch.conf
(nsswitch) to prevent query to LDAP/NIS if user is local - Local user is unable to login when LDAP server is down
- User with local account is not able to login if LDAP server is down.
- Local user accounts will not work on console if the network services are disabled.
Environment
- Red Hat Enterprise Linux (All Versions)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.