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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值