Yes, I know that RHE4 is deprecated, but what if I have some really old machine which actually works. All of us know, if something works what is supposed to do don’t touch it. This was exactly case this time. So here are the steps…

First of all install necessary packages:

[root@rhel4 ~]# yum –y install openldap openldap-clients nss_ldap

Second, run

[root@rhel4 ~]# system-config-authentication

and make sure that you enable Enable LDAP Support under the User Information and use LDAP Authentication (see picture below). Click on next button.

On next window you have to insert details for LDAP server. (see picture below)

After those changes you have to find lines nss_base_passwd nss_base_shadow and nss_base_group in /etc/ldap.conf, uncomment it and change according your setup. In my case this is a setup:

[root@rhel4 ~]# grep setenforce /etc/ldap.conf
nss_base_passwd ou=People,dc=setenforce,dc=com?one
nss_base_shadow ou=People,dc=setenforce,dc=com?one
nss_base_group ou=Group,dc=setenforce,dc=com?one

NOTE: DO NOT RUN ANYMORE system-config-authentication AS IT WILL DELETE CHANGES YOU MADE IN nss_base_passwd nss_base_shadow AND nss_base_group LINES.

Test your configuration

[root@rhel4 ~]# id jelena
uid=2100(jelena) gid=541(sysadmin)