If you don't know root password on RHEL 5. it is straight forward. Reboot to the single user mode and change the password using passwd.
How to boot to the single user mode.
When system reboot, Press Enter and Highlight Kernel line and press E. Enter single or s at the end of the line and enter.
Enter b to boot to the single user mode.
You will get # and type passwd to change the password.
Reboot the system
The only difference in RHEL 6 is, we have to disable selinux to be able to change the root password in the single user mode.
How to disable seLinux
Use following command to verify, whether is enabled or not.
# /usr/sbin/getenforce
Edit /etc/selinux/config file and change following line
SELINUX=enforcing to disabled and reboot the system to the single user mode using same steps as RHEL 5. Change the password using passwd
No comments:
Post a Comment