Hi!

On Thu, Feb 05, 2009 at 07:27:56AM -0600, Phusion wrote:
>I am looking for advice on how to reset the root password on an
>OpenBSD system that has console set to insecure in /etc/ttys. I have
>booted off the install CD and into the shell and mounted the /
>partition read-write, but don't have access to vi to modify
>/etc/master.passwd. I was thinking I could clear out the root password
>and afterwards run pwd_mkdb. Let me know. Thanks.

If you mount the original / partition (like in mount /dev/wd0a /mnt),
you can then mount /usr, /var, too (e.g. mount /dev/wd0d /mnt/usr, mount
/dev/wd0e /mnt/var). Then you can chroot into your system:
/mnt/usr/sbin/chroot /mnt /bin/ksh. Then you can setup the terminal
(export TERM=pcvt25) and the editor (export EDITOR=/usr/bin/vi) and
use vipw.

Kind regards,

Hannah.

Reply via email to