You are on page 1of 16

12/8/2020 Install FreeIPA Server on CentOS 8 - CentLinux

 LATEST Install Oracle Database 19c on CentOS 8     

HOME DEVOPS  DATABASES  APPLICATIONS  VIRTUALIZATION  MONITORING  MISCELLANEOUS  HIRE ME 

Install FreeIPA Server on CentOS 8 Enter keyword... 

 Ahmer Mansoor  February 12, 2020  CentOS, CyberSecurity, FreeIPA

Trending Posts

H o w t o u p g ra d e C e n t O S 7 t o
CentOS 8 Server

FreeIPA is an open source and free software that provides a centrally managed IPA
How to Permanently Disable
(Identity, Policy and Audit) system. FreeIPA uses a combination of 389 Directory Server, SELinux on CentOS 8

MIT Kerberos, NTP, DNS, IGC DogTag and other free open-source components.
How to Install Icinga Web 2 on
CentOS 8
FreeIPA is developed by Red Hat and distributed under GNU General Public License.

Install Zabbix 4.4 Server on


In this Lab, you will learn how to install FreeIPA server on CentOS 8, we will also CentOS 8
con gure a CentOS 8 client to use FreeIPA services.
Install Ruby on Rails Server on
Note: Please refer to our previous post to install FreeIPA server on CentOS 7. CentOS 8

Components of FreeIPA Server:

Core components of a FreeIPA server are.

389 Directory Server - LDAP implementation


MIT Kerberos 5 - Authentication and Single Sign-On (SSO)
Apache HTTP Server - For Web UI for FreeIPA
DogTag - PKI certi cate authority
BIND - DNS server
Chrony - NTP server

This Article Provides:

Components of FreeIPA Server


Environment Speci cation 
https://www.centlinux.com/2020/02/install-freeipa-server-on-centos-8.html 1/16
12/8/2020 Install FreeIPA Server on CentOS 8 - CentLinux

Con gure Static IP Address on CentOS 8


Installing FreeIPA Server on CentOS 8
Con gure DNS Server settings
Export Users' Home Directories by using NFS server
Create a FreeIPA user
Add a CentOS 8 Client in FreeIPA Server
Con gure CentOS 8 machine as FreeIPA Client

Environment Speci cation:

We are using a CentOS 8 minimal virtual machine with following speci cation.

CPU - 3.4 Ghz (2 cores)


Memory - 2 GB
Storage - 20 GB
Operating System - CentOS 8.0
Hostname – freeipa-01.recipes.com
IP Address - 192.168.116.206 /24

Con gure Static IP Address on CentOS 8:


Popular Categories

Connect with freeipa-01.recipes.com as root user by using a SSH tool. ANSIBLE A PA C H E CENTOS

CYBERSECURITY DEVOPS DOCKER


This server is currently using a DHCP assigned IP Address. Con gure network connection
and manually assigned IP address, gateway and dns. KUBERNETES MYSQL NAGIOS

NGINX ORACLE POSTGRESQL


[root@freeipa-01 ~]# nmcli connection modify ens33 \
REVERSE PROXY VA G R A N T
> ipv4.method manual \
> ipv4.address 192.168.116.206/24 \ V I RT U A L B O X W E B LO G I C

> ipv4.gateway 192.168.116.2 \


> ipv4.dns 192.168.116.206

Restart network connection to load changes.

[root@freeipa-01 ~]# nmcli connection down ens33 ; nmcli c up ens33


