Unable to authenticate with Authentication Agent for PAM for SSH due to SELinux
Originally Published: 2023-05-17
Article Number
Applies To
RSA Product/Service Type: Authentication Agent for PAM
RSA Version/Condition: 8.x
Issue
For the PAM agent to work, SELinux must be disabled.
Tasks
- Properly set options to enable PAM, disable password authentication and set challenge response.
- Set list of users or groups to challenge.
- Create Linux users or groups.
- Disable SELinux.
Resolution
- Install the RSA Authentication Agent for PAM .
- Confirm that /etc/selinux/targeted/modules was created during the PAM agent install. If not, run mkdir to create it.
- On the agent machine, go to /var/ace.
- Create a text file named sdopts.rec with a the entry of CLIENT_IP= followed by the IP address of the server on which the PAM agent is installed. For example,
CLIENT_IP=86.76.30.9.
- Generate an sdconf.rec from the Security Console (Access > Authentication Agents > Generate Config File). Unzip the file and place the sdconf.rec file in /var/ace.
- Ensure that both the sdopts.rec file and the sdconf.rec file are owned by root:root and have the permissions of 644 (owner can read/write, group and world read only):
chown root:root sd*.rec
chmod 644 sd*.rec
chmod 644 sd*.rec
- Open /etc/ssh/sshd_config.
- Set the following parameters and save the changes:
UsePAM yes
PasswordAuthentication no
ChallengeResponseAuthentication yes
PasswordAuthentication no
ChallengeResponseAuthentication yes
- Restart sshd:
/bin/systemctl restart sshd.service
- Go to /etc/. The entire path must have -rw------- (600) root permission.
chmod 600 etc
- Open /etc/sd_pam.conf.
- Confirm that the variable for VAR_ACE points to the correct location of the sdconf.rec and sdopts.rec files.
- Set the ENABLE_USERS_SUPPORT parameter to 0 to enforce token authentication.
- In this file are two options: LIST_OF_USERS and LIST_OF_GROUPS. Only one can be enabled at a time. If both options are enabled, then LIST_OF_GROUPS supersedes LIST_OF_USERS. Comment out the option you do not want to use. Create either a list of users or list of groups. Values that you list must be colon separated, as shown:
LIST_OF_USERS=root:arya:catlyn:maergery:yara
or
LIST_OF_GROUPS=braavos:dragonstone:eyrie:oldtown
- Set the value for the INCL_EXCL_USERS=1 if using users. Set to 0 for groups.
- Save and close the file then restart sshd:
/bin/systemctl restart sshd.service
- Make sure that users or groups listed in step 14 are users and/or groups in Linux.
- To add users, run the useradd command:
sudo useradd arya
- To add groups, run the groupadd command:
sudo groupadd braavos
- If you add groups to Linux, you must populate them with users:
sudo usermod braavos arya
- Open /etc/pam.d/sshd in a text editor.
- Using a hashtag (#), comment out any lines beginning with auth.
- Underneath the lines that were just comented out, add the text auth required pam_securid.so then save and close the file.
- Change the following access permissions:
chmod 777 /var/ace
chmod -R 777 *
cd /etc/pam.d
chmod -R 777 *
cd /etc/sd_pam.conf
chmod -R 777
chmod -R 777 *
cd /etc/pam.d
chmod -R 777 *
cd /etc/sd_pam.conf
chmod -R 777
- Confirm if SELinux is enabled.
sudo sestatus command
- Open the SELinux configuration file with a text editor:
vi /etc/sysconfig/selinux
- Set SELINUX to disabled:
SELINUX=disabled
- Comment out SELINUXTYPE=targeted, as well.
- Save and close /etc/sysconfig/selinux.
- Reboot the server to have changes take effect.
- Test authentication locally with a user from step 14:
ssh arya@localhost
Related Articles
Users unable to authenticate with LDAP password on both Security Console and Self-Service Console for RSA Authentication M… 207Number of Views Unable to authenticate to RADIUS server from SonicWALL RADIUS client in RSA Authentication Manager 8.x 504Number of Views Unchallenged Active Directory users fail to authenticate with RSA Authentication Agent for PAM 284Number of Views Unable to Authenticate to vCenter – "Signature Certificate Verification Failed: Signature Does Not Match" 15Number of Views Users are unable to authenticate to external Self-Service Portal (SSP) after RSA Authentication Manager Integration Servic… 136Number of Views
Trending Articles
Passwordless Authentication in Windows MFA Agent for Active Directory – Quick Setup Guide RSA Authentication Manager 8.9 Release Notes (January 2026) RSA Authentication Manager Upgrade Process RSA Authentication Manager 8.7 SP2 Setup and Configuration Guide An example of SSO using SAML and ADFS with RSA Identity Management and Governance 6.9.x
Don't see what you're looking for?