Search:  

 
theme to black backgroundlet page decide theme
 
   All ForumsHot TopicsGallery






how-to block ads


 
Forums » Tech and Talk » OS and Software » All Things Unix » Im an idiot. Forgot root password.
Search Topic:
Uniqs:
2021
Share Topic:
RSS topic:
toggle:
flat / full
normal / watch
Posting:
Post a:
Post a:
Metric to Imperial in Ubuntu »
« C question  
AuthorAll Replies


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 See Profile :

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 See Profile :

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.
-
Forums » Tech and Talk » OS and Software » All Things UnixMetric to Imperial in Ubuntu »
« C question  


Saturday, 28-Nov 19:20:23 Terms of Use | Privacy Policy | Hosting by www.nac.net - DSL,Hosting & Co-lo | feedback | contact
over 10 years online! © 1999-2009 dslreports.com.
page compression OFF
Most commented news this week
· [122] Time Warner Cable Fires Broadside At Broadcasters
· [112] New AT&T Ad Campaign Hits Back At Verizon
· [96] Apple Joins AT&T Verizon Snark Fest
· [87] New Bill Takes Aim At Higher Verizon ETFs
· [80] TiVo Sees Record Customer Losses
· [70] Verizon CEO: Hulu Will Be Dead Soon
· [69] In-Flight Internet Headed For Bumpy Landing?
· [66] Weekend Open Thread
· [62] Thanksgiving Open Thread
· [40] EFF Wages War On Fine Print
Most people now reading
· 3.x Feral Druid - Bear Tanking Guide [World of Warcraft]
· [Newsgroups] Newzleech down? [Filesharing Software]
· Digital Transport Adapter Unboxing Photos [Comcast Cable TV]
· [Free] Repair & Fix Windows 7 & Vista problems with FixWin Utili [Software]
· [How to] Install Asterisk on an Asus WL-520GU router [VOIP Tech Chat]
· Windows 7 boot manager editing questions [Microsoft Help]
· how to use the 2nd line with phone hooked to the 1st line? [VOIP Tech Chat]
· Gizmo5 has added a Google Voice section in its members area. [VOIP Tech Chat]
· [ PVP] 3.2 DK PvP D/W Spec... [World of Warcraft]
· [ Classes] Druid tanking: rotation and glyphs [World of Warcraft]