Saturday, 8 August 2015

Reset Password in Ubuntu

Method 1
By default the first user's account is an administrative account.
  1. Reboot your computer.
  2. Hold Shift during boot to start GRUB menu.
  3. Choose (recovery mode) 
  4. Choose root from options 
  5. You will be at root@ubuntu:~#
  6. Put command      
       mount -rw -o remount / 
            
               OR
      
       mount -o remount,rw /

    7.  Next reset the Password
            root@ubuntu:~# passwd <first user name> 
            Enter new UNIX password: 
            Retype new UNIX password: passwd: 
            password updated successfully 
            root@ubuntu:~#
 
Method 2
From the official Ubuntu LostPassword documentation:
  1. Reboot your computer.
  2. Hold Shift during boot to start GRUB menu.
  3. Highlight your image and press E to edit.
  4. Find the line starting with "linux" and append rw init=/bin/bash at the end of that line.
  5. Press Ctrl + X to boot.
  6. Type in passwd username.
  7. Set your password.

No comments:

Post a Comment