The Linux root password is cleared and reset
文章目录
Clear admin password
🐹 First make a usbCD
🐹 Then mount the hard disk.
🐹 Find the “/etc/shadow” file
🐹 Clear the second field of the “root” row
# for example
root:$6$LMKEYXaW$ukCK.aJw6cJF9DZOoCjxD/oVDhtd24W6LSdoHinpPg4LvmXuLfOiqBGFx2YvqrUk2So65NNOZnHndSToClJSA1:18708:0:99999:7:::
==>root::18708:0:99999:7:::
🐹 Reboot, no password required
Reset admin password
CentOS7
👼 Press the E key while reboot
👼 Find “linux16 /vmlinuz…” and add rd.break at the very end,then press “ctrl+x”
👼 Finally, enter four important operating commands
Ubuntu 18.04
😄 To start the machine, press the ECS key first, then the E key
😄 Input “systemd.unit=rescue.target”, then press “ctrl+x”
😄Reset root password
passwd root