TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:9281] Lost Linux Password



you cannot recover a root password, however you can overwrite it with a
new one.  easist thing to do is this:

boot up the system:
at the LILO prompt, type your normal linux load, only tell the system you
want to use a diferent init program.. say "bash".. note, you will also
have to tell the system to mount your root filesystem in read-write mode
otherwise you will have to run this as soon as you get in..
mount -o remount,rw /

LILO boot: Linux rw init=/bin/bash
Loading Linux...........

since init is allways run as root, your /bin/bash is root.  from there you
can vi /etc/passwd and remove the x from the password field.

root:x:0:0:Root of all Evil:/root:/bin/sash
 
becomes 

root::0:0:Root of all Evil:/root:/bin/sash

save that, and do "sync; sync; sync; halt"

after that, run 
sync; sync; sync
(just for fun)

and then 
mount -o remount,ro /

then run halt.. that should drop the system as nicely as possible

once up and running, you can login as root, with no password at all 
UNPLUG IT FROM THE NETWORK!!!!!!!!!!!!!!!!!!!!!!!!!!!

set your new password, and away you go

Thank You,
        Ben Kochie (ben@nerp.net)

*-----------------------*  [ - * - * - * - * - * - * - * - ]
| Unix/Linux Consulting |  [ Haiku Error Message:          ]
|  PC/Mac Repair        |  [  Chaos reigns within.         ]
|   Networking          |  [  Reflect, repent, and reboot. ]
| http://nerp.net       |  [  Order shall return.          ]
*-----------------------*  [ - * - * - * - * - * - * - * - ]

 "Unix is user friendly, Its just picky about its friends."

On Tue, 19 Oct 1999, Steven E. Rogerman wrote:

> I need help with recovering a lost root password on one of our linux boxes.
> One of our developers is doing all of the systems admin stuff on a stand
> alone linux box, and has forgot the root password for this system. How can
> I recover the root password short of a reload.
> Steven Rogerman
> Systems Administrator
> 1620 Greenview Drive South West
> Rochester, Minnesota, 55902 - USA
> Phone: 507-288-3154
> Fax: 507-289-1108
> steven.rogerman@ftlsys.com
> http://www.ftlsystems.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@mn-linux.org
> For additional commands, e-mail: tclug-list-help@mn-linux.org
>