Red Hat Enterprise Linux 8 Essentials Book now available.
Purchase a copy of Red Hat Enterprise Linux 8 (RHEL 8) Essentials in eBook ($24.99) or Print ($36.99) format
Red Hat Enterprise Linux 8 Essentials Print and eBook (ePub/PDF/Kindle) editions contain 31 chapters and over 250 pages
6.2. Enabling Smart Card Login on Red Hat Enterprise Linux
Smart card login for Red Hat Enterprise Linux servers and workstations is not enabled by default and must be enabled in the system settings.
Using single sign-on when logging into Red Hat Enterprise Linux requires these packages:
Log into the system as root.
Download the root CA certificates for the network in base 64 format, and install them on the server. The certificates are installed in the appropriate system database using the certutil command. For example:
certutil -A -d /etc/pki/nssdb -n "root CA cert" -t "CT,C,C" -i /tmp/ca_cert.crt
In the top menu, select the System menu, select Administration, and then click Authentication.
Open the Authentication tab.
Click the Enable Smart Card Support checkbox.
When the button is active, click Configure smart card ....
There are two behaviors that can be configured for smart cards:
The Require smart card for login checkbox requires smart cards and essentially disables Kerberos password authentication for logging into the system. This should not be selected until after you have successfully logged in using a smart card.
The Card removal action menu sets the response that the system should take if the smart card is removed during an active session. Ignore means that the system continues functioning as normal if the smart card is removed, while Lock immediately locks the screen.
By default, the mechanisms to check whether a certificate has been revoked (Online Certificate Status Protocol, or OCSP, responses) are disable. To validate whether a certificate has been revoked before its expiration period, enable OCSP checking by adding the ocsp_on option to the cert_policy directive.
Open the pam_pkcs11.conf file.
Change every cert_policy line so that it contains the ocsp_on option.
cert_policy =ca, ocsp_on, signature;
Because of the way the file is parsed, there must be a space between cert_policy and the equals sign. Otherwise, parsing the parameter fails.
If the smart card is a CAC card, the PAM modules used for smart card login must be configured to recognize the specific CAC card.
As root, create a file called /etc/pam_pkcs11/cn_map.
Add the following entry to the cn_map file:
MY.CAC_CN.123454 -> login
MY.CAC_CN.123454 is the common name on the CAC card and login is the Red Hat Enterprise Linux login ID.
When a smart card is inserted, the pklogin_finder tool (in debug mode) first maps the login ID to the certificates on the card and then attempts to output information about the validity of certificates.
This is useful for diagnosing any problems with using the smart card to log into the system.