CPM - Unable to manage the root account on PSMP
Symptom
Users may encounter authentication failures when attempting to manage or rotate root accounts stored in Idira for the PSM for SSH server (formerly known as PSMP). The error message typically received when using a PSM session (Connect Button) is:
PSMSH021E - Authentication failure for user root. Program will be closed.
Additionally, attempts to reconcile the account or change the password may fail with error messages displayed in PVWA such as:
- Reconcile Error: CACPM406E Reconciling Password, Error: Execution error. EXT01::Permission denied (password). Error code: 2114
- Password Change Error: ImmediateTask. Failure Description: Execution error. EXT01::Permission denied (password). Error code: 2114
Environment
12.6 Privileged Access Manager (PAM, self-hosted) Central Policy Manager (CPM)
CPM and PSM for SSH server (Formally known as PSMP)
Cause
As part of hardening the PSM for SSH server and enforcing security best practices, after installing PSM for SSH, the root user will not be able to authenticate to the PSM for SSH server remotely using a password.
If an administrative user (proxymng) for maintenance purposes is not created in advance, access for maintenance will only be possible either by console access or by authenticating the root user with an SSH key.
If created initially (typically during installation), the proxymng account can replace the root account for management purposes, or it can be used as a logon account for the root account if you still wish to manage it.
Alternatively, you could use another maintenance account (if there are more than one) as a logon account and ensure they have su permissions, which can be done by adding them to the wheel group.
The reason for the PSMConnect error is that the server checks if root is a maintenance user and doesn't find it listed, so it defaults to using PSMConnect to connect to the PSM server. The PSM Server then redirects to the target, passing the root account, but since the PSMP server address is given, it fails.
Resolution
First, determine whether the PSM for SSH server was installed in Yes mode or Integrated mode. To do this, run the following command on the PSM:
rpm -qa | grep psmp
If you see the infra package, it is installed in Integrated mode. Otherwise, it is in Yes mode.
Example output for Integrated mode:
CARKpsmp-infra-12.02-0.10.x86_64
CARKpsmp-12.02.0-10.x86_64
For Integrated Mode:
- Open the SSHD configuration file located at /etc/ssh/sshd_config.
- Add the following parameter:
AllowGroups PSMConnectUsers <MaintenanceGroupName1>..<MaintenanceGroupNameN>
<MaintenanceGroupName1> is a custom group name you can create. Add the maintenance users to this group and define the group name without any braces.
For Yes Mode:
- Open the SSHD configuration file located at /etc/ssh/sshd_config.
- Add the following parameter:
PSMP_MaintenanceUsers <username>,<username>
You can specify usernames directly or use wildcards (*). For example:
PSMP_MaintenanceUsers user1,*user2,user3*,*user4*
This configuration allows specific administrative users.
- Save the changes and restart the SSHD service:
/etc/init.d/sshd restart
Once all of these steps are completed, attempt to verify, change, or reconcile the account again. If the issue persists, please open a support case for further assistance.