If you forgot your root password on Linux…

Don’t worry! You can set a new one if you have sudo set up on your system.
See my post about setting up sudo on your linux box if you haven’t already…

sudo allows a regular user to perform single commands as root (or another user), this can be used to set a new password for root and is also safer than using su on it’s own for general admin tasks.

To set a new password for root::
[shady@localhost ~]$ sudo passwd
Password:
Changing password for user root.
New UNIX password:
Retype new UNIX password:
Password updated

[craig@localhost ~]$
Well done! Now you can be root again!

This entry was posted in Linux and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>