Tuesday, March 8, 2011

Set up root password for Ubuntu

Ubuntu has no password for root user as default. If you want to reset root password, you need to use sudo passwd command in shell. To Open shell, click Applications » Accessories » Terminal. In shell, type sudo passwd. It will ask you password. Type your login password.

rkm@rkm-desktop:~$ sudo passwd

And then it will ask you to reset password for root. Type it twice

Enter new UNIX password:
Retype new UNIX password:



After reset root password. It will show this message in Shell.

passwd: password updated successfully

Now you can login as root by typing su command

rkm@rkm-desktop:~$ su
Password:
root@rkm-desktop:/home/rkm#