ubuntu forgot login account password and root password

I haven't logged in to my ubuntu for a long time, and as a result, I forgot both passwords. Let me first say that I forgot the root password. Because I can't take screenshots on a real machine, I went to Baidu for a Baidu experience . After that, modify the login account. After restarting, go to the last step of 1 above, do not press e, press Enter, enter the recovery meum and select root Drop to root shell prompt, then enter the root password, enter passwd xxx after entering the password, xxx is the login account, then enter the new password, after completion Ctrl+Alt+Delete restart

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325676271&siteId=291194637