Tips for How to Reset Linux Password
Microsoft Windows, Mac OS X and Linux are regarded as the most well-known operating system. We've given some excellent tips when you forgot Windows password or Mac password. So here we collect some tips from Internet about how to reset Linux password after you forgot it.
Forgot Windows Password? Top 4 Handy Methods to Reset Windows 7 Password.
Forgot Mac password? 3 Proven Methods to Reset Mac Password.
As to reset Linux password, we have presented you 3 tips for you on how to reset Linux password.
Tip 1: Use the root user in Linux
In Lunix, you can change the password of any other user account by using the root user. So you you forgot a Linux password, please take the following steps.
- Step 1. Log in as the root user and open the terminal application.
- Step 2. On the coming command prompt, execute the following commands one by one:
Type "passwd username”, press Enter.
Type the new password, press Enter.
Type the new password again at the command line, press Enter.
- Step 3. Close the terminal program, and confirm that you can log in with the new password and the user name account under which the password was reset.
Tip 2. Use Single User Mode
On Linux, you can reset Linux password by booting Linux under a specific mode: single user mode. If you have GRUB installed and can access to edit boot parameters of selected entries, please follow the tutorial for instance.
- Step 1. Select the GRUB entry for the Linux installation that you want to reset the password for.
- Step 2. Press 'e' to edit the entry. Use the arrows to go to kernel line. At the end of the line add the word 'single'. Press ESC to go back to the parent menu. Press 'b' to boot this kernel. The kernel should be booting as usual, and you will finally get a root prompt or recovery menu from where you can choose the root prompt.
- Step 3. Select "root - Drop to root shell prompt" and press "Ok".
- Step 4. Use passwd
to change the password for any account.
- Step 5. Type reboot to reboot the system and then log in in with your new password.
Note: Some Linux distribution offers a specific boot menu entry where it is stated "Recovery Mode" or "Single-User Mode". If so, you can just choose the recovery mode and then choose root prompt at the screen that follows.
Tip 3. Use a Linux Live CD
A Linux Live CD is a complete Linux Operating System designed to run from a CD-ROM. You can use it to reset Linux password if you are unable to use GRUB. Additionally, this disk can also be used to reset Windows password.
- Step 1. Create a Linux Live CD. To do this, download the ISO file from the Linux distribution's website and burn that ISO file to the CD.
- Step 2. Boot from Live CD and open a terminal window.
- Step 3. Type sudo fdisk –l tok know which partition Linux is installed on and what name the hard disk is using. You can skip it if you are sure about the partition.
- Step 4. Type sudo mkdir /media/linx_part to create a directory to act as mount point for the partition.
- Step 5. Type sudo mount /dev/sda1 /media/linx_part to munt the linux partition.
- Step 6. Type sudo chroot /media/sda1 to change Root to the mount directory.
- Step 7. Type passwd and then enter the new password to change the password.
- Step 8. Type reboot to restart the system.
Get it Now