?

Log in

No account? Create an account

January 7th, 2009

walking right

Fixing a broken pfSense config

To fix a pfSense router where it denies root / admin login due to a bad / missing / broken config.xml file:

1. If there is a boot loader installed, choose the pfSense partition (by default, the FreeBSD boot loader is installed - press F1 to boot pfSense).

2. At the "Welcome to FreeBSD" screen with the BSD beastie, very quickly press 4 to boot into single user mode. You will not be prompted for a password.

3. Issue the following commands to remount the root file system in read-write mode:
# /sbin/mount -u /
# /sbin/mount -a
4. Set the TERM and TERMCAP environment variables so your editor, etc. will work correctly:
# export TERM=cons25
# export TERMCAP=/etc/termcap
5. If necessary, find the appropriate configuration backup using more, cat, vi or some other tool. Config file sizes may also give you a hint. Configuration backup files are located in the /conf/backup directory.

6. Restore the appropriate backup file:
# cp /conf/backup/config-1234567890.xml /conf/config.xml
7. Tell FreeBSD to boot into multi-user mode by issue the exit command or by pressing Ctrl+D:
# exit
References:
http://www.cyberciti.biz/tips/howto-freebsd-reset-recover-root-password.html
walking right

January 2009

S M T W T F S
    123
45678910
11121314151617
18192021222324
25262728293031
Powered by LiveJournal.com