Wednesday, 1 March 2023

Reset root password on Ubuntu box

 Resetting root pwd: 

1.       At the Grub boot menu press 'e' before the system boots 

 

 

  

 

2.       In the GRUB boot options, scroll down and locate the line that begins with ‘linux’. In this line move the cursor to the end of this line, after ‘ro quiet’ or 'ro' and  append the parameter init=/bin/bash 

 

 

  

3.       Press Ctrl+X 

4.       You will see a root prompt. 

·         :/#  

·         Type "mount -n -o remount,rw /": 

·         :/# mount -n -o remount,rw /  

·         This will mount the system as read and write (instead of the read-only, which is the default.) 

·         Set the password of any user(s) whom it is forgotten for. 

·         To see the list of users enter :/#cat /etc/passwd 

·         :/# passwd administrator 

·         Press Ctrl+D or Ctrl+Alt+Del to exit. 

·         Reboot 

 

No comments:

Post a Comment