I have root access to a RHEL6 system and I want to use the corporate ldap server where I work for user authentication.

I ran authconfig-tui and checked [*] Use LDAP and left [*] Use Shadow Passwords checked, then I checked [*] Use LDAP Authentication then click the Next button and left [ ] Use TLS unchecked and set Server: ldap://ldap.mycompanysdomainname.com and set the Base DN to what the ldap admin guy told me to use.

But I can only log in with the password I set locally on the box for my user account and cannot log on if I use that password that is stored on the ldap server.

Isn't there something I need to do in the /etc/passwd file of the /etc/shadow files ... something like change the passwd field to red@mycompanysdomainname.com or something like that?


Take a look at these documents from Red Hat. They show how you can change your system so that it will authenticate to an LDAP server rather than use the local credentials on the system. The topic is a little much to include on this site so I'm only providing a reference here to the official docs.

General steps

(excerpt from here)

  1. install client packages

    $ sudo yum install openldap openldap-clients nss_ldap
  2. configure client's LDAP setup

    On the client machines the following files need to be edited: /etc/ldap.conf and /etc/openldap/ldap.conf. They need to contain the proper server and search base information for the organization.

    To do this, run the graphical Authentication Configuration Tool (system-config-authentication) and select Enable LDAP Support under the User Information tab. It's also possible to edit these files by hand.

  3. nssswitch

    On the client machines, the /etc/nsswitch.conf must be edited to use LDAP. To do this, run the Authentication Configuration Tool (system-config-authentication) and select Enable LDAP Support under the User Information tab. If editing /etc/nsswitch.conf by hand, add ldap to the appropriate lines.

For example:

passwd: files ldap
shadow: files ldap
group: files ldap

nss_ldap was replaced with pam_ldap and nss-pam-ldapd. My system was missing nss-pam-ldapd. After installing this package, my RHEL 6.5 Client authenticated to my RHEL 5 LDAP Server.

Also, in /var/log/messages when my LDAP Login would fail prior to this fix, I would receive the error: Couldn't unlock login keyring with provided password. I am not using TLS since my system is offline.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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