Forgotten Root Password - Help!

Forgotten Root Password - Help!

Post by e.dev.. » Thu, 05 Mar 1998 04:00:00



How can I access linux as superuser if I can't log in as "root"?  

 
 
 

Forgotten Root Password - Help!

Post by Jon Egil Stran » Thu, 05 Mar 1998 04:00:00



Quote:> How can I access linux as superuser if I can't log in as "root"?  

This is a tricky case, because it touches into the very heart of your
security policy. If there is a way to bypass the root password, be it
locally or on a remote terminal you actually have a major security leak.
But on the other hand, if your job is to manage a very important system,
or beeing the system administrator of i.e. pentagon or national defense
systems or a hospital, it would be quite a fluke if the system went down
and the s.a. could not fix it because she forgot her password... ("Three
children died due to late arrival of critical medic journals. Police
blames forgetful system administrator")

But to answer your question in short.. as far as I know, NO. (and I am
glad..) The trick is to write your password down (maybe coded) and keep in
in a secure place (safe/vault)

Ps. Hypnosis might make you recall your password.. :-)

Jon Egil Strand
_____________________________________
Tlf: 73 52 54 36
URL: http://www.stud.ntnu.no/~jonegis

 
 
 

Forgotten Root Password - Help!

Post by gerald clar » Thu, 05 Mar 1998 04:00:00



> How can I access linux as superuser if I can't log in as "root"?

boot: linux single

set your password ;->
--
Remove the -bogus- portions of my return address!

 
 
 

Forgotten Root Password - Help!

Post by pe.. » Fri, 06 Mar 1998 04:00:00



> How can I access linux as superuser if I can't log in as "root"?  

 - Boot from an emergency floppy or similar;
 - Mount some kind of rescue root file system (e.g. the install floppy);
 - Mount your usual root fs (e.g. ``mount /dev/sda1 /mnt'');
 - cd into it's etc dir (e.g. ``cd /mnt/etc'')
 - Check your passwd file. One line should look like this:
      root:x:0:0:root:/root:/bin/bash
           ^ if there is that x, it means, you use shadow passwords
 - IF you use shadow passwords
    - Edit shadow:
       - remove the weird letter & digit combination in the second field
         (i.e. between the first and second colon (`:'))
 - ELSE (you use normal passwords)
    - Edit passwd:
       - remove the weird letter & digit combination in the second field
         (i.e. between the first and second colon (`:'))
 - That's that.

(rumors have it booting to single user mode will let you in as root. In that
case you could then run passwd and reset your password to a new value)

(As to the other follow up: No, these are not security holes. You _can_
_not_ make a system secure unless you prevent physical access. This has
been discussed a few weeks ago (A cutting torch will grant access to the
HDD(s) that could be removed and mounted in another computer ...))

   Peter
--
   ---------------------------------------------------------------------

   Throughout  this  HOWTO, a  manual  entry  is simply referred to as a
   man page, regardless of actual length and without  sexist  intention.
                                              [The Linux Man-Page-Howto]

 
 
 

Forgotten Root Password - Help!

Post by Jim Harri » Sat, 07 Mar 1998 04:00:00


Yes, booting using "linux single" takes you directly to the root prompt.
This helped me out the time I accidentally mis-typed MY root password.
Twice in a row, if you can believe that. . . .

Once in as root, "passwd" works like a champ.

 
 
 

Forgotten Root Password - Help!

Post by ubi » Sat, 07 Mar 1998 04:00:00



> How can I access linux as superuser if I can't log in as "root"?

  Briefly:

boot from disk (the ones used for installation are fine),
mount the partition you installed Linux into,
edit the /etc/passwd file and leave no chars where
the "encrypted" password field for root is,
then reboot and enter with no password as root.

I would like to know by anyone else reading this if
it should be considered a bad idea to write these
things in a group (but they are common knowledge
for *nix users...)

 
 
 

Forgotten Root Password - Help!

Post by Tyson Bigl » Sun, 08 Mar 1998 04:00:00




>How can I access linux as superuser if I can't log in as "root"?  

There are a couple of farily easy ways to do this:

1) Boot into single-user mode from the lilo prompt.  This will give
   you a root login.

2) Boot from a boot floppy and mount your root partition.  Edit
   the mounted /etc/passwd file and remove the password file.
   (This one can be tricky depending on what's on your boot floppy).

3) If the box is networked and you have a nfs mount from somewhere
   (say you mount your home directory from a server) and you know
   the root password of the remote box, then on your linux box copy
   /bin/sh to your home directory.  On your home directory server login
   as root and `chmod u+s` the ~/sh (the sh your copied to your home).
   Go back to your linux box and run ~/sh.  Presto, you're root.  Now
   Go back to your linux box and run ~/sh.  Presto, you're root.  Now
   change the password to something else.

   **REMOVE sh FROM YOUR HOME DIRECTORY**

HTH,

Tyson

--
Microsoft is living proof that sales talent is vastly more useful in a
capitalist society than intelligence. A person with an IQ of 1,000 could
die destitute, but a cretin with sales talent can become a billionaire.

 
 
 

Forgotten Root Password - Help!

Post by Tyson Bigl » Mon, 09 Mar 1998 04:00:00


[---snipped---]

Quote:>I would like to know by anyone else reading this if
>it should be considered a bad idea to write these
>things in a group (but they are common knowledge
>for *nix users...)

I think that most "real" crackers already know basic attacks such
as this... one assumes that physical security will not be compromised
(and if it is there's a lot of ways to get into the system).

Tyson
--
Microsoft is living proof that sales talent is vastly more useful in a
capitalist society than intelligence. A person with an IQ of 1,000 could
die destitute, but a cretin with sales talent can become a billionaire.

 
 
 

Forgotten Root Password - Help!

Post by Jesse Weiger » Mon, 09 Mar 1998 04:00:00




> > How can I access linux as superuser if I can't log in as "root"?

>   Briefly:

> boot from disk (the ones used for installation are fine),
> mount the partition you installed Linux into,
> edit the /etc/passwd file and leave no chars where
> the "encrypted" password field for root is,
> then reboot and enter with no password as root.

> I would like to know by anyone else reading this if
> it should be considered a bad idea to write these
> things in a group (but they are common knowledge
> for *nix users...)

 Well, all of these ways to get your root password back require physical
access to the computer.  If someone has access to the console, and they
wanted to wreck havoc on the system, he could just pull the plug and
bash the monitor in.  If you are really worried, don't let anybody
access the console.

--
-Jesse Weigert

 http://mid.home.ml.org

 " "
        -Charlie Chaplin

 
 
 

Forgotten Root Password - Help!

Post by e.dev.. » Wed, 11 Mar 1998 04:00:00


Many thanks to everyone who replied.  Big sigh of relief from me :)

 
 
 

1. Q:forgot the root password on ss10.how to get in as root?

HI
one of our users forgot the root password on his standalone sparc station 10 .
we are running sol 2.3.
How do we get in as root in this situation?
Any pointers or help is appreciated.
I couldn't find this in faq :)
Thanks
Mahesh


------------------------------------------------------------------------------

2. 2.4.20 amd speculative caching

3. HELP!! - Recover from forgotten ROOT password

4. CardBus 3Com Ethernet card 3CCFE-575-BT

5. Forgotten 'root' password - HELP!!!

6. Solaris 7 (Intel Platform Edition) Device Configuration Guide

7. Help ! Forget root password

8. Ethernet card "goes to sleep"!

9. Help! Forgotten Root Password

10. forgot root password Solaris 2.5 - please help

11. root password forgot

12. Root password forgotten

13. forgot root password