View Single Post
  #5   (View Single Post)  
Old 22nd December 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,347
Default

You cannot log into an insecure tty(4) as root.

This shouldn't matter, as the best practice on the BSDs is to sign-in as a normal user and use su(), sudo(), or doas() whenever superuser authority is needed.

If you need root access directly from an insecure console, then single-user will get you there.

The NetBSD ttys(5) man page says:
Code:
secure   If on is specified, allows users with a uid of 0 (e.g. "root")
         to login on this line.
OpenBSD's man page has a little more descriptive text, circa 2008, which your experience indicates is applicable to NetBSD:
Code:
secure   If on is also specified, allows users with a UID of 0 to log in
         on this line.  If set for the console entry, then init(8) will
         start a single-user shell without asking for the superuser
         password.

Last edited by jggimi; 22nd December 2017 at 06:53 PM. Reason: Clarity
Reply With Quote