Jumping Mouse wrote:
Hi there, I have inherited an openBSD machine with no root account. When I
boot up in single user mode boot -s and do a cat /etc/master.passwd | root
I presume there's a "grep" missing in there. :)
the only thing I get is: daemon:*:1:1::0:0:The devil
himself:/root:/sbin/nologin I can't seem to make changes to the master.passwd
account by using vipw in single usermode. I get a message that the file is
locked or busy. Can anyone help in what I can do next? How can I add the
root account back to the master.passwd file. thanks.
try doing a "rm /etc/ptmp" before vipw.
That's the lock file which apparently exists on the machine for some
reason (i.e., someone was sitting in vipw when you powered down the
machine).
/etc/ptmp isn't documented in vipw (it probably should be), but it is
covered in passwd(1). It should also be documented in faq8.html, I'll
try to fix that this evening. :)
Nick.