重新启动Ubuntu虚拟机,立即长按shift进入grub菜单;
选择恢复模式并回车确认;
在Recovery Menu中,选择Root Drop to root shell prompt,然后回车; 如图所示
4 .进入shell界面,使用passwd命令重新设置密码: passwd walden,(walden为系统中已有username ),回车确认;
将显示一条消息,指示密码设置成功。 passwd : passwordupdatedsuccessfully
如果显示authenticationtokenmanipulationerror,则可以先输入
在mount -o rw,remount /中键入passwd walden,密码重置成功; 注意: remount和/或之间有空格
显示Ubuntu重置密码passwdauthenticationtokenmanipulationerror
5 .系统重新启动: sudo reboot;