Re: lost root account

2007-11-19 Thread Jumping Mouse
Ok the issue was solved!

mount -s -uw /

vipw

I typed the missing root account line back in and saved the file and can now
log back in as root.
this then invoked pwd_mkdb to do all the rest.

thanks everyone.

only issue now is that if I try to change another users account password I get
the following:

enter:   passwd  username
enter:  new password

get:

pwd_mkdb:  corrupted entry
pwd_mkdb: at line #24
pwd_mkdb: /etc/ptmp: Innapropriate file type or format
passwd: etc/master.passwd unchanged

Do you have any idea what could be causing this,  the user entery in
master.passwd looks fine. > From: [EMAIL PROTECTED]> To:
[EMAIL PROTECTED]; misc@openbsd.org> Subject: Re: lost root account>
Date: Mon, 19 Nov 2007 21:37:19 +0100> > Hi Marcus,> > I thought it was enough
to add the root account through vipw. that this edits> the master.passwd file
and would automatically update everything else?> how would I use pwd_mkdb, i
don't want to delete any other accounts from the> master.passwd file.> >
thanks> > > > > > > Date: Mon, 19 Nov 2007 17:41:01 -0200> From:
[EMAIL PROTECTED]> To:> [EMAIL PROTECTED]; misc@openbsd.org> Subject:
Re: lost root account> > Boot> your machine in single user mode (boot -s) and>
use plain vi and pwd_mkdb soon> after that.> > There's no need to use vipw
when running in boot -s.> > On Nov> 19, 2007 5:18 PM, Jumping Mouse
<[EMAIL PROTECTED]> 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> > 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.> >> > Express yourself instantly with MSN>
Messenger! MSN Messenger> >>
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/> >> >>
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/>
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



Re: lost root account

2007-11-19 Thread Jason McIntyre
On Mon, Nov 19, 2007 at 04:20:22PM -0500, Nick Holland wrote:
> 
> /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. :)
> 

cvs up!
that is to say, i agree, and just added it.

jmc



Re: lost root account

2007-11-19 Thread Nick Holland

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.



Re: lost root account

2007-11-19 Thread Jumping Mouse
thanks Juan,  faq8.1  shows me how to reset my root passord but i could not
find anything on recreating the root account.
Perhaps I am missing something?



> Date: Mon, 19 Nov 2007 14:36:18 -0500> From: [EMAIL PROTECTED]> Subject: Re:
lost root account> To: [EMAIL PROTECTED]; misc@openbsd.org> > > --- Jumping
Mouse <[EMAIL PROTECTED]> 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> > 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.> > > There is FAQ 8.1 on that.> > // juan> > > Get
a sneak peak at messages with a handy reading pane with All new Yahoo! Mail:
http://mail.yahoo.ca
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



Re: lost root account

2007-11-19 Thread Jumping Mouse
Hi Marcus,

I thought it was enough to add the root account through vipw.  that this edits
the master.passwd  file and would automatically update everything else?
how would I use pwd_mkdb, i don't want to delete any other accounts from the
master.passwd file.

thanks





> Date: Mon, 19 Nov 2007 17:41:01 -0200> From: [EMAIL PROTECTED]> To:
[EMAIL PROTECTED]; misc@openbsd.org> Subject: Re: lost root account> > Boot
your machine in single user mode (boot -s) and> use plain vi and pwd_mkdb soon
after that.> > There's no need to use vipw when running in boot -s.> > On Nov
19, 2007 5:18 PM, Jumping Mouse <[EMAIL PROTECTED]> 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> > 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.> >> > Express yourself instantly with MSN
Messenger! MSN Messenger> >
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/> >> >
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



Re: lost root account

2007-11-19 Thread Juan Miscaro
--- Jumping Mouse <[EMAIL PROTECTED]> 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
> 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.


There is FAQ 8.1 on that.

// juan


  Get a sneak peak at messages with a handy reading pane with All new 
Yahoo! Mail: http://mail.yahoo.ca



Re: lost root account

2007-11-19 Thread Marcus Andree
Boot your machine in single user mode (boot -s) and
use plain vi and pwd_mkdb soon after that.

There's no need to use vipw when running in boot -s.

On Nov 19, 2007 5:18 PM, Jumping Mouse <[EMAIL PROTECTED]> 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
> 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.
>
> Express yourself instantly with MSN Messenger! MSN Messenger
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



Re: lost root account

2007-11-19 Thread Gilles Chehade
On Mon, Nov 19, 2007 at 08:18:47PM +0100, 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
> 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.
> 

you are getting this message because / is mounted read-only in single user mode.
to use vipw you will have to manually mount / read/write and mount /usr if it is
on its own partition.

Gilles

-- 
Gilles Chehade
http://www.evilkittens.org/
http://www.evilkittens.org/blog/gilles/