How to install and configure LDAP client on CentOS 7

How to install and configure LDAP client on CentOS 7

Add LDAP server address to `/etc/hosts`

192.168.1.100 ldap.opensourcelisting.com ldap

Update the package manager’s package list:

yum update
yum install openldap-clients nss-pam-ldapd -y
authconfig-tui

During the installation, the package installer will ask you a variety of questions. Enter the values according to your environment.

LDAP server Uniform Resource Identifier:
ldap://192.168.1.100

# Distinguished name of the search base:
dc=opensourcelisting,dc=com

# LDAP version to use
3

# Make local root Database admin:
Yes

# Does the LDAP database require login:
No

# LDAP account for root
cn=admin,dc=opensourcelisting,dc=com

# LDAP root account password:
**********

Use the `getent` command to get the LDAP entries from the LDAP server.

getent passwd badshah
# badshah:*:10001:10001:Mukhtiar Badshah:/home/badshah:/bin/bash

Follow us TwitterFacebookLinkedIn

Open Source Listing

Previous Post
Next Post

Comments

Avatar for gate.io
gate.io

Cool. I spent a long time looking for relevant content and found that your article gave me new ideas, which is very helpful for my research. I think my thesis can be completed more smoothly. Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *