Pages

How To Change The Root's Password In Linux/Ubuntu

When you first install Ubuntu you're asked to create a default user account to which the system automatically adds up administrative privileges (not as powerful as root but some privileges).

But if you want to be the real root of your system by using the "su" command in Terminal then when you're asked for the Root password, then you're stuck at it unless you change the default password (which is chosen using a random hash during the installation process) to a desired one.

So, without using any GUI tools, how can you change the Root's password in Ubuntu or Linux in general. We'll it it's simple actually, first open your Terminal and issue the following command...

sudo passwd root

Now you'll be asked to give a new password (twice), then enter the desired one. But remember, by default the root password is chosen as said before by using a random hash, so, if you override it using a weaker password, then your Linux may be easily hacked. So when choosing a password, make sure to give a strong one!. 

4 comments:

Anonymous said...

great... works. My sysadmin didnt tell my machine root password, now i changed it :)

Gayan said...

OMG! ;-)...

Anonymous said...

Did not work for me. Only old password still works in everything. I can't seem to figure it out, yet.

Gayan said...

@Anonymous,

That's strange. After you changed the password, did the Terminal give you an output saying that it was successful? ...

Post a Comment