Introduction
This document describes the procedure for recovering lost CLI passwords for usernames 'root' and 'cmxadmin' for CMX 10.5 & above.
Pre-requisites
Requirements
None
Components used
CMX 10.5 VM
Procedure
CMX 10.5 (and above) runs on CentOS 7 as shown below:
Console access is required for this procedure. It could be the VM Console or the physical console depending on the type of appliance used in the deployment.
Step 1
Restart the CMX server and wait until the GRUB boot screen shows up. Select the highlighted option (for rescue mode) & press "e" to edit.
Note:
For CMX 10.6 & above, if prompted for a username and/or password, enter the credentials as username: root and password: password (not the configured root password on the server).
Step 2
Scroll down to the line which starts with "linux16" and remove the "rhgb quiet" parameter at the end of the line. (In latest versions, it can be "rhgb quiet rd.shell = 0")
Step 3
After removing the parameter in Step 2, add the option "rd.break enforcing=0" on the same line.
Step 4
Once complete, press CTRL + X to load the system and boot in Emergency mode. You would notice a new prompt.
Step 5
Remount the file system to be able to write to it, as it is mounted for read-only using the command below:
mount -o remount, rw /sysroot
Step 6
Change the file system root as shown and you would notice the prompt change once complete.
chroot /sysroot
Step 7
Change the password using the passwd <username> command. In the example below, passwords for both cmxadmin and root usernames are changed.
Step 8
Remount the filesystem as Read only using this command:
mount -o remount, ro /
Step 9
Type 'exit' two times to get to the CMX login menu
You are now be able to login with your new credentials