Thanks for suggestions,
I removed the "secure" from /etc/ttys but I can still use "boot -s" without 
password. Is this about console connection?

Updated ttys file;

# cat /etc/ttys  | grep 115200
tty00   "/usr/libexec/getty std.115200" vt220    off
________________________________
From: Paul de Weerd <we...@weirdnet.nl>
Sent: Tuesday, July 6, 2021 17:36
To: Valdrin MUJA <valdrin_m...@outlook.com>
Cc: misc@openbsd.org <MISC@openbsd.org>
Subject: Re: Adding Password Protection to Single User Mode

On Tue, Jul 06, 2021 at 12:27:03PM +0000, Valdrin MUJA wrote:
| Hi Folks,
|
| I want to add a small password protection mechanism to
| "boot -s" (single-user mode).
|
| Therefore, I'm working on /sys/stand/boot/boot.c, I've written
|  some code in boot.c, and run "make", "make obj", "make install"
|  in /sys/. However, I couldn't enable my update "boot" binary on startup.
| On startup, the default boot program is working.
|
| How can I replace my updated boot program with the default one?
|
| P.S.: I've tried compile and install kernel and the result didn't change.

After building a new boot loader, you will need to use installboot(8)
to actually install said code into the system.  Your `make install`
merely placed the bootloader into the spot in the filesystem where
installboot expects to find it, but won't do the special editing of
the disk that installboot does.

(but also see the replies from others about ttys(5) to deal with your
situation without potentially screwing up your entire system with a
faulty bootloader)

Cheers,

Paul 'WEiRD' de Weerd

--
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
                 http://www.weirdnet.nl/

Reply via email to