[STICKY] How to Reset a Forgotten Password

[STICKY] How to Reset a Forgotten Password

Postby DanYHKim » Fri Aug 23, 2013 6:57 pm

Unlike Windows, Zorin-OS (and Ubuntu, I suppose) does not have a "password hint" feature. Because of this, I often forget my password. When I need to run updates, etc, I can't authenticate myself, and so I'm stuck. Am I the only one with this problem? Lately, I've written on my installation DVD: "WRITE YOUR PASSWORD" so I won't forget.

Still, it happens. I just looked up "How do I reset a lost administrative password" on the Ask Ubuntu site, which has the answer.

Briefly, you select the recovery mode boot option from the GRUB2 menu, and then use the passwd command to create a new password for your user account.

Here are the instructions, quoted mostly directly from the Ask Ubuntu page:

By default the first user's account is an administrative account, so if the UI is prompting you for a password it's probably that person's user password. If the user doesn't remember their password you need to reset it. To do this you need to boot into recovery mode.

Boot up the machine, and after the BIOS screen, hold down the left Shift key. You will then be prompted by a menu that looks something like this:

[Screenshot of the GRUB2 Menu]

(In my computers, GRUB2 will open this menu by default and give you five seconds to respond)

Select "recovery mode" boot option

Scroll down the list to the "root - drop to root shell prompt" option (or netroot, but it doesn't matter)

You should now see a root prompt, something like this:
Code: Select all
root@ubuntu:~#

At this stage it is possible you have a read-only filesystem. You have to remount it with write permissions:
Code: Select all
mount -rw -o remount /

Once you're at the root shell prompt, if you have forgotten your username as well, type
Code: Select all
ls /home (small letters & not capitals).

This will list all the user accounts in your set up.

Now we can set the user's password with the "passwd" command. (In this example I will use jorge as the example, you need to substitute whatever the user's username is):
Code: Select all
passwd jorge (username is "jorge")
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@ubuntu:~#

Type in what you want the new password to be at the prompt. After it's successful reboot the machine and the user will be able to log in with their new password.

In the past, I've re-installed Zorin-OS out of frustration, which maybe makes me look stupid. Still, I hope it helps someone else to know this.
User avatar
DanYHKim
 
Posts: 51
Joined: Tue Mar 13, 2012 3:32 pm

Return to How-tos and Tutorials

Who is online

Users browsing this forum: No registered users and 3 guests