Linux command line- how to set root password in Ubuntu 12.04 LTS version

Read this article and use the Linux shell commands from a terminal window & know how to set the root password in Ubuntu 12.04 LTS version from command line. After setting the password for ROOT user in Ubuntu cross check it.

Ubuntu has no root password by default, you need to set it.

The Steps:

  • You need to login as the first user. Here my username is bikram.
  • If you have a fresh Ubuntu installation, there is no password set for root user.
$ sudo -u root passwd
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully

bikram@linux:~$ su - root

Lost Root Password ? If you have forgotten the root password or lost it then read this article to recover it.

Learn Linux in Kolkata, Shell programming, Linux partitioning and more. Visit This Page or call (+91) 9163111390