PSMP on SUSE/RHEL/CentOS - Prompted for password of PSMConnect user or Access Denied
Symptom
When trying to connect to a remote station through the SSH Proxy (PSMP), you are continuously prompted for the password of a user called PSMConnect. For example:
Using username "PSMConnect".
PSMConnect@<PSMP_IP>'s password:
When PSMP is installed in "Integrated" mode, you may also receive the following Access Denied error message seen in the Secure log:
unix_chkpwd[12071]: password check failed for user (PSMConnect)
PAM: password authentication failed for PSMConnect: Authentication failure
Failed password for PSMConnect from <IP> port 53530 ssh2
You may notice this message in /var/log/messages:
Failed password for psmconnect from <workstationIP> port <port> ssh2
Environment
9.10;10.0;10.1;10.2;10.3;10.4;10.5;10.6;10.7;10.8;10.9;10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0;12.1;12.2;11.9;11.8;12.4;12.3;12.5;12.6;12.7;13.0;13.2 Privileged Access Manager (PAM, self-hosted) PSMP
PSMP
InstallCyberArkSSHD=Yes
PSMP-SSH
Cause
PSMP connections are made using a local user called PSMConnect that invokes the PSMP process. The user is configured to authenticate transparently, so if the above message is displayed then the PSMConnect user has failed to authenticate.
Possible reasons:
1. The PSMConnect account's password is not empty or has expired.
2. Authentication with an empty password is not allowed via SSH to the PSMP server.
3. nullok is not defined in the PAM configuration for pam_unix authentication. This could happen if the PAM module was hardened by the customer organization during initial image deployment or outside of the standard PSMP hardening process.
4. Because of the above pam_faillock has locked the account from being used.
Resolution
1. Run the command "passwd -d PSMConnect" to set the PSMConnect user's password to an empty value. You will also want to ensure that the password policy for this user is set to never expire**
2. In the /etc/ssh/sshd_config file, ensure that PermitEmptyPasswords is set to yes.** If this line is not set, set it then save the file and restart the SSH service:
PermitEmptyPasswords yes
3. Make the following adjustment to the PAM module on the PSMP server. After making the changes, check with the Unix Administration team to verify there isn't any Unix baseline configuration management software or security application that could revert these changes on the PSMP server.
For RHEL/CentOS:
The authentication module to modify is in /etc/pam.d/password-auth. Please ensure that nullok is listed in the auth sufficient line. Example:
auth sufficient pam_unix.so nullok try_first_pass
For SUSE:
The authentication module to modify is in /etc/pam.d/common-auth-pc. Please ensure that the following line is listed:
auth sufficient pam_unix.so nullok try_first_pass
4. If the linux pam module pam_faillock.so is part of your linux pam workflow/solution, ensure that the PSMConnect account is not locked:
faillock --user PSMConnect --reset
**Note:
There is no security concern to allow the PSMConnect user to connect with an empty password, since the PSMP connections are initiated specifically with the PSMConnect user, which is configured to invoke the PSMP process upon authentication. This user is restricted only to initiating PSMP, and the first step in the PSMP process is to authenticate the end user to the vault. Without a valid vault authentication, the PSMConnect user cannot compete the PSMP process and therefore cannot authenticate to the server.
Additional Information
Details
SYMPTOM:When trying to connect to a remote station through the SSH Proxy (PSMP), you are continuously prompted for the password of a user called PSMConnect. For example:
When PSMP is installed in "Integrated" mode, you may also receive the following Access Denied error message seen in the Secure log:
unix_chkpwd[12071]: password check failed for user (PSMConnect)
PAM: password authentication failed for PSMConnect: Authentication failure
Failed password for PSMConnect from <IP> port 53530 ssh2
You may notice this message in /var/log/messages:
Failed password for psmconnect from <workstationIP> port <port> ssh2
PROBLEM:
PSMP connections are made using a local user called PSMConnect that invokes the PSMP process. The user is configured to authenticate transparently, so if the above message is displayed then the PSMConnect user has failed to authenticate.
Possible reasons:
1. The PSMConnect account's password is not empty or has expired.
2. Authentication with an empty password is not allowed via SSH to the PSMP server.
3. nullok is not defined in the PAM configuration for pam_unix authentication. This could happen if the PAM module was hardened by the customer organization during initial image deployment or outside of the standard PSMP hardening process.
4. Because of the above pam_faillock has locked the account from being used.
SOLUTION:
1. Run the command "passwd -d PSMConnect" to set the PSMConnect user's password to an empty value. You will also want to ensure that the password policy for this user is set to never expire**
2. In the /etc/ssh/sshd_config file, ensure that PermitEmptyPasswords is set to yes.** If this line is not set, set it then save the file and restart the SSH service:
PermitEmptyPasswords yes
3. Make the following adjustment to the PAM module on the PSMP server. After making the changes, check with the Unix Administration team to verify there isn't any Unix baseline configuration management software or security application that could revert these changes on the PSMP server.
For RHEL/CentOS:
The authentication module to modify is in /etc/pam.d/password-auth. Please ensure that nullok is listed in the auth sufficient line. Example:
auth sufficient pam_unix.so nullok try_first_pass
For SUSE:
The authentication module to modify is in /etc/pam.d/common-auth-pc. Please ensure that the following line is listed:
auth sufficient pam_unix.so nullok try_first_pass
4. If the linux pam module pam_faillock.so is part of your linux pam workflow/solution, ensure that the PSMConnect account is not locked:
faillock --user PSMConnect --reset
**Note:
There is no security concern to allow the PSMConnect user to connect with an empty password, since the PSMP connections are initiated specifically with the PSMConnect user, which is configured to invoke the PSMP process upon authentication. This user is restricted only to initiating PSMP, and the first step in the PSMP process is to authenticate the end user to the vault. Without a valid vault authentication, the PSMConnect user cannot compete the PSMP process and therefore cannot authenticate to the server.