Reset the Root Password on OpenBSD
source link: https://www.vultr.com/docs/reset-the-root-password-on-openbsd
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Using a Different System?
- Reset Passwords and SSH Keys in Fedora CoreOS
- Reset Windows Server Administrator Password
- Reset the Root Password on CentOS
- Reset the Root Password on Fedora
- Reset the Root Password on CoreOS
- Reset the Root Password on Debian
- Reset the Root Password on FreeBSD
- Reset the Root Password on Ubuntu
- Reset the Root Password on AlmaLinux
- Reset the Root Password on Rocky Linux
- Reset the Root Password on VzLinux
- Reset the Root Password on Arch Linux
- How to Reset the Root Password in Single-User Mode
Introduction
If you are locked out of your OpenBSD instance and have lost access to the root account, you need to boot into single-user mode and reset the root password. These steps apply to OpenBSD 6.6 & 6.7.
How to Reset the Root Password on OpenBSD
The "Send CtrlAltDel" button in the web console does not work for OpenBSD. You must perform steps 1 and 2 quickly before the boot proceeds.
Click the Server Restart icon in the Vultr customer portal.
Open the web console.
See the Web Console FAQ for more information.
The second stage boot loader pauses for a few seconds to give you a chance to provide parameters to the kernel.
Pass the-s
flag toboot
:>> OpenBSD/amd64 BOOT 3.47 boot> boot -s
If you miss the prompt, you need to restart the server from the control panel and try again.
Enter the pathname of your shell or press ENTER for sh.
Mount the root filesystem read-write.
# fsck -p / && mount -uw /
Change the root password.
# passwd
Type CTRLD to restart the server in multiuser mode.
Want to contribute?
You could earn up to $600 by adding new articles
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK