Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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

vipw

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.