ubuntu忘记登录密码了肿么办?

  1. 重新启动电脑,并按下Shift键,直到出现字符型启动菜单
  2. 选择recovery mode 启动。
  3. 接下为会进入对话框。选择

    root Drop to root shell prompt
    选择Drop to root shell prompt ,也就是获取root权限

  4. 进入命行行模式后,输入
1
# cat /etc/shadow # 查看你的用户名,

当然也不用查了,因为你应该记得你的用户名。
5. 更扆密码后重启系统

1
2
3
4
5
# passwd 你的用户名 #
# Enter new UNIX password:
# Retype new UNIX password:
******
# reboot