人多少會有健忘的時候
有時候會不小心忘記root密碼
或是不小心把設定改爛進不去系統
這時候就可以利用single user mode去修復
重開機後選擇第四個開機選項進入single user mode
#進入single user mode後會詢問下面的東西,按Enter直接跳過
Enter full pathname of shell of RETURN for /bin/sh:
#檢查並修正檔案系統
> fsck -p
#載入所有
> mount -a
#修改密碼
> pwsswd root
#編輯改爛的設定 (example: /etc/rc.conf)
> vi /etc/rc.conf
1
2
3
4
5
6
7
8
9
10
|
#進入single user mode後會詢問下面的東西,按Enter直接跳過
Enter full pathname of shell of RETURN for /bin/sh:
#檢查並修正檔案系統
> fsck -p
#載入所有
> mount -a
#修改密碼
> pwsswd root
#編輯改爛的設定 (example: /etc/rc.conf)
> vi /etc/rc.conf
|
[FreeBSD] Single user mode was last modified: 2017-02-06 by Calos