As admins We never forget the root password,
RIGHT?
Although sometimes we do inherit machines in
which we don't know the root password.
Here is a way to null the root password from
the password file.
It comes a time in every admins life that we
will have to go into mini-root and change the
password file without the use of vi.
The following example shows how to achieve this
on the /etc/shadow file, but the same basic
commands can be achieved on the /etc/passwd file
for those platforms that don't support shadow
passwords.
Use "ed" - and the 13 dots method
---------------------------------
# cp /etc/shadow /etc/shadow.bak
# ed /etc/shadow
1p
s/:.............:/::/
1p
w
q
NOTE: All tips provided are USE AT YOUR OWN RISK. Tips are submitted
by various unix admins around the globe. UGU suggest you read and
test each tip in a non-volitile environment before placing into
production.