Shadow password file

Jason Santos plug-devel@lists.PLUG.phoenix.az.us
Wed Dec 3 08:55:03 2003


--=-FgeVQhtDI3c8PzGkJjAN
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Wed, 2003-12-03 at 04:50, Vaughn Treude wrote:
> I have a machine on which I have lost the root password.  (Doh!)  I was=20
> looking for a workaround to reinstallation.  I was thinking I could boot =
it=20
> with Knoppix and replace the shadow password file.  As a test, I looked a=
t=20
> the shadow password files on two different machines that happend to be th=
e=20
> same distro and have the same root password.  The encrypted entries for t=
he=20
> root password were different!  I can understand this would be a security=20
> feature, but does anybody know of a wayI could get my workaround scheme t=
o=20
> work?

They have different ciphertext entries because they have different
salts.  A "salt" is added to make precomputing all the possible
ciphertexts impractical.

You can indeed boot off a CD, mount your partition on /mnt, then edit
/mnt/etc/shadow and just blank out the second field for root.

When you reboot, you will be able to login as root with no password.

HTH,
--=20
Jason Santos <jason.santos@megaslow.net>

--=-FgeVQhtDI3c8PzGkJjAN
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQA/zf7SWlwgRlBINzIRAvYsAJ9yauplQpk8/rKJfS/58JtkGtQqkwCfYpAE
zuyk05yO4oUfVzlyYCGrW4Y=
=ofBe
-----END PGP SIGNATURE-----

--=-FgeVQhtDI3c8PzGkJjAN--