忘記Ubuntu密碼的解決方法和遇到的問題

如果忘記Ubuntu的登錄密碼,不能進入Ubuntu系統,可以通過以下步驟進行重置密碼

1、重啓Ubuntu,隨即長按shift進入grub菜單;

2、選擇Recovery Mode,回車確認;

3、在Recovery Menu中,選擇“Root Drop to root shell prompt”,回車確認;

4、進入shell界面,使用passwd命令重新設定密碼:passwd cy,(cy是系統中已有的登錄用戶名),回車確認;

5、輸入新密碼;

6、再次確認新密碼;

7、看到密碼設定成功提示:passwd: password updated successfully;

8、重啓系統進入GUI界面:sudo reboot;

在重置密碼的時候可能會碰到Passwd: Authentication token manipulation error 的錯誤,原因如下:

This is the result of trying to work on a file system while mounted as read-only. The solution is a simple one. Before making changes to the users password mount the filesystem as read-write which allows for the necessary changes to be made.

在shell界面輸入:mount -o rw,remount / 回車確認後,然後重置密碼即可。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章