Forgotten root password: Difference between revisions

From DISI
Jump to navigation Jump to search
mNo edit summary
Line 14: Line 14:
  mount -o remount,ro /  
  mount -o remount,ro /  
9) Press ctrl + alt + del to restart computer.  Boot normally and root password should be reset
9) Press ctrl + alt + del to restart computer.  Boot normally and root password should be reset
[[Category::Sysadmin]]

Revision as of 17:59, 1 June 2017

Sometimes we accidentally put in the wrong root password when creating a host or we accidentally change it to something we didn't mean to. That's no problem as long as you have physical access to the machine.

Steps to Reset root Password

1) Restart the computer
2) During kernel selection at boot, press 'e' to edit the kernel line
3) At the end of the kernel line, type

init=/bin/bash

4) Save that to the kernel line and then press 'b' to boot
5) Enter 'su' to become root.
6) Type command:

mount -o remount,rw /

7) Change root password with command passwd.
8) After password successfully changed, remount filesystem as read-only:

mount -o remount,ro / 

9) Press ctrl + alt + del to restart computer. Boot normally and root password should be reset


[[Category::Sysadmin]]