Saturday, June 29, 2013

Change Ubuntu root Password

Step 1:

Switch the computer on. Go to Grub menu. Generally it appears automatically, if not then HOLD DOWN the SHIFT KEY until the boot menu appears. In the grub menu, choose for therecovery mode option.
It will bring you a black screen with several lines of output being displayed in a flash. Wait for few seconds here.

Step 2:

Now you will be present with different options of recovery mode. Here you need to choose “Root Drop into root shell prompt“. Like in the picture below:

Step 3:

Here, you will be presented with root access (why? Is this not a security fault?) without prompting any password. Use the following command to list all the users available:
ls  /home
From the previous command choose the “username” for which you want to reset or (say) hack the password. Now, use the following command to reset the password for the selected “username“:
passwd username
It prompts for new password. Enter the new password twice:
Enter new UNIX password:
Retype new UNIX password:
Voilà! There you go. You have just cracked it and now you can easily enter into the system.

Possible Troubleshoot:

While entering the new password you might be prompt with Authentication manipulation error like this:
passwd username
Enter new UNIX password:
Retype new UNIX password:
passwd: Authentication token manipulation error
passwd: password unchanged
The reason for this error is that file system is mounted with read access only. Change the access and remount the file system in the following manner:
mount -rw -o remount /
Now try to reset the password again. It should work now.


No comments:

Post a Comment