Skip to content

Password

“Write this to the angel of the church in Philadelphia: “Here is a message from the one who is holy and true, the one who holds the key of David. When he opens something, it cannot be closed. And when he closes something, it cannot be opened.

Revelation of John 3:8 (ERV)

PASSWORD VS PASSPHRASE

Beyond requiring six characters and some basic entropy checks; almost any password, (including incredibly weak ones) may be used and never expire. Passphrases are highly recommended. A passphrase should be easy to remember, but difficult for others to guess; even with the help of sophisticated hardware and software [example: cupcakes fancy rumble swatch].

More about Passphrases Password Vs Passphrase: Here’s 5 Reasons to Use Passphrase by Password Dragon, Password Strength Explained by the xkcd WebComic #936, The Diceware Passphrase Home Page and the Diceware Passphrase Generator.

Lock

CHANGING A PASSWORD

Change the root / sudo password with the single command, passwd. Notice there is no letter “o” or  letter “r” in passwd. You’ll be asked for the current password then the new password twice. As always when typing the sudo password, you’ll see no indication of it in the Terminal. If the new password is too similar to the old one, the system won’t accept it and you’ll have to think of a new one.

Open a Terminal [Ctrl]+[Alt]+[T] and type:
passwd, press [Enter] and type:
The current password, press [Enter] and type:
The new password press [Enter] and type:
The new password again and press [Enter]

Changing the root user password

Change the password of another user from the root account by using the same passwd command but adding the username.

[Ctrl]+[Alt]+[T] to open a Terminal and type:
passwd username, press [Enter] and type:
The current password, press [Enter] and type:
The new password press [Enter] and type:
The new password again and press [Enter]

Changing another user's password from the root account

Change a password of another user from that user’s account the same way you would change it for the root account.

Open a Terminal [Ctrl]+[Alt]+[T] and type:
passwd and then press [Enter] and type:
The current password, press [Enter] and type:
The new password press [Enter] and type:
The new password again and press [Enter]

Changing a user's password from that user's account


More about Passwd Linux passwd command on Computer Hope, How to Handle Account Passwords in Linux with passwd Command on Linux Handbook.

Resetting a forgotten sudo password

RESETTING A FORGOTTEN SUDO PASSWORD

1. Boot/start/re-boot/restart

BIOS hold the [Shift] key down until you see GRUB (shown below)

UEFI tap the [Esc] key (but the timing has to be “just right.” On some hardware, you’ll need to tap [Esc] several times. If the UEFI menu appears instead of GRUB, you tapped [Esc] too soon. If the C4C logo splash screen appears you tapped [Esc] too late. Reboot again if you need to.) until you see GRUB (shown below)


2. Arrow down to Advanced Options for Ubuntu and then press the [Enter] key

Advanced options for Ubuntu
GRUB

3. On the second GRUB page, arrow down to
Ubuntu, with Linux X.X.XX-XX-generic (recovery mode) and then press the [Enter] key

Ubuntu, with Linux X.X.XX-XX-generic (recovery mode)
If there is more than one recovery mode line, select the top (latest) one.

4. Arrow-down to Drop to root shell prompt and then press the [Enter] key

Drop to root shell prompt

5. Press the [Enter] key for maintenance

Press Enter for maintenance

6. Type: mount -o rw,remount / and press [Enter]

Type: mount -o rw,remount /

Type: ls /home to see a list of users and press [Enter]

Type: ls /home to see a list of users
The username(s) will be in dark blue

7. Type: passwd username and press [Enter]

8. Type The new password and press [Enter] and

9. Type The new password again and press [Enter]

10. Type sync and press [Enter]

11. Type reboot -f and press [Enter]

All commands from maintenance to rebooting
All commands from maintenance to rebooting

More about Recovery Mode RecoveryMode on the Ubuntu Wiki, How to boot Ubuntu into recovery mode on Evelyn’s Blog, How to Boot Ubuntu into Recovery Mode on Linux Hint and How to Boot into Rescue Mode or Emergency Mode… on OSTechNix.