If I forget the root password

How I could know the root password if I forget it ( Using RedHat 5.2 ) or at least login to the system to change it????
Who is Participating?
bahdb0yyConnect With a Mentor Commented:
It is impossible to know the root password, since this root password iis, like all other passwords on your Linux box, stored in the /etc/password or /etc/shadow file, using the crypt(); function, which only has the possibility to crypt and store and to check if a password matches.

Decryption is not available because of obvious security reasons.

It is possible to change the root password of your box however by booting into single user mode (kernel option -s, ie. If your boot-configuration boots 'linux' as default, booting into single-user mide would be done by typeing 'linux -s' at your LILO prompt.

The system will put you in a root prompt on the console, where you can do anything including the 'passwd' command, do set your password.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.