忘记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 / 回车确认后,然后重置密码即可。

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