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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
-----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----- |
|
|||
|
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--------------------------- |
|
|||
|
-----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----- |
|
|||
|
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----- |
|
|||
|
-----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----- |
|
|||
|
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. |