*BSD News Article 85779


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!worldnet.att.net!ix.netcom.com!news
From: "Thomas D. Dean" <tomdean@ix.netcom.com>
Newsgroups: comp.unix.bsd.freebsd.misc,ods.unix
Subject: Re: root passwd
Date: Sun, 29 Dec 1996 06:15:56 -0800
Organization: Home
Lines: 40
Message-ID: <32C67D1C.7747@ix.netcom.com>
References: <59trj6$k2p@gulfa.kuwait.net>
Reply-To: tomdean@ix.netcom.com
NNTP-Posting-Host: sil-wa2-06.ix.netcom.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-NETCOM-Date: Sun Dec 29  6:15:48 AM PST 1996
X-Mailer: Mozilla 3.0 (WinNT; I)
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:33240

At the boot prompt, enter:

boot: -s

to boot into the single user mode.

After boot is complete, mount all the file systems:

mount -a

to get access to vipw, etc.

Use vipw to change the root password to a null:

You will see something like

root:1A56@#%FASDFRT24/d58RZXCV:0:0:0:0:<some name>:/root:/bin/sh
     ^^^^^^^^^^^^^^^^^^^^^^^^^

Look at "man passwd" to become familiar with the syntax.  The
fields are delimited by ":".  The second field is the password.
Yours will be different.

Using vi-like commands, change the root line to remove the password:

root::0:0:0:0:<some name>:/root:/bin/sh

Note this REMOVES PASSWORD PROTECTION for root.

Now, :x to save the file.  This will cause the password db to
be rebuilt.

Next, exit to continue the boot process.

After the system boots, login as root.  You will not be asked
for a password.

Now, the most important step:

use the passwd command to enter a password for root.