Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have many servers over 50. earlier we were using that LDAP authentication. Now we have decided to go to same username needs to be authenticate locally on server rather than LDAP authentication. something has messed up and we loose track there we have change the authentication scheme. Now I need to manually log in to all server and check. What is the fool proof way to check whether user account is authenticated locally or through LDAP ? PS: I have tried checking /etc/passwd file for user name but it's not working. though entry is there, user account is authenticated through LDAP :(

share|improve this question
I am not sure. Do you want to list all ldap users? – Nessuno Nov 1 '12 at 18:10
Nope, I just want my Linux server which is running RHEL not to authenticate alix from the LDAP server but from /etc/passwd file. Hope this make it more clear. – Alix Nov 1 '12 at 18:42

I'm not sure exactly what you're asking, but changes like that are handled in /etc/nsswitch.conf. Look for the users section in that file, that should tell you if it's local (files) or ldap.

share|improve this answer
getent passwd "username"

Copy the result into the buffer


Paste the line into it. Either at the end or at the right place.

getent shadow "username"

Copy the line again

vipw -s

Paste the line into it. Then use

passwd "username"

to set the password itself again. 'getent' won't give you the encrypted LDAP password.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .