Authenticate CentOS 7 Client Machine From OpenLDAP Server
Authenticate CentOS Linux 7 Client Machine from OpenLDAP Server
Benefit to authenticate CentOS Linux 7 client machine from OpenLDAP Server is to Centralized the Linux Base environment. Use single user id to connect any CentOS Linux 7 client machine. User access own files and folder from any CentOS Linux 7 client machine.
Check the hosts file of CentOS Linux 7 client machine type the below command.
cat /etc/hosts
In the above image you can see that Host Name and Full Qualified Domain Name (Host Name + Domain Name) not edit in hosts file to resolve DNS Server IP address or any other CentOS Linux 7 client machine IP Address because DNS Server is use to resolve Host Name to IP Address and IP address to Host Name.
Check the Host Name file of CentOS Linux 7 Client Machine type the below command.
cat /etc/hostname
Edit the Name Server Addresses in "resolv.conf" file that available in "/etc/resolv.conf" directory. To Check the Name Server Addresses in "resolv.conf" file type the below command, you can edit the "resolv.conf" file by use of vi editor to add the Name Server Addresses.
cat /etc/resolv.conf
To Check DNS Server Full Qualified Domain Name "FQDN" is resolving type the below command.
nslookup ldap-dns.pakistan.local
Note: DNS Server and OpenLDAP Server is Same machine.
To check the CentOS Linux 7 client machine IP address type the below command.
cat /etc/sysconfig/network-scripts/ifcfg-ens33
Note: DNS1 address must be OpenLDAP Server IP Address.
To Install OpenLDAP client packages for Authenticate Centos Linux 7 client machine from OpenLDAP Server type the below command.
yum install -y openldap-clients nss-pam-ldapd
OpenLDAP client package has successfully installed.
To Authenticate CentOS Linux 7 client machine form OpenLDAP Server type the below command.
authconfig-tui
Select Below Options then press next.
Use LDAP
Use LDAP Authentication
Set OpenLDAP Server Full Qualified Domain Name and Base DN (Domain Name) as mention below then press OK.
Server: ldap://ldap-dns.pakistan.local/
Base DN: dc=pakistan,dc=local
Type the below commands to verify that users are authenticate from OpenLDAP Server to CentOS Linux 7 client machine.
getent passwd user1getent passwd user2getent passwd owais
In the above image you can see that OpenLDAP users has successfully authenticated.
To login in CentOS Linux 7 client machine from OpenLDAP user "user1" type the below command.
su - user1
CentOS Linux 7 Client Machine Successfully Authenticate from OpenLDAP Server.
To Mount the Home Directory of users in CentOS Linux 7 client machine from OpenLDAP Server click on >>Read.
Thanks for read this Article
Comments
Post a Comment