Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 May 2006 16:59:28 -0400
From:      Bill Moran <wmoran@collaborativefusion.com>
To:        Adrian Pavone <wingot@eftel.com>
Cc:        polina_mnouskina@yahoo.com, greenwood.andy@gmail.com, mmiranda@123.com.sv, freebsd-questions@freebsd.org
Subject:   Re: Problems booting operating system and with root password
Message-ID:  <20060526165928.1b255ffc.wmoran@collaborativefusion.com>
In-Reply-To: <4477616D.40606@eftel.com>
References:  <20060526184500.29026.qmail@web54701.mail.yahoo.com> <3ee9ca710605261240o1957520u50075f6ae2d826aa@mail.gmail.com> <4477657D.90701@123.com.sv> <4477616D.40606@eftel.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Adrian Pavone <wingot@eftel.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Miguel wrote:
> > Andy Greenwood wrote:
> > 
> >> I don't know what you mean by kernel errors on boot, but you can
> >> recover your root password by booting into single user mode and then
> >> running passwd.
> > 
> > Hi, i have a similar problem, i forgot my root password and the server
> > its in a remote colocation site, is there a way to recover the encrypted
> > password and crackit some way, i have my normal account (which is in
> > wheel group), i even know that the root's pass begings with
> > MAG_"something", but i really cant remember the complete root's pass,
> > rebooting in single user mode is my best bet?
> 
> It is easiest if the system's single user mode hasn't been locked down

Yes, but that is generally not a good idea at a colo, unless you have some
kind of physical security on the box.

> If single user mode HAS been locked down (ie. needs the root password),
> then you will need a boot disc so you can chroot to your FreeBSD system
> from another, or so you can directly edit the /etc/passwd or /etc/shadow
>  file.

FYI: secure single password mode is default: meaning that the system assumes
that anyone that can physically access the system should be able to use
single user mode without a password.

You have to make changes to /etc/ttys to get a paranoid console that asks for
a password.

> The password hash *MIGHT* also be in one of those two files, depending
> on your configuration.

Linux, Linux, Linux.

FreeBSD has no /etc/shadow.  There's /etc/passwd and /etc/master.passwd.

The password hash is readible by root only, so that doesn't help if you
only have a mortal account.

Unless you've specifically set up something else to work around this
problem, you _must_ get physical access to fix it.

In the future, try installing sudo or using PKI to protect yourself from
lost passwords.

-- 
Bill Moran

Be calm.

        Morpheus




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060526165928.1b255ffc.wmoran>