If you have forgotten your root password for a JSA physical or virtual appliance, you can reset your root password as long as you have access to the GRUB bootloader (console access).
This article lists the steps to do so.
Unable to log in to the Command Line Interface (CLI) of the server by using the root credentials
To recover a forgotten or lost password, perform the following steps:
- Boot your system and wait until the GRUB2 menu appears. Use the ↑ or ↓ keys to interrupt the booting process.
- Select the first operating system (likely Red Hat Enterprise Linux Server) and then press "e" to edit.
-
Find the line beginning with Linux. In this example, the line begins with linux16.
-
Using the right arrow keys, append "init=/bin/sh
" to the line that starts with the keyword "linux" (in this example, linux16).
-
To reboot your system now by using the options specified, press the keys Ctrl + x. After the system has re-booted, you will be presented with a shell prompt without having to enter any username or password information.
- At this command prompt, you will need to enter the following commands:
-
Remount the "/
" root filesystem in Read/Write mode:
# mount -o remount,rw /
-
Issue the passwd
command to reset the root account password.
#passwd
-
In order to exit from the shell prompt and reboot the system, run the following command:
#exec /sbin/init 6
-
When your system is up, you should be able to log in with the new root
password.