[NTLUG:Discuss] resetting root password (was: locked account)

Terry trryhend at gmail.com
Wed Jun 29 22:14:23 CDT 2005


On 6/29/05, Neil Aggarwal <neil at jammconsulting.com> wrote:
> Robert:
> 
> Here is what I do:
> 
> Boot into single user mode, this gives me a root shell without asking
> for the password.
> Type passwd root to change the password.
> Once done, type exit and the system will boot and the root password
> will be set to the new one you gave.
> 
>         Neil
>

Some distros will be set up to ask for root password before granting
access even in single user mode.  In that case, you can boot from  a
linux boot disk, (floppy or CD, your choice) (a live CD or whatever),
and then mount the root partition and edit the etc/shadow file and
delete all between the first and second colons in the root line.
The root line   will look similar to this:
root:$1$vvN/NfBi$4ieHb0:13855:0:::::
and when your'e done editing it:
root::13855:0:::::
and that will allow you passwordless access to root. 
(In other words, just hit Enter instead of typing in a password.)

> --
> Neil Aggarwal, JAMM Consulting, (214) 986-3533, www.JAMMConsulting.com
> FREE! Valuable info on how your business can reduce operating costs by
> 17% or more in 6 months or less! http://newsletter.JAMMConsulting.com
> 
> > -----Original Message-----
> > From: discuss-bounces at ntlug.org
> > [mailto:discuss-bounces at ntlug.org] On Behalf Of Robert Citek
> > Sent: Wednesday, June 29, 2005 7:58 AM
> > To: NTLUG List
> > Subject: [NTLUG:Discuss] resetting root password (was: locked account)
> >
> >
> >
> > On Jun 27, 2005, at 10:26 AM, brad angelcyk wrote:
> > > I had a box (Redhat 7.1) a few years ago that I couldn't
> > remember the
> > > root password, so I threw a brute force attack at it.  It
> > never locked
> > > me out from this.  But then I put the drive in another box
> > and cleared
> > > the password from /etc/shadow.
> >
> > Since you mention clearing /etc/shadow, I was curious to know how
> > else could one reset a mangled or forgotten root password?
> >
> > Some thoughts:
> >
> >   - reboot into single user mode.  boot: linux 1
> >   - reboot, bypassing init.  boot: linux init=/bin/bash
> >   - setup sudo, although I dunno if rh71 had sudo.
> >
> > Any other ideas?
> >
> > Regards,
> > - Robert
> > http://www.cwelug.org/downloads
> > Help others get OpenSource software.  Distribute FLOSS
> > for Windows, Linux, *BSD, and MacOS X with BitTorrent
> >
> > _______________________________________________
> > https://ntlug.org/mailman/listinfo/discuss
> >
> 
> 
> _______________________________________________
> https://ntlug.org/mailman/listinfo/discuss
> 


-- 
<><




More information about the Discuss mailing list