Need Help: How to recover back the root password

This is a discussion on Need Help: How to recover back the root password within the Linux Administration forums, part of the Linux Forums category; Hi, I left my Linux installation for almost a year and didn't remember what was the root password. Can ...


Go Back   Usenet Forums > Linux Forums > Linux Administration

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-19-2004
Mike
 
Posts: n/a
Default Need Help: How to recover back the root password

Hi,

I left my Linux installation for almost a year and didn't remember what
was the root password. Can someone to help me to reset the root password?

Thanks ~~

- Mike


Reply With Quote
  #2 (permalink)  
Old 11-19-2004
Kevin Wilcox
 
Posts: n/a
Default Re: Need Help: How to recover back the root password

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

While drooling on their shoelaces, Mike spouted:
> Hi,
>
> I left my Linux installation for almost a year and didn't remember what
> was the root password. Can someone to help me to reset the root password?
>
> Thanks ~~
>
> - Mike


If you just want to reset it, start the machine with a linux boot
floppy/cd. Tomsrtbt on a floppy works well for this, gentoo minimal
cd's work well, phlak/knoppix/pick_your_live_cd all work for this
purpose.

Mount the drive/partition that has your installation's /etc
directory

edit the shadow file found in that directory

on the line that starts with root, delete the characters BETWEEN the
first and second colons. Make sure that you ONLY delete the
characters between the first and second colons and that you leave
the colons in the file.

reboot and you _should_ be able to login as root with no password. I
login as a regular user then 'su' to change the password - good
practice to never login as root.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFBnh8/owlfGIzYCOYRAnyYAJ0Xr1f2gm4r7po5Dti7D8cy74ZxZACfV6 fJ
S+xJzw9maojtlnYiKiqUOe4=
=4xy3
-----END PGP SIGNATURE-----
Reply With Quote
  #3 (permalink)  
Old 11-19-2004
Dick Streefland
 
Posts: n/a
Default Re: Need Help: How to recover back the root password

Kevin Wilcox <kw34272EMAILREAPERS@HATECAPSappstate.edu> wrote:
| If you just want to reset it, start the machine with a linux boot
| floppy/cd. Tomsrtbt on a floppy works well for this, gentoo minimal
| cd's work well, phlak/knoppix/pick_your_live_cd all work for this
| purpose.

Or even simpler, boot to single-user mode by adding "single" to the
kernel command line. Then use "passwd" to set a new password.

--
Dick Streefland //// Altium BV
dick.streefland@altium.nl (@ @) http://www.altium.com
--------------------------------oOO--(_)--OOo---------------------------
Reply With Quote
  #4 (permalink)  
Old 11-19-2004
Lew Pitcher
 
Posts: n/a
Default Re: Need Help: How to recover back the root password

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dick Streefland wrote:
> Kevin Wilcox <kw34272EMAILREAPERS@HATECAPSappstate.edu> wrote:
> | If you just want to reset it, start the machine with a linux boot
> | floppy/cd. Tomsrtbt on a floppy works well for this, gentoo minimal
> | cd's work well, phlak/knoppix/pick_your_live_cd all work for this
> | purpose.
>
> Or even simpler, boot to single-user mode by adding "single" to the
> kernel command line. Then use "passwd" to set a new password.


That might not work. Quite a few distros implement a login process even
for "linux single" boots. All the OP is likely to get is a login prompt
that asks for his password, but in single user mode.


- --

Lew Pitcher, IT Consultant, Enterprise Data Systems
Enterprise Technology Solutions, TD Bank Financial Group

