[LUNI] [Fwd: Forgot root password]

Gerald Guglielmo gug at fnal.gov
Thu Nov 15 09:49:01 CST 2001


Hi,
   Do you have a rescue floppy or cd (Tom's bootdisk or a Linuxcare
rescue cd)? If so then you can boot your machine using either one.
Remount your hard drive and edit the /etc/passwd or /etc/shadow
(probably the later these days) and remove the password field. Then
reboot normally into single user mode, log in an as root and set the
password with passwd. Someone else on this list can probably give you
better instructions as I have rarely had to do this (typically when
receiving an new pc with Linux pre-installed and the OEM forgetting to
tell me the root password).
   For example in the /etc/passwd, if the second field has a "x" in it
then I think the password is stored in the shadow file. From
/etc/passwd:
  goofy:x:500:500:an exaple name:/home/goofy:/bin/bash    
so looking in /etc/shadow:
  goofy:afafmgmnsgfgkofkgpofdgapfmf/:11368:0:99999:7:-1:-1:134550180 
changing the above line to remove the contents of the second field will
make the account have no password:
 goofy::11368:0:99999:7:-1:-1:134550180 

reboot to single user mode (make sure you remove the rescue disk) and
then you should be able to reset the password. Good luck.
Robert Jacobsen wrote:
> 
> Folks, I am forwarding this to you since I may have sent it to the wrong
> email address,
> 
> Thanks.
> 
> RJ
> 
>   ------------------------------------------------------------------------
> 
> Subject: Forgot root password
> Date: Thu, 15 Nov 2001 09:15:42 -0600
> From: Robert Jacobsen <rjacobsen at theocc.com>
> To: linux-help at clug.chicago.il.us
> 
> Hi,
> 
> I have just discovered your clug and since I've been having a heck of a time
> trying to get an answer to a relatively simple question, I thought I'd give you
> folks a try. So here goes...
> 
> I currently have SuSE Linux v7.2 Personal installed on my Intel box. During the
> setup it prompts for a password for user "root". I entered one and have used it several times
> successfully. I am sure it was "admin". However, it no longer works.
> 
> Is there any way I can re-set the root password without having to re-install the kernel?
> 
> Also, any ideas on what would cause this to happen?
> 
> Thanks for your timely response.
> 
> Robert Jacobsen
> Technical Specialist
> The Options Clearing Corporation
> 440 S. LaSalle St., Suite 900
> Chicago, IL 60605
> 1.312.322.7582
> 
>   ------------------------------------------------------------------------
> 
>   Robert Jacobsen <rjacobsen at theocc.com>
> 
>   Robert Jacobsen
>     <rjacobsen at theocc.com>
>     Cellular: 1.708.655.7644
>     Work: 1.312.322.7582
>   Additional Information:
>   Last Name    Jacobsen
>   First Name   Robert
>   Version      2.1
> 
>   ------------------------------------------------------------------------
> 
>   Robert Jacobsen <rjacobsen at theocc.com>
> 
>   Robert Jacobsen
>     <rjacobsen at theocc.com>
>     Cellular: 1.708.655.7644
>     Work: 1.312.322.7582
>   Additional Information:
>   Last Name    Jacobsen
>   First Name   Robert
>   Version      2.1

-- 
-Jerry->
gug at fnal.gov
Pepe's Theory of everything: "Under the right circumstances, things
happen."



More information about the luni mailing list