Bug? No. Feature? Sure. But...

Dear Free Folks,

Recently, I was checking Freebsd in search of something light-weight for my use case, when I’ve encountered with this.

Observation : When we ssh into a default freebsd installation with a sudo privileged user and try to shut it down , on host system monitor window(tty) it ask to put "Enter full pathname of shell or RETURN for /bin/sh: ". If we press ENTER there, we are “root” without password.

More observation: This doesn’t happen on reboot, not even on ‘shutdown -r’.

My best guess: The best help I found on “man rescue”. Why it goes into rescue mode? May be server should not go down without master’s permission.

Prevention: During installation we can choose “Enable console password prompt” from system security hardening options.

PS: I haven’t added any system logs because you can re-create it on freebsd 13. My whole interaction with freebsd is less than three months and we are going to celebrate 30th birthday of our big baby. I don’t believe it’s a bug. Most probably, am getting something wrong. So dear geeks, roast me.
 
Do have a look at shutdown(8), especially this part:
Code:
     When run without options, the shutdown utility will place the system into
     single user mode at the time specified.
So indeed it's a feature not a bug. And very useful one too.

If having root on console without password is your concern look at ttys(5) and set the insecure flag for console.
 
Welcome to FreeBSD Forums.

shutdown now leads to single user mode.

In this mode, it is normal to not require a password.

The same result if you select single user mode when starting FreeBSD.

FreeBSD home page amusements

… less than three months and we are going to celebrate 30th birthday …

If my calculation is correct, 2022 will mark the 29th anniversary, not the 30th.

1647114803901.png

Removal of the 25th anniversary image is long overdue :) <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261058#c0>
 
Back
Top