You are on page 1of 3

Ho to change the Linux user password.

Use the command mentioned bellow to change password of any user

passwd username

Example = is username is abc then command would be like this

passwd abc

it will prompt for new password after that you have to verify password

A step-by-step Linux password resenting method - How to reset Linux forgotten root password?

Reboot the Linux machine by pressing the hardware reset button. In a default Linux installation, pressing
CTRL + ALT + DEL hotkey might able to reboot Linux immediately too.

Upon Linux booting up to GRUB loader GUI, move the arrow key up/down to highlight and select the
Linux kernel and press e to edit the GRUB commands before booting:

Next, move the arrow key up/down to select the Linux kernel and press e again:
Append a single space followed by the word single at the end of edited line, as shown in this
snapshot:

After pressing ENTER key, you should now have a similar GRUB screenshot as of follow. Keep the Linux
kernel highlighted and press b to boot up with the “single” keyword, which will boot Linux into single
user maintenance mode:
Once the Linux boot up completely into single user maintenance mode, the Linux command prompt is
ready to execute command. Now, you can type passwd to reset the forgotten root password - without
prompting for old root password, just type a new root password and re-type to confirm:

Done. Type reboot or exit to reboot. On next boot up, you can login with the new root password!

This has been tested on Red Hat Linux 9 default installation environment. So, I believe the same method
can be applied on most Linux distribution as well. However, bear in mind that the method will only valid
for a default Linux installation or without strengthening Linux security!

You might also like