This section describes how to edit the application-specific files of your choice in the
/etc/pam.d directory to use the IBM® MFA PAM module. You can also use the
authconfig tool to configure PAM instead of manually editing the PAM
configuration files, as described in the Red Hat Enterprise Linux® for IBM Z® and LinuxONE
documentation.
About this task
To use the IBM MFA PAM module, complete the
following steps:
Procedure
-
Use an editor of choice to edit the application-specific files of your choice in the
/etc/pam.d directory on the Red Hat Enterprise Linux for IBM Z and LinuxONE
client system.
-
Change the auth section to use the IBM MFA PAM module pam_azf.so and optionally
pam_azf_fallback.so.
The pam_azf.so module must be marked sufficient. If
used, the pam_azf_fallback.so module must be marked
required in the file.
For example, for sshd the entry might be as follows:
#%PAM-1.0
auth required pam_sepermit.so
auth sufficient pam_azf.so /etc/security/azf/pam_azf.conf
auth required pam_azf_fallback.so /etc/security/azf/pam_azf.conf
auth substack password-auth
auth include postlogin
In this example:
- If the pam_azf.so module succeeds, the user is logged in with their
IBM MFA credentials.
- If the pam_azf.so module fails, the
pam_azf_fallback.so module is checked to determine whether the password
fallback is enabled for the user:
- If it is enabled, the pam_azf_fallback.so module succeeds. The
password-auth value prompts the user for their Red Hat Enterprise Linux for IBM Z and LinuxONE password.
- If password fallback is not enabled for the user, the pam_azf_fallback.so
module fails. password-auth value prompts the user for their Red Hat Enterprise Linux for IBM Z and LinuxONE password, but they cannot use the password to log in.
-
Save the changes.
-
For the sshd example, you must also edit the
/etc/ssh/sshd_config file and change the
ChallengeResponseAuthentication value to yes:
# Change to no to disable s/key passwords
ChallengeResponseAuthentication yes
#ChallengeResponseAuthentication no
-
Save the changes.
-
For the sshd example, restart the sshd service:
# systemctl restart sshd.service
-
Any user who attempts to log in by using an application that uses IBM MFA authentication must be provisioned for IBM MFA, as described in Provisioning IBM MFA users.