Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Oct 2008 11:48:51 -0400
From:      Jerry McAllister <jerrymc@msu.edu>
To:        Steven Susbauer <stupendoussteve@hotmail.com>
Cc:        freebsd-questions@freebsd.org, mlopezqc@gmail.com
Subject:   Re: How to restore a lost root password...
Message-ID:  <20081027154851.GE98028@gizmo.acns.msu.edu>
In-Reply-To: <BAY122-F3522C8DE536B5D30437C77BA240@phx.gbl>
References:  <BAY122-F3522C8DE536B5D30437C77BA240@phx.gbl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 27, 2008 at 02:12:19AM -0600, Steven Susbauer wrote:

> Mauricio L?pez wrote:
> >On Sun, Oct 26, 2008 at 4:08 PM, Daniel Bye
> ><danielby@slightlystrange.org> wrote:
> >>On Sun, Oct 26, 2008 at 09:18:25PM +0100, Rada alive wrote:
> >>>>I have seen a "How to" about this but I have a problem, i set the 
> >>>>console
> >>>>to insecure, so when I try to do the step of the "how to" i get a 
> >>>>message
> >>>>to input the root password or Ctrl-D to enter in multiuser mode.
> >>>What happened to just booting into single-user mode and issuing passwd?
> >>The OP made a point of letting us know that he has marked his console
> >>`insecure' in /etc/ttys. In order to even get a shell in single user,
> >>he needs the root password.
> >>
> >
> >As far as I know, from my previous Linux experience, you just need a
> >LiveCD in order to boot the PC, mount the / partition, edit
> >/etc/passwd or /etc/shadow and change the hash for one that correspond
> >to one we know. Perhaps you can make it in every UNIX.
> >
> Mauricio L?pez wrote:
> >On Sun, Oct 26, 2008 at 4:08 PM, Daniel Bye
> ><danielby@slightlystrange.org> wrote:
> >>On Sun, Oct 26, 2008 at 09:18:25PM +0100, Rada alive wrote:
> >>>>I have seen a "How to" about this but I have a problem, i set the
> console
> >>>>to insecure, so when I try to do the step of the "how to" i get a
> message
> >>>>to input the root password or Ctrl-D to enter in multiuser mode.
> >>>What happened to just booting into single-user mode and issuing passwd?
> >>The OP made a point of letting us know that he has marked his console
> >>`insecure' in /etc/ttys. In order to even get a shell in single user,
> >>he needs the root password.
> >>
> >
> >As far as I know, from my previous Linux experience, you just need a
> >LiveCD in order to boot the PC, mount the / partition, edit
> >/etc/passwd or /etc/shadow and change the hash for one that correspond
> >to one we know. Perhaps you can make it in every UNIX.
> >
> This is similar to what Matthew Seaman was mentioning.
> 
> I am curious though, might it be possible to boot from something like
> Freesbie (or a fixit disc), mount the drive, chroot to the actual
> install and run passwd like normal to change the password? Does root on
> FreeBSD ask to verify the old password when trying to change its own?

That is exactly what the OP has to do.   Use the fixit.   Boot it,
Make a mount point and mount the other root file system and 
change the root password.  Along the way, he might also try to
undo that insecure console thing.

Root does not ask for the old password if you are root trying to
change a password.

////jerry

> 
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"



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