How to reset the linux password if you forget the password: first, type “e” on the kernel; then change the content to “rw rd.break” in the linux16 line; then enter the emergency mode of the system And enter passwd and other commands in turn; finally restart the service.
4. Enter the following commands in turn
# chroot /sysroot //Enter the root directory of the system # passwd // reset password # touch /.autorelabel //Create a file to allow the system to recognize changes when it restarts # exit exit chroot mode # reboot //Restart the system
The above are the details of how to reset the password for linux if you forget the password. For more information, please pay attention to other related articles on 1024programmer.com!