FreeIPA Client is the machine that uses the services from a FreeIPA Server to authenticate users, systems, certificates, etc. We have successfully configured a Identity Management (IdM) Server using FreeIPA in my previous post “Configure Identity Management (IdM) with FreeIPA Server”. Now it’s time to configure a Linux Machine as FreeIPA client.
Table of Contents:
System Specification:
FreeIPA Server
- IP Address - 192.168.116.200/24
- Hostname - ipaserver.example.com
- IP Address - 192.168.116.201/24
- Hostname - client1.example.com
FreeIPA Server-Side Configuration:
Connect to ipaserver.example.com and add 'A' record of client1.example.com to DNS Server.
# kinit admin Password for admin@EXAMPLE.COM: # ipa dnsrecord-add example.com client1 --ttl=3600 --a-ip-address=192.168.116.201 Record name: client1 Time to live: 3600 A record: 192.168.116.201
FreeIPA Client-Side Configuration:
Connect to client1.example.com now and set DNS Server settings.
# nmcli connection modify eno16777728 ipv4.dns 192.168.116.200 # nmcli connection down eno16777728 ; nmcli connection up eno16777728 Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/2)
Install required packages. Our client already configured to use a local yum repository.
# yum install -y ipa-client
To keep it brief, I trimmed the output of the command above. Let’s configure FreeIPA Client now.
# ipa-client-install --force-ntpd Discovery was successful! Hostname: client1.example.com Realm: EXAMPLE.COM DNS Domain: example.com IPA Server: ipaserver.example.com BaseDN: dc=example,dc=com Continue to configure the system with these values? [no]: yes User authorized to enroll computers: admin Synchronizing time with KDC... Password for admin@EXAMPLE.COM: Successfully retrieved CA cert Subject: CN=Certificate Authority,O=EXAMPLE.COM Issuer: CN=Certificate Authority,O=EXAMPLE.COM Valid From: Fri Jul 27 17:03:24 2018 UTC Valid Until: Tue Jul 27 17:03:24 2038 UTC Enrolled in IPA realm EXAMPLE.COM Created /etc/ipa/default.conf New SSSD config will be created Configured /etc/sssd/sssd.conf Configured /etc/krb5.conf for IPA realm EXAMPLE.COM trying https://ipaserver.example.com/ipa/xml Forwarding 'ping' to server 'https://ipaserver.example.com/ipa/xml' Forwarding 'env' to server 'https://ipaserver.example.com/ipa/xml' Adding SSH public key from /etc/ssh/ssh_host_rsa_key.pub Adding SSH public key from /etc/ssh/ssh_host_ecdsa_key.pub Forwarding 'host_mod' to server 'https://ipaserver.example.com/ipa/xml' SSSD enabled Configured /etc/openldap/ldap.conf NTP enabled Configured /etc/ssh/ssh_config Configured /etc/ssh/sshd_config Client configuration complete.
I used --force-ntpd option to force use of ntpd because, myclient is using the chronyd service and it is conflicting with ntpd.
To let the system, create Users’ home directories on first login, use the following command.
# authconfig --update --enablemkhomedir
client1.example.com has been successfully configured as FreeIPA Client.
Login to client1.example.com with a central user. I am login with user ahmer that I have created during configuration of FreeIPA Server.
# su - ahmer Creating home directory for ahmer. Last login: Sat Jul 28 12:55:12 PDT 2018 on pts/0 $ id uid=1692200001(ahmer) gid=1692200001(ahmer) groups=1692200001(ahmer) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c102I use id command to confirm the UID of the user and that the user ahmer is a central user.
We have successfully configured our Red Hat Enterprise Linux (RHEL) 7 machine as a FreeIPA client. Here, we have used the ipa-client package for easy configuration. However, if you do not want to use ipa-client than you have to configure Client settings for each component of FreeIPA by yourself.