[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: I forgot the root password, can not maintain my machine.



On  0, Bob Proulx <bob@proulx.com> wrote:
> Tom Cook <tom.cook@adelaide.edu.au> [2002-08-04 11:29:28 +0930]:
> > Once you have a root shell, why edit /etc/passwd or /etc/shadow at
> > all?  Why not just use passwd to change the password?
> 
> Actually that would work fine.  Since / is still the same / everything
> matches up.  Good observation.
> 
> When using a rescue boot disk you can't normally do that since now /
> is the rescue system and not your normal root.  In that case usually
> your normal / is actually /target or wherever you decided to mount it.
> In that case it has been easiest to edit the files directly.  Although
> there is nothing intrinsically wrong with getting 'passwd' to somehow
> work natively on a redirected root.

Except that, now that I look at it:

# which passwd
/usr/bin/passwd

So you would need to mount /usr as well.  But that should not be a
hassle.

Tom
-- 
Tom Cook
Information Technology Services, The University of Adelaide

"That you're not paranoid does not mean they're not out to get you."
	- Robert Waldner

Get my GPG public key: https://pinky.its.adelaide.edu.au/~tkcook/tom.cook-at-adelaide.edu.au

Attachment: pgpbkucL5F_HF.pgp
Description: PGP signature


Reply to: