Ubuntu系統啓動時選擇recovery mode,也就是恢復模式。
接着選擇Drop to root shell prompt ,也就是獲取root權限。
輸入命令查看用戶名 cat /etc/shadow ,$號前面的是用戶名
輸入命令:passwd "用戶名" 回車就可以輸入新密碼了