如果忘記了Ubuntu的用戶名或是密碼請按以下操作:
1,在啟動的時候,上下移動,選中(不是按回車)類似這樣的修復模式"Ubuntu-x.x.xx.xx-generic (recovery mode),然後按e。
2,在第二層菜單選擇有kernel這行,如:"kernel /boot/vmlinux-x.x.xx-xx-generic root=UUID=ae424e-bod0-475c-2342433 ro single" 按下e進行編輯。
3,修改啟動參數,將後面的ro single改為rw single init=/bin/bash,然後按回車。
如:"kernel /boot/vmlinux-x.x.xx-xx-generic root=UUID=ae424e-bod0-475c-2342433 rw single init=/bin/bash"
4,按b啟動系統就可以進入single模式而不需要密碼了。
5,然後用passwd修改密碼:具體命令是passwd 用戶名。