I have been shown that a FreeBSD system can easily be accessed in single user mode without the root password. Using the passwd command will allow anyone withh physical access to the system to change the password for root. Is there any way to prevent this? Before learning this I was told bsd systems are secure but now i am not so sure.
You simply need to edit
you will find a line that looks like this which is tab delimited in
console none unknown off secure
change the secure part to insecure (very confusing, I know) so the line looks like this:
console none unknown off insecure
upon rebooting and entering single user mode, you will be prompted for a password to get to the shell prompt.
This is what the FreeBSD guys have to say about using the word insecure in
Any system that's physically accessable has the potential to be insecure. Even if your installed OS is secure, someone could, in theory use a live disk to edit security settings, reset passwords, or simply get data out.
I suppose you have to disable USB and cd boot and lock the bios to be totally safe. And even then someone could always take th HDD out.
I hope i don't make you too paranoid ;)
It will force to ask for a password before jumping to single user mode
P.S. Pay attention on FreeBSD-9 if you using this. Someone broke a little bit this, but bug report and fixing solution already reported to GNAT. See it here, PR:170110
how to bring this functionality back on FreeBSD-9 that works for decades.
Without this fix computer will stop booting and will wait for a password