Configuring OpenLDAP to connect your LDAP server
1) First you need to make sure that yum install authconfig is installed & also yum install pam_krb5
2) Then you need to configure the server to enable LDAP and download the LDAP certification:
authconfig --enableldap --enableldapauth --ldapserver=ldap://ldap.hostway.com:389 --ldapbasedn="dc=hostway,dc=com" --enableldaptls --ldaploadcacert=http://ldap.hostway.com/pub/cert.pem –update
3) Then the next step is to configure autofs on the server:
yum install -y autofs nfs-utils openldap-clients
4) Then create ldap.autofs file in /etc/auto.master.d directory by doing vi /etc/auto.master.d/ ldap.autofs
5) Then create /etc/auto.ldap file and put the below content.
* -rw ldap.hostway.com:/home/guests/&
6) Then you need to allow LDAP credentials through SSH. You will need to open /etc/pam.d/sshd file and add the two below lines:
Auth sufficient pam_ldap.so
Auth sufficient pam_permit.so
7) Then start and enable autofs to work on reboot:
Systemctl start autofs && systemctl enable autofs
Systemctl restart sshd
8) You should now be able to access the LDAP server from the RHEL server