1,开机,按esc或shift进入ubuntu grun菜单
2,选择后面有recovey mode的一行,不要enter,然后按e键
3,然后去里面找到一行有recovery nomodeset的删掉它,并在原有位置上写上quiet splash rw init=/bin/bash,写完后按f10
4,重新进入grun菜单,选择recovey mode,然后enter
5,输入命令 :passwd 用户名
改密码:
确认密码:
successfully
以上是我忘记密码之后重置的操作
参考了
https://blog.csdn.net/AAA123524457/article/details/79207203