  phantasm11b Premium join:2007-11-02 Winter Park, FL | Im an idiot. Forgot root password.
lol. Well it had to happen sometime. I'm running Gentoo and have forgotten my root passwd. Any way to reset this? |
|
  pmohr Premium join:2002-09-22 Oak Ridge, TN
1 edit | Do you have sudo privs enabled for all commands?
If not, easiest way is to boot off of a livecd and chroot in (as you did during initial install).
EDIT: Even better, as those below posted. The one or two times I've had to do this on other systems, didn't even think about single user mode... |
|
  yock TFTC Premium join:2000-11-21 Fairfield, OH | reply to phantasm11b This is what run level 2, single user environment, is for. At the Grub/LILO boot menu you should have an entry for single user mode, or something named similarly. It'll drop you straight into a root console where you can reset the password. |
|
  rolfp
join:2001-09-12 Oakland, CA
·Comcast
·EarthLink
| reply to phantasm11b Boot to single user mode. In grub, press E when the default menu entry is displayed, press E to edit the first, highlighted kernel line, type a space and 1 at the end, press Enter to commit, B to boot.
passwd
at the prompt will prompt you for a new password, which you verify in the next prompt.
I think lilo uses Esc to get into a mode to edit the boot stanzas. Maybe Failsafe mode is available to you in the menu. |
|
  phantasm11b Premium join:2007-11-02 Winter Park, FL | reply to yock I had tried this and it failed. Then i thought why not try and use sudo. Wow. Sudo worked, didnt think it would.. that;s kind of scary. |
|
  deblin Dark Side of the Moon Premium,MVM join:2001-09-01 Middletown, DE
| said by phantasm11b :I had tried this and it failed. Then i thought why not try and use sudo. Wow. Sudo worked, didnt think it would.. that;s kind of scary. Not really. The sudo binary is setuid (u+s) so if your sudoers allows, you can sudo su - and that only requires your user password. Not scary at all, that's how sudo works. Now if you were able to sudo su - without entering your luser's password, THAT would be scary.  -- He who is not contented with what he has, would not be contented with what he would like to have. -Socrates |
|
  yock TFTC Premium join:2000-11-21 Fairfield, OH | reply to phantasm11b Single user mode should not have failed. Either you are mistaken or something is configured wrong with regards to your single user boot. |
|
  koitsu Premium join:2002-07-16 Mountain View, CA
| said by yock :Single user mode should not have failed. Either you are mistaken or something is configured wrong with regards to your single user boot. Except on certain versions of Solaris, where single-user mode prompts you for root's password. (I believe there's an override for this, but you get the point.) |
|
  yock TFTC Premium join:2000-11-21 Fairfield, OH | Point taken, but the OP did specify Gentoo. |
|
  raw War Eagle Premium join:2001-01-17 Madison, AL clubs: | You specified runlevel 2. I think Gentoo requires a password on all but runlevel 1. |
|
  yock TFTC Premium join:2000-11-21 Fairfield, OH | Or whatever. It has been so long since I utilized SysV boot configurations. =) |
|
 salahx
join:2001-12-03 Saint Louis, MO | reply to phantasm11b Most Linux distributions will require the root password no matter what runlevel your start in. To reset the password, it either has to be done by passing init=/bin/bash (or similar) on the kernel command line or do it from a live CD. |
|
  battleop
join:2005-09-28 00000
| reply to phantasm11b Try this link.
»gentoo-wiki.com/HOWTO_Reset_a_Lo···Password
Gentoo is not the flavor of Linux I use so I can't verify if this method works. |
|
 Typhoon1k
join:2008-04-27 San Antonio, TX | reply to phantasm11b All the versions of Linux I've used tried, I was always asked for the root password. I had to use a live cd to do reset the password.
I had once long ago to restore a deleted slackware main lib directory, that was loads of fun...Not. |
|
  Koil Premium join:2002-09-10 West Columbia, SC clubs: | reply to phantasm11b Aha...So THIS is how you hacked Palin's account! |
|
  phantasm11b Premium join:2007-11-02 Winter Park, FL | reply to phantasm11b Thanks again for the replies everyone. I'll try the single user mode again. For education's sake. lol. |
|