忘記普通用戶密碼:
- 重啟Ubuntu,隨即長(zhǎng)按shift進(jìn)入recover mode菜單(或F10);
- 選擇recovery mode,回車確認(rèn);
- 在Recovery Menu中,選擇“Root Drop to root shell prompt”,回車確認(rèn);
- 進(jìn)入shell界面,使用passwd命令重新設(shè)定密碼:passwd wangyu,回車確認(rèn);看到密碼設(shè)定成功提示:passwd: password updated successfully;重啟系統(tǒng):sudo reboot;
如果出現(xiàn)Authentication token manipulation error錯(cuò)誤原因是The problem was that the system was started as read only, 運(yùn)行"mount -rw -o remount /"
忘記root密碼:
- 開機(jī)按F10進(jìn)入grub時(shí),按e(不是回車)
- 看到一行l(wèi)inux /boot/vm.......ro *****,(類似)
- 刪除*****, 在這行的最后添加 quiet splash rw init=/bin/bash
- 按F10, 啟動(dòng)
- passwd, 系統(tǒng)會(huì)提示你輸入新的密碼,結(jié)束。