(Opinions expressed here are my own, not my employer's)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)

iD8DBQFBnjUragVFX4UWr64RAgO1AJsFF2AvBLhDYOE7LKFS3U jMefJvmwCfSsgS
fELZSj4cOgWfH5EWvey8PGM=
=5ZAi
-----END PGP SIGNATURE-----
Reply With Quote
  #5 (permalink)  
Old 11-19-2004
Mike
 
Posts: n/a
Default Re: Need Help: How to recover back the root password

I used a mini-version Live Linux (CDLinux Size: 18MB) CD to boot the
Redhat system, then mount the /dev/hda for editing /etc/shadow's root entry
without any problem.

After mounting the /dev/hda and the /dev/hda will be treated a collection
of data files and then Iit should has no problem for editing.

Thanks for hint and save my time to reinstall.

- Mike
"Lew Pitcher" <Lew.Pitcher@td.com> ???
news:Tyqnd.33464$rc.1949845@news20.bellglobal.com ???...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Dick Streefland wrote:
> > Kevin Wilcox <kw34272EMAILREAPERS@HATECAPSappstate.edu> wrote:
> > | If you just want to reset it, start the machine with a linux boot
> > | floppy/cd. Tomsrtbt on a floppy works well for this, gentoo minimal
> > | cd's work well, phlak/knoppix/pick_your_live_cd all work for this
> > | purpose.
> >
> > Or even simpler, boot to single-user mode by adding "single" to the
> > kernel command line. Then use "passwd" to set a new password.

>
> That might not work. Quite a few distros implement a login process even
> for "linux single" boots. All the OP is likely to get is a login prompt
> that asks for his password, but in single user mode.
>
>
> - --
>
> Lew Pitcher, IT Consultant, Enterprise Data Systems
> Enterprise Technology Solutions, TD Bank Financial Group
>
> (Opinions expressed here are my own, not my employer's)
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (MingW32)
>
> iD8DBQFBnjUragVFX4UWr64RAgO1AJsFF2AvBLhDYOE7LKFS3U jMefJvmwCfSsgS
> fELZSj4cOgWfH5EWvey8PGM=
> =5ZAi
> -----END PGP SIGNATURE-----



Reply With Quote
  #6 (permalink)  
Old 11-19-2004
Kevin Wilcox
 
Posts: n/a
Default Re: Need Help: How to recover back the root password

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

While drooling on their shoelaces, Lew Pitcher spouted:
>
> Dick Streefland wrote:
>> Kevin Wilcox <kw34272EMAILREAPERS@HATECAPSappstate.edu> wrote:
>> | If you just want to reset it, start the machine with a linux boot
>> | floppy/cd. Tomsrtbt on a floppy works well for this, gentoo minimal
>> | cd's work well, phlak/knoppix/pick_your_live_cd all work for this
>> | purpose.
>>
>> Or even simpler, boot to single-user mode by adding "single" to the
>> kernel command line. Then use "passwd" to set a new password.

>
> That might not work. Quite a few distros implement a login process even
> for "linux single" boots. All the OP is likely to get is a login prompt
> that asks for his password, but in single user mode.


Exactly. I've tried booting single user a few times and had to enter
the password of whoever I was wanting to login as. It was a rather
nice security feature, though a wee counter-productive at the time
;)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFBnnbNowlfGIzYCOYRAs0nAKCzlbFhYiNAwDYUdQJTjP I1R61p/wCcCIZ4
nXIXR3yg+hPG3Ba+40alAaY=
=pOd9
-----END PGP SIGNATURE-----
Reply With Quote
  #7 (permalink)  
Old 11-19-2004
Joe Fischer
 
Posts: n/a
Default Re: Need Help: How to recover back the root password

On Fri, 19 Nov 2004 22:40:48 GMT, Kevin Wilcox
<kw34272EMAILREAPERS@HATECAPSappstate.edu> wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>While drooling on their shoelaces, Lew Pitcher spouted:
>>
>> Dick Streefland wrote:
>>> Kevin Wilcox <kw34272EMAILREAPERS@HATECAPSappstate.edu> wrote:
>>> | If you just want to reset it, start the machine with a linux boot
>>> | floppy/cd. Tomsrtbt on a floppy works well for this, gentoo minimal
>>> | cd's work well, phlak/knoppix/pick_your_live_cd all work for this
>>> | purpose.
>>>
>>> Or even simpler, boot to single-user mode by adding "single" to the
>>> kernel command line. Then use "passwd" to set a new password.

>>
>> That might not work. Quite a few distros implement a login process even
>> for "linux single" boots. All the OP is likely to get is a login prompt
>> that asks for his password, but in single user mode.

>
>Exactly. I've tried booting single user a few times and had to enter
>the password of whoever I was wanting to login as. It was a rather
>nice security feature, though a wee counter-productive at the time
>;)
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.2.6 (GNU/Linux)
>
>iD8DBQFBnnbNowlfGIzYCOYRAs0nAKCzlbFhYiNAwDYUdQJTj PI1R61p/wCcCIZ4
>nXIXR3yg+hPG3Ba+40alAaY=
>=pOd9
>-----END PGP SIGNATURE-----


Yeah, that was a real nice feature when the disk drive was
partially trashed and the only thing I could do was single-user login
to root to try to recover the partition table. Didn't really want to
mess around with passwords at that point.
-------
Remove underscores from e-mail address.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:46 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0