Connection 'ens33' successfully deactivated (D-Bus active path: /org/free
Connection successfully activated (D-Bus active path: /org/freedesktop/Ne

Add an entry in local DNS resolver.

[root@freeipa-01 ~]# echo "192.168.116.206 freeipa-01.recipes.com freeipa

Installing FreeIPA Server on CentOS 8:

In CentOS 8, FreeIPA is available in AppStream repository, bundled in IDM module with


different pro les to install according to sysadmins' requirements.

We are installing selective pro les required to con gure the FreeIPA server.

[root@freeipa-01 ~]# dnf module install -y idm:DL1/{server,client,dns,adt


... 
https://www.centlinux.com/2020/02/install-freeipa-server-on-centos-8.html 2/16
12/8/2020 Install FreeIPA Server on CentOS 8 - CentLinux
python3-tevent-0.9.39-2.el8.x86_64
python3-urllib3-1.24.2-2.el8.noarch
quota-1:4.04-10.el8.x86_64
quota-nls-1:4.04-10.el8.noarch
rpcbind-1.2.5-4.el8.x86_64
samba-4.10.4-101.el8_1.x86_64
samba-client-libs-4.10.4-101.el8_1.x86_64
samba-common-4.10.4-101.el8_1.noarch
samba-common-libs-4.10.4-101.el8_1.x86_64
samba-common-tools-4.10.4-101.el8_1.x86_64
samba-libs-4.10.4-101.el8_1.x86_64
samba-winbind-4.10.4-101.el8_1.x86_64
samba-winbind-modules-4.10.4-101.el8_1.x86_64
sssd-common-pac-2.2.0-19.el8.x86_64
sssd-dbus-2.2.0-19.el8.x86_64
sssd-ipa-2.2.0-19.el8.x86_64
sssd-krb5-common-2.2.0-19.el8.x86_64
sssd-tools-2.2.0-19.el8.x86_64
words-3.0-28.el8.noarch
xmlrpc-c-1.51.0-5.el8.x86_64
xmlrpc-c-client-1.51.0-5.el8.x86_64

Complete!

FreeIPA server and related packages have been installed on our CentOS 8 server. Now we
have to con gure the FreeIPA installation according to our requirement.

[root@freeipa-01 ~]# ipa-server-install \


> --unattended \
> --realm RECIPES.COM \
> --ds-password Ahmer@1234 \
> --admin-password Ahmer@1234 \
> --setup-dns \
> --auto-reverse \
> --forwarder 192.168.116.2

The log file for this installation can be found in /var/log/ipaserver-ins


=========================================================================
This program will set up the IPA Server.
Version 4.8.0

This includes:
* Configure a stand-alone CA (dogtag) for certificate management
* Configure the NTP client (chronyd)
* Create and configure an instance of Directory Server
* Create and configure a Kerberos Key Distribution Center (KDC)
* Configure Apache (httpd)
* Configure DNS (bind)
* Configure the KDC to enable PKINIT

Warning: skipping DNS resolution of host freeipa-01.recipes.com


The domain name has been determined based on the host name.

Checking DNS domain recipes.com., please wait ...


DNS check for domain recipes.com. failed: The DNS operation timed out aft
Checking DNS forwarders, please wait ...
DNS server 192.168.116.2 does not support DNSSEC: answer to query '. SOA'
Please fix forwarder configuration to enable DNSSEC support.
(For BIND 9 add directive "dnssec-enable yes;" to "options {}")
DNS server 192.168.116.2: answer to query '. SOA' is missing DNSSEC signa
Please fix forwarder configuration to enable DNSSEC support.
(For BIND 9 add directive "dnssec-enable yes;" to "options {}")
WARNING: DNSSEC validation will be disabled 
https://www.centlinux.com/2020/02/install-freeipa-server-on-centos-8.html 3/16
12/8/2020 Install FreeIPA Server on CentOS 8 - CentLinux
Checking DNS domain 116.168.192.in-addr.arpa., please wait ...
Reverse zone 116.168.192.in-addr.arpa. for IP address 192.168.116.206 alr

The IPA Master Server will be configured with:


Hostname: freeipa-01.recipes.com
IP address(es): 192.168.116.206
Domain name: recipes.com
Realm name: RECIPES.COM

The CA will be configured with:


Subject DN: CN=Certificate Authority,O=RECIPES.COM
Subject base: O=RECIPES.COM
Chaining: self-signed

BIND DNS server will be configured to serve IPA domain with:


Forwarders: 192.168.116.2
Forward policy: only
Reverse zone(s): No reverse zone

Disabled p11-kit-proxy
Synchronizing time
No SRV records of NTP servers found and no NTP server or pool address was
Using default chrony configuration.
Attempting to sync time with chronyc.
Process chronyc waitsync failed to sync time!
Unable to sync time with chrony server, assuming the time is in sync. Ple
Warning: IPA was unable to sync time with chrony!
Time synchronization is required for IPA to work correctly
Configuring directory server (dirsrv). Estimated time: 30 seconds
[1/44]: creating directory server instance

Starting installation...
Created symlink /etc/systemd/system/multi-user.target.wants/dirsrv@RECIPE
Opening SELinux policy "//etc/selinux/targeted/policy/policy.31"
Successfully opened SELinux policy "//etc/selinux/targeted/policy/policy.
Allocate local instance <class 'lib389.DirSrv'> with ldapi://%2fvar%2frun
[2/44]: configure autobind for root
[3/44]: stopping directory server
[4/44]: updating configuration in dse.ldif
[5/44]: starting directory server
[6/44]: adding default schema
[7/44]: enabling memberof plugin
[8/44]: enabling winsync plugin
[9/44]: configure password logging
[10/44]: configuring replication version plugin
[11/44]: enabling IPA enrollment plugin
[12/44]: configuring uniqueness plugin
[13/44]: configuring uuid plugin
[14/44]: configuring modrdn plugin
[15/44]: configuring DNS plugin
[16/44]: enabling entryUSN plugin
[17/44]: configuring lockout plugin
[18/44]: configuring topology plugin
[19/44]: creating indices
[20/44]: enabling referential integrity plugin
[21/44]: configuring certmap.conf
[22/44]: configure new location for managed entries
[23/44]: configure dirsrv ccache and keytab
[24/44]: enabling SASL mapping fallback
[25/44]: restarting directory server
[26/44]: adding sasl mappings to the directory
[27/44]: adding default layout
[28/44]: adding delegation layout
[29/44]: creating container for managed entries 
https://www.centlinux.com/2020/02/install-freeipa-server-on-centos-8.html 4/16
12/8/2020 Install FreeIPA Server on CentOS 8 - CentLinux
[30/44]: configuring user private groups
[31/44]: configuring netgroups from hostgroups
[32/44]: creating default Sudo bind user
[33/44]: creating default Auto Member layout
[34/44]: adding range check plugin
[35/44]: creating default HBAC rule allow_all
[36/44]: adding entries for topology management
[37/44]: initializing group membership
[38/44]: adding master entry
[39/44]: initializing domain level
[40/44]: configuring Posix uid/gid generation
[41/44]: adding replication acis
[42/44]: activating sidgen plugin
[43/44]: activating extdom plugin
[44/44]: configuring directory to start on boot
Done configuring directory server (dirsrv).
Configuring Kerberos KDC (krb5kdc)
[1/10]: adding kerberos container to the directory
[2/10]: configuring KDC
[3/10]: initialize kerberos container
[4/10]: adding default ACIs
[5/10]: creating a keytab for the directory
[6/10]: creating a keytab for the machine
[7/10]: adding the password extension to the directory
[8/10]: creating anonymous principal
[9/10]: starting the KDC
[10/10]: configuring KDC to start on boot
Done configuring Kerberos KDC (krb5kdc).
Configuring kadmin
[1/2]: starting kadmin
[2/2]: configuring kadmin to start on boot
Done configuring kadmin.
Configuring ipa-custodia
[1/5]: Making sure custodia container exists
[2/5]: Generating ipa-custodia config file
[3/5]: Generating ipa-custodia keys
[4/5]: starting ipa-custodia
[5/5]: configuring ipa-custodia to start on boot
Done configuring ipa-custodia.
Configuring certificate server (pki-tomcatd). Estimated time: 3 minutes
[1/30]: configuring certificate server instance
[2/30]: Add ipa-pki-wait-running
[3/30]: reindex attributes
[4/30]: exporting Dogtag certificate store pin
[5/30]: stopping certificate server instance to update CS.cfg
[6/30]: backing up CS.cfg
[7/30]: disabling nonces
[8/30]: set up CRL publishing
[9/30]: enable PKIX certificate path discovery and validation
[10/30]: starting certificate server instance
[11/30]: configure certmonger for renewals
[12/30]: requesting RA certificate from CA
[13/30]: setting audit signing renewal to 2 years
[14/30]: restarting certificate server
[15/30]: publishing the CA certificate
[16/30]: adding RA agent as a trusted user
[17/30]: authorizing RA to modify profiles
[18/30]: authorizing RA to manage lightweight CAs
[19/30]: Ensure lightweight CAs container exists
[20/30]: configure certificate renewals
[21/30]: configure Server-Cert certificate renewal
[22/30]: Configure HTTP to proxy connections
[23/30]: restarting certificate server
[24/30]: updating IPA configuration 
https://www.centlinux.com/2020/02/install-freeipa-server-on-centos-8.html 5/16
12/8/2020 Install FreeIPA Server on CentOS 8 - CentLinux
[25/30]: enabling CA instance
[26/30]: migrating certificate profiles to LDAP
[27/30]: importing IPA certificate profiles
[28/30]: adding default CA ACL
[29/30]: adding 'ipa' CA entry
[30/30]: configuring certmonger renewal for lightweight CAs
Done configuring certificate server (pki-tomcatd).
Configuring directory server (dirsrv)
[1/3]: configuring TLS for DS instance
[2/3]: adding CA certificate entry
[3/3]: restarting directory server
Done configuring directory server (dirsrv).
Configuring ipa-otpd
[1/2]: starting ipa-otpd
[2/2]: configuring ipa-otpd to start on boot
Done configuring ipa-otpd.
Configuring the web interface (httpd)
[1/21]: stopping httpd
[2/21]: backing up ssl.conf
[3/21]: disabling nss.conf
[4/21]: configuring mod_ssl certificate paths
[5/21]: setting mod_ssl protocol list
[6/21]: configuring mod_ssl log directory
[7/21]: disabling mod_ssl OCSP
[8/21]: adding URL rewriting rules
[9/21]: configuring httpd
Nothing to do for configure_httpd_wsgi_conf
[10/21]: setting up httpd keytab
[11/21]: configuring Gssproxy
[12/21]: setting up ssl
[13/21]: configure certmonger for renewals
[14/21]: publish CA cert
[15/21]: clean up any existing httpd ccaches
[16/21]: configuring SELinux for httpd
[17/21]: create KDC proxy config
[18/21]: enable KDC proxy
[19/21]: starting httpd
[20/21]: configuring httpd to start on boot
[21/21]: enabling oddjobd
Done configuring the web interface (httpd).
Configuring Kerberos KDC (krb5kdc)
[1/1]: installing X509 Certificate for PKINIT
Done configuring Kerberos KDC (krb5kdc).
Applying LDAP updates
Upgrading IPA:. Estimated time: 1 minute 30 seconds
[1/11]: stopping directory server
[2/11]: saving configuration
[3/11]: disabling listeners
[4/11]: enabling DS global lock
[5/11]: disabling Schema Compat
[6/11]: starting directory server
[7/11]: updating schema
[8/11]: upgrading server
[9/11]: stopping directory server
[10/11]: restoring configuration
[11/11]: starting directory server
Done.
Restarting the KDC
Configuring DNS (named)
[1/11]: generating rndc key file
[2/11]: adding DNS container
[3/11]: setting up our zone
[4/11]: setting up our own record
[5/11]: setting up records for other masters 
https://www.centlinux.com/2020/02/install-freeipa-server-on-centos-8.html 6/16
12/8/2020 Install FreeIPA Server on CentOS 8 - CentLinux
[6/11]: adding NS record to the zones
[7/11]: setting up kerberos principal
[8/11]: setting up named.conf
[9/11]: setting up server configuration
[10/11]: configuring named to start on boot
[11/11]: changing resolv.conf to point to ourselves
Done configuring DNS (named).
Restarting the web server to pick up resolv.conf changes
Configuring DNS key synchronization service (ipa-dnskeysyncd)
[1/7]: checking status
[2/7]: setting up bind-dyndb-ldap working directory
[3/7]: setting up kerberos principal
[4/7]: setting up SoftHSM
[5/7]: adding DNSSEC containers
[6/7]: creating replica keys
[7/7]: configuring ipa-dnskeysyncd to start on boot
Done configuring DNS key synchronization service (ipa-dnskeysyncd).
Restarting ipa-dnskeysyncd
Restarting named
Updating DNS system records
Configuring client side components
This program will set up IPA client.
Version 4.8.0

Using existing certificate '/etc/ipa/ca.crt'.


Client hostname: freeipa-01.recipes.com
Realm: RECIPES.COM
DNS Domain: recipes.com
IPA Server: freeipa-01.recipes.com
BaseDN: dc=recipes,dc=com

Configured sudoers in /etc/authselect/user-nsswitch.conf


Configured /etc/sssd/sssd.conf
Systemwide CA database updated.
Adding SSH public key from /etc/ssh/ssh_host_ed25519_key.pub
Adding SSH public key from /etc/ssh/ssh_host_ecdsa_key.pub
Adding SSH public key from /etc/ssh/ssh_host_rsa_key.pub
WARNING: The configuration pre-client installation is not managed by auth
SSSD enabled
Configured /etc/openldap/ldap.conf
Configured /etc/ssh/ssh_config
Configured /etc/ssh/sshd_config
Configuring recipes.com as NIS domain.
Client configuration complete.
The ipa-client-install command was successful

=========================================================================
Setup complete

Next steps:
1. You must make sure these network ports are open:
TCP Ports:
* 80, 443: HTTP/HTTPS
* 389, 636: LDAP/LDAPS
* 88, 464: kerberos
* 53: bind
UDP Ports:
* 88, 464: kerberos
* 53: bind
* 123: ntp

2. You can now obtain a kerberos ticket using the command: 'kinit
This ticket will allow you to use the IPA tools (e.g., ipa use
and the web user interface. 
https://www.centlinux.com/2020/02/install-freeipa-server-on-centos-8.html 7/16
12/8/2020 Install FreeIPA Server on CentOS 8 - CentLinux

Be sure to back up the CA certificates stored in /root/cacert.p12


These files are required to create replicas. The password for these
files is the Directory Manager password
The ipa-server-install command was successful

Allow required service ports in CentOS 8 rewall.

[root@freeipa-01 ~]# firewall-cmd --permanent \


> --add-service={http,https,ldap,ldaps,kerberos,dns,ntp}
success
[root@freeipa-01 ~]# firewall-cmd --reload
success

Verify status of FreeIPA components.

[root@freeipa-01 ~]# ipactl status


Directory Service: RUNNING
krb5kdc Service: RUNNING
kadmin Service: RUNNING
named Service: RUNNING
httpd Service: RUNNING
ipa-custodia Service: RUNNING
pki-tomcatd Service: RUNNING
ipa-otpd Service: RUNNING
ipa-dnskeysyncd Service: RUNNING
ipa: INFO: The ipactl command was successful

Before starting administration of FreeIPA server, We need to acquire a Kerberos ticket.

[root@freeipa-01 ~]# kinit admin


Password for admin@RECIPES.COM:

Check list of available kerberos tickets.

[root@freeipa-01 ~]# klist


Ticket cache: KCM:0
Default principal: admin@RECIPES.COM

Valid starting Expires Service principal


02/07/2020 22:31:24 02/08/2020 22:31:17 krbtgt/RECIPES.COM@RECIPES.COM

You can see that, we have acquired a kerberos ticket for 24 hours.

Check FreeIPA existing con gurations.

[root@freeipa-01 ~]# ipa config-show


Maximum username length: 32
Maximum hostname length: 64
Home directory base: /home
Default shell: /bin/sh
Default users group: ipausers
Default e-mail domain: recipes.com
Search time limit: 2
Search size limit: 100
User search fields: uid,givenname,sn,telephonenumber,ou,title
Group search fields: cn,description
Enable migration mode: FALSE
Certificate Subject base: O=RECIPES.COM
Password Expiration Notification (days): 4
Password plugin features: AllowNThash, KDC:Disable Last Success
SELinux user map order: guest_u:s0$xguest_u:s0$user_u:s0$staff_u:s0-s0:
Default SELinux user: unconfined_u:s0-s0:c0.c1023 
https://www.centlinux.com/2020/02/install-freeipa-server-on-centos-8.html 8/16
12/8/2020 Install FreeIPA Server on CentOS 8 - CentLinux
Default PAC types: MS-PAC, nfs:NONE
IPA masters: freeipa-01.recipes.com
IPA master capable of PKINIT: freeipa-01.recipes.com
IPA CA servers: freeipa-01.recipes.com
IPA CA renewal master: freeipa-01.recipes.com
IPA DNS servers: freeipa-01.recipes.com

Con gure DNS Server settings:

Allow zone transfer from local network.

[root@freeipa-01 ~]# ipa dnszone-mod --allow-transfer=192.168.116.0/24 re


Zone name: recipes.com.
Active zone: TRUE
Authoritative nameserver: freeipa-01.recipes.com.
Administrator e-mail address: hostmaster.recipes.com.
SOA serial: 1581348934
SOA refresh: 3600
SOA retry: 900
SOA expire: 1209600
SOA minimum: 3600
Allow query: any;
Allow transfer: 192.168.116.0/24;

Add MX (Mail Exchange) record in DNS server.

[root@freeipa-01 ~]# ipa dnsrecord-add recipes.com @ --mx-rec="0 mail-ser


Record name: @
MX record: 0 mail-server.recipes.com
NS record: freeipa-01.recipes.com.

Export Users' Home Directories by using NFS server:

We need to install nfs-utils package to con gure a NFS server. FreeIPA has already
installed nfs-utils package as a dependency.

Enable and start nfs-server and rpcbind services.

[root@freeipa-01 ~]# systemctl enable --now nfs-server rpcbind


Created symlink /etc/systemd/system/multi-user.target.wants/nfs-server.se

Allow NFS server related ports in CentOS 8 rewall.

[root@freeipa-01 ~]# firewall-cmd --permanent --add-service={nfs,mountd,r


success
[root@freeipa-01 ~]# firewall-cmd --reload
success

Create a directory to store FreeIPA users' home directories.

[root@freeipa-01 ~]# mkdir /home/guests

Export users' home directories.



https://www.centlinux.com/2020/02/install-freeipa-server-on-centos-8.html 9/16
12/8/2020 Install FreeIPA Server on CentOS 8 - CentLinux
[root@freeipa-01 ~]# echo '/home/guests 192.168.116.0/24(rw,sync,no_subtr
[root@freeipa-01 ~]# exportfs -rav
exporting 192.168.116.0/24:/home/guests

Add NFS service in FreeIPA server.

[root@freeipa-01 ~]# ipa service-add nfs/freeipa-01.recipes.com


------------------------------------------------------
Added service "nfs/freeipa-01.recipes.com@RECIPES.COM"
------------------------------------------------------
Principal name: nfs/freeipa-01.recipes.com@RECIPES.COM
Principal alias: nfs/freeipa-01.recipes.com@RECIPES.COM
Managed by: freeipa-01.recipes.com

Add entry in keytab.

[root@freeipa-01 ~]# kadmin.local


Authenticating as principal admin/admin@RECIPES.COM with password.
kadmin.local: ktadd nfs/freeipa-01.recipes.com
Entry for principal nfs/freeipa-01.recipes.com with kvno 1, encryption ty
Entry for principal nfs/freeipa-01.recipes.com with kvno 1, encryption ty
Entry for principal nfs/freeipa-01.recipes.com with kvno 1, encryption ty
Entry for principal nfs/freeipa-01.recipes.com with kvno 1, encryption ty
kadmin.local: exit

Con gure default home directory and shell for new FreeIPA users.

[root@freeipa-01 ~]# ipa config-mod --homedirectory=/home/guests --defaul


Maximum username length: 32
Maximum hostname length: 64
Home directory base: /home/guests
Default shell: /bin/bash
Default users group: ipausers
Default e-mail domain: recipes.com
Search time limit: 2
Search size limit: 100
User search fields: uid,givenname,sn,telephonenumber,ou,title
Group search fields: cn,description
Enable migration mode: FALSE
Certificate Subject base: O=RECIPES.COM
Password Expiration Notification (days): 4
Password plugin features: AllowNThash, KDC:Disable Last Success
SELinux user map order: guest_u:s0$xguest_u:s0$user_u:s0$staff_u:s0-s0:
Default SELinux user: unconfined_u:s0-s0:c0.c1023
Default PAC types: MS-PAC, nfs:NONE
IPA masters: freeipa-01.recipes.com
IPA master capable of PKINIT: freeipa-01.recipes.com
IPA CA servers: freeipa-01.recipes.com
IPA CA renewal master: freeipa-01.recipes.com
IPA DNS servers: freeipa-01.recipes.com

Create a FreeIPA user:

Create a new FreeIPA user with the help of following command.

[root@freeipa-01 ~]# ipa user-add ipauser1 --first=ahmer --last=mansoor -


Password:
Enter Password again to verify:
--------------------- 
https://www.centlinux.com/2020/02/install-freeipa-server-on-centos-8.html 10/16
12/8/2020 Install FreeIPA Server on CentOS 8 - CentLinux
Added user "ipauser1"
---------------------
User login: ipauser1
First name: ahmer
Last name: mansoor
Full name: ahmer mansoor
Display name: ahmer mansoor
Initials: am
Home directory: /home/guests/ipauser1
GECOS: ahmer mansoor
Login shell: /bin/bash
Principal name: ipauser1@RECIPES.COM
Principal alias: ipauser1@RECIPES.COM
User password expiration: 20200210162435Z
Email address: ipauser1@recipes.com
UID: 181000001
GID: 181000001
Password: True
Member of groups: ipausers
Kerberos keys available: True

Create home directory for FreeIPA user.

[root@freeipa-01 ~]# mkdir -m0750 -p /home/guests/ipauser1


[root@freeipa-01 ~]# chown 181000001:181000001 /home/guests/ipauser1

Our FreeIPA server has been con gured successfully. Alternatively, you can perform
administration of FreeIPA server by using the Web UI provided herewith.

Open URL http://freeipa-01.recipes.com in a browser.

Login as admin user.

Add a CentOS 8 Client in FreeIPA Server:

We are adding a CentOS 8 machine to FreeIPA server.

[root@freeipa-01 ~]# ipa host-add --ip-address 192.168.116.207 ipaclient.


ipa: WARNING: The host was added but the DNS update failed with: DNS reve
----------------------------------
Added host "ipaclient.recipes.com"
----------------------------------
Host name: ipaclient.recipes.com
Principal name: host/ipaclient.recipes.com@RECIPES.COM
Principal alias: host/ipaclient.recipes.com@RECIPES.COM
Password: False 
https://www.centlinux.com/2020/02/install-freeipa-server-on-centos-8.html 11/16
12/8/2020 Install FreeIPA Server on CentOS 8 - CentLinux
Keytab: False
Managed by: ipaclient.recipes.com

Add our CentOS 8 machine in DNS server.

[root@freeipa-01 ~]# ipa dnsrecord-add recipes.com ipaclient --ttl=3600 -


Record name: ipaclient
Time to live: 3600
A record: 192.168.116.207

Con gure CentOS 8 machine as FreeIPA Client:

To con gure a CentOS 8 machine as FreeIPA client, we need to install following packages
on it.

[root@ipaclient ~]# dnf module install -y idm:DL1/client


...
libwbclient-4.10.4-101.el8_1.x86_64
nfs-utils-1:2.3.3-26.el8.x86_64
python3-chardet-3.0.4-7.el8.noarch
python3-dns-1.15.0-8.el8.noarch
python3-libipa_hbac-2.2.0-19.el8.x86_64
python3-pysocks-1.6.8-3.el8.noarch
python3-requests-2.20.0-2.1.el8_1.noarch
python3-sss-2.2.0-19.el8.x86_64
python3-sss-murmur-2.2.0-19.el8.x86_64
python3-sssdconfig-2.2.0-19.el8.noarch
python3-urllib3-1.24.2-2.el8.noarch
quota-1:4.04-10.el8.x86_64
quota-nls-1:4.04-10.el8.noarch
rpcbind-1.2.5-4.el8.x86_64
samba-client-libs-4.10.4-101.el8_1.x86_64
samba-common-4.10.4-101.el8_1.noarch
samba-common-libs-4.10.4-101.el8_1.x86_64
sssd-common-pac-2.2.0-19.el8.x86_64
sssd-ipa-2.2.0-19.el8.x86_64
sssd-krb5-common-2.2.0-19.el8.x86_64
sssd-tools-2.2.0-19.el8.x86_64
xmlrpc-c-1.51.0-5.el8.x86_64
xmlrpc-c-client-1.51.0-5.el8.x86_64

Complete!

Con gure autofs to automatically mount the FreeIPA users' home directory on ipaclient
machine after successful login.

[root@ipaclient ~]# echo '* -rw 192.168.116.206:/home/guests/&' >> /etc/a


[root@ipaclient ~]# echo '/home/guests /etc/auto.guests' >> /etc/auto.mas

Enable and start autofs service.

[root@ipaclient ~]# systemctl enable --now autofs.service


Created symlink /etc/systemd/system/multi-user.target.wants/autofs.servic

Add DNS server in network con gurations of CentOS 8 client.

[root@ipaclient ~]# nmcli c m ens33 ipv4.dns 192.168.116.206


[root@ipaclient ~]# nmcli c down ens33 ; nmcli c up ens33 
https://www.centlinux.com/2020/02/install-freeipa-server-on-centos-8.html 12/16
12/8/2020 Install FreeIPA Server on CentOS 8 - CentLinux
Connection 'ens33' successfully deactivated (D-Bus active path: /org/free
Connection successfully activated (D-Bus active path: /org/freedesktop/Ne

Test DNS resolution by using dig command.

[root@ipaclient ~]# dig freeipa-01.recipes.com

; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el8 <<>> freeipa-01.recipes.com


;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31792
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: f52733a39c74976ba8570e005e42d2172f9f5e5797eab7b3 (good)
;; QUESTION SECTION:
;freeipa-01.recipes.com. IN A

;; ANSWER SECTION:
freeipa-01.recipes.com. 1200 IN A 192.168.116.206

;; AUTHORITY SECTION:
recipes.com. 86400 IN NS freeipa-01.recipes.com.

;; Query time: 37 msec


;; SERVER: 192.168.116.206#53(192.168.116.206)
;; WHEN: Tue Feb 11 21:11:03 PKT 2020
;; MSG SIZE rcvd: 109

Con gure CentOS 8 client as follows.

[root@ipaclient ~]# ipa-client-install \


> --enable-dns-updates \
> --mkhomedir \
> --ntp-server=192.168.116.206:323
This program will set up IPA client.
Version 4.8.0

Discovery was successful!


Client hostname: ipaclient.recipes.com
Realm: RECIPES.COM
DNS Domain: recipes.com
IPA Server: freeipa-01.recipes.com
BaseDN: dc=recipes,dc=com
NTP server: 192.168.116.206:323

Continue to configure the system with these values? [no]: yes


Synchronizing time
Augeas failed to configure file /etc/chrony.conf
Using default chrony configuration.
Attempting to sync time with chronyc.
Time synchronization was successful.
User authorized to enroll computers: admin
Password for admin@RECIPES.COM:
Successfully retrieved CA cert
Subject: CN=Certificate Authority,O=RECIPES.COM
Issuer: CN=Certificate Authority,O=RECIPES.COM
Valid From: 2020-02-06 18:32:37
Valid Until: 2040-02-06 18:32:37

Enrolled in IPA realm RECIPES.COM


Created /etc/ipa/default.conf 
https://www.centlinux.com/2020/02/install-freeipa-server-on-centos-8.html 13/16
12/8/2020 Install FreeIPA Server on CentOS 8 - CentLinux
Configured sudoers in /etc/authselect/user-nsswitch.conf
Configured /etc/sssd/sssd.conf
Configured /etc/krb5.conf for IPA realm RECIPES.COM
Systemwide CA database updated.
Missing reverse record(s) for address(es): 192.168.116.207, fd15:4ba5:5a2
Adding SSH public key from /etc/ssh/ssh_host_ed25519_key.pub
Adding SSH public key from /etc/ssh/ssh_host_ecdsa_key.pub
Adding SSH public key from /etc/ssh/ssh_host_rsa_key.pub
SSSD enabled
Configured /etc/openldap/ldap.conf
Configured /etc/ssh/ssh_config
Configured /etc/ssh/sshd_config
Configuring recipes.com as NIS domain.
Client configuration complete.
The ipa-client-install command was successful

Edit SSH con gurations to use our FreeIPA service.

[root@ipaclient ~]# vi /etc/ssh/sshd_config

Find and set following directives in this le.

KerberosAuthentication no
UsePAM yes

Restart sshd.service to apply changes.

[root@ipaclient ~]# systemctl restart sshd.service

Now login as ipauser1.

[root@ipaclient ~]# su - ipauser1


[ipauser1@ipaclient ~]$ mount | grep /ipauser1
192.168.116.206:/home/guests/ipauser1 on /home/guests/ipauser1 type nfs4

You can see that the home directory for user ipauser1 has been mounted by autofs
service.

We have successfully installed FreeIPA server on CentOS 8 and con gured a CentOS 8
client to use FreeIPA services.

SUBSCRIBE VIA EMAIL

Enter Email SUBMIT

SHARE THIS:  Facebook  Twitter  Pinterest  Linkedin

Newer Article Older Article


Install Anonymous FTP Server On CentOS 8 How To Install PhpMyAdmin On CentOS 8

You May Also Like These:


https://www.centlinux.com/2020/02/install-freeipa-server-on-centos-8.html 14/16
12/8/2020 Install FreeIPA Server on CentOS 8 - CentLinux

3 C O M M E NTS :

. Arsalan Anwar
 14 February 2020 at 10:38

really helpful

Reply

2. BlackSwan
 17 May 2020 at 18:21

wow thank you man. I actually looked all over the internet for FreeIPA straight & forward con guration tutorial but
i failed miserably, until i see your post. Thanks bro!

Reply

Replies
1. Ahmer Mansoor
 17 May 2020 at 19:51

Pleasure is mine.

Reply

Enter your comment...

Comment as: Thompson Fred Sign out

Publish Preview Notify me

Categories Popular Posts Newsletter

› Ansible H o w t o u p g ra d e C e n t O S 7 t o Enter your email address to subscribe to this


CentOS 8 Server blog and receive noti cations of new posts
› CentOS by email.
Configure a Cer tificate Email address...
› CyberSecurity Authority (CA) in CentOS 7
SUBMIT
› DevOps
Setup a PXE Boot Server in
› D o c ke r
RHEL/CentOS 7

› H i g h Ava i l a b i l i t y ( H A ) I n s t a l l Z i m b ra M a i l S e r v e r

› Nagios
on CentOS 7

https://www.centlinux.com/2020/02/install-freeipa-server-on-centos-8.html 15/16
12/8/2020 Install FreeIPA Server on CentOS 8 - CentLinux

› O ra c l e I n s t a l l A n s i b l e AW X w i t h
Docker-Compose on CentOS
› R e v e r s e P rox y 7

› XMPP

Crafted with  by Templatesyard | Distributed By Gooyaabi Templates


https://www.centlinux.com/2020/02/install-freeipa-server-on-centos-8.html 16/16

You might also like