Forgotten SUSE Linux root Password

Forgotten SUSE Linux root Password

Secure Home | Search | About
 General Computer Security    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content add this group's latest topics to your Google content
Subject Author Date
Forgotten SUSE Linux root Password Ludovic Joly 12-28-2005
Posted by Ludovic Joly on December 28, 2005, 6:37 am
If you were  Registered and logged in, you could reply and use other advanced thread options
This morning I had to recover a lost root password on a SUSE Linux
machine, and found a safe and easy way to do this *whithout* hand
editing the /etc/passwd and /etc/shadow files.

1. Boot using the rescue system disc (CD1 of the SUSE install CDs in
the case of SUSE Linux 10.0), and log in as root (no password is needed
in rescue mode).

2. Mount the partition the real / is on. SUSE Linux 10.0 install used
/dev/sda2 by default on my machine:
mount /dev/sda2 /mnt

3. chroot into that fs:
cd /mnt
chroot .

4. You're still root but all commands happen using that filesystem (and
binaries). Change the password (changes will affect the real system):
passwd

5. Exit the chroot cage:
exit

Cool enough to be shared. Easily adaptable to other situations.

Kind regards
Ludovic Joly


Posted by Moe Trin on December 28, 2005, 2:42 pm
If you were  Registered and logged in, you could reply and use other advanced thread options
On 28 Dec 2005, in the Usenet newsgroup comp.security.misc, in article

>This morning I had to recover a lost root password on a SUSE Linux
>machine,

You can't _RECOVER_ the old password. All you can do is _change_ it to
some new value, or remove it completely.

>and found a safe and easy way to do this *whithout* hand editing the
>/etc/passwd and /etc/shadow files.

Web Results 1 - 10 of about 5,500,000 for Linux forgot password. (0.29
seconds)

Web Results 1 - 10 of about 1,290,000 for Linux password rescue. (0.28
seconds)

You mean you managed to use a search engine? Wow!

>Cool enough to be shared. Easily adaptable to other situations.

When you have physical access to the system, you own it. Been that way
for over fourteen years in Linux, and maybe thirty years in UNIX. In
the case of Linux, you don't even need the rescue system disc. Read the
BootPrompt-HOWTO, or use the same search engine you posted from to search
the news group 'comp.os.linux.security'. With LILO (and the similar 'milo'
and 'silo'), Loadlin, and friends, passing the arguement '1' or 'single'
is a big hint. If you are using GRUB, it's marginally harder. If you read
the man pages for your boot loader, you _might_ even discover the (several)
ways to prevent this. Imagine that!!!

Old guy

Similar ThreadsPosted
PLiSS cryptofilesystem with SuSE 9.1? July 23, 2004, 5:39 pm
Re: root/admin and client users in an application October 6, 2006, 11:31 pm
SSRT3523 rev.1 HP-UX Webmin remote unauthorized root access July 5, 2004, 3:34 pm
SSRT4782 rev. 0 HP-UX CIFS Server potential remote root access July 28, 2004, 12:10 pm
SSRT4782 rev. 1 HP-UX CIFS Server potential remote root access August 5, 2004, 2:05 pm
Linux Help September 27, 2006, 7:23 pm
Linux? Which one is the most friendly? May 1, 2005, 3:37 pm
end of linux-nightmares... approachable June 17, 2005, 11:27 am
my linux box is bogged down, could it be a breach? August 5, 2006, 1:38 am
security software for linux and mac July 4, 2007, 1:43 pm

The site map in XML format XML site map

Contact Us | Privacy Policy