How to reset root passwd FreeBSdD4.7

Peter Pentchev roam at
Fri Jul 15 09:41:55 GMT 2005

On Fri, Jul 15, 2005 at 09:44:35AM +0300, Vasil Dimov wrote:
> On Thu, Jul 14, 2005 at 09:55:16AM -0400, John Von Essen wrote:
> > Boot with 1st CD, goto the Fixit Shell (will need 2nd CD). From there you
> > have to manually mount the / filesystem and edit passwd (just clear out
> > the passwd, root::). However, do an fsck on the device first (you may have
> > to reboot afterwards) since if you have any fragmentation following an
> > unclean shutdown, you will not be able to mount the device.
> > 
> Simply editing /etc/passwd won't do the work (this is not Linux, eah)
> /etc/master.passwd must be edited and then pwd_mkdb /etc/master.passwd
> must be run.

Much easier to just chroot(8) into the mounted filesystem and use
the 'passwd root' command, as others have already suggested - after booting
from the fixit CD, of course.

[Cc list snipped, eek]


Peter Pentchev	roam at    roam at    roam at
PGP key:
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
The rest of this sentence is written in Thailand, on
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-hackers mailing list