Shady Goings On

28/2/2008

If you forgot your root password on Linux…

Filed under: — ShadyCraig @ 8:00 pm
         

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!

Leave a Reply

  • Categories

  • Meta

  • Listed on BlogShares
  • Valid CSS!
  • Valid XHTML 1.0!
  • Powered by WordPress