Is there is someone who forgot his/her system password ?
Now need not to be panic, I have a solution (works on all distros and any version of LINUX Kernel). Just follow onscreen instruction:
- Power on your system and enter into "grub" boot menu.
- On grub menu enter "e" while highlighting the default boot menu.
- On that, you see a command similar to "auto rhgb quiet", replace it with "auto init=/bin/bash" and press enter. This will unable you to enter into bash terminal as a single user. Remember not to simply enter as single user, at that you are unable to make changes on passwd file.
- After that you will enter into previous menu, and then press "b" for booting.
- After a while you see terminal with last line as follows: "bash-4.1 #" or something similar to this.
- Enter following command one after other and press enter after termination each command:
- mount | grep root "in order to check you enter into your single root partition
- mount -o remount, rw / "in order to get read/write access"
- mount |grep root "confirm file system is mounted"
- Enter command "passwd root" and then your new password and confirm that. In order to change password of root user.
- In final step enter "touch /.autorelabel" to SELinux context. If this step is omitted you will not able to enter with your new password and also cause system to cause problem.
- Reboot your system normally using "exec /sbin/init".
That's all, we just change our system root password.
We can now enter into our system using recently changed password.






No comments:
Post a Comment