Your Ad Here

Jumat, 28 September 2012

Unix Tip: NULL ROOT PASSWD WITHOUT VI

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 3520 - September 28, 2012

http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


NULL ROOT PASSWD WITHOUT VI

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



--------------------------------------------------------------------------
To Subscribe: http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe: http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today

==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU ADVISES THAT
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.

Unix Guru Universe - www.ugu.com - tips@ugu.com - Copyright 1994-2001
==========================================================================

Tidak ada komentar:

Posting Komentar

Your Ad Here
Free Automatic Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink