LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-09-2005, 12:32 PM   #1
DanielTan
Member
 
Registered: Sep 2004
Location: Malaysia
Distribution: FC6, Solaris
Posts: 340

Rep: Reputation: 30
RH9 login password recovery


Hi, how can i restore my RHL9 login password ? I just can't get it right although i clearly remember it. Thanks.

Regards
Daniel
 
Old 05-09-2005, 12:44 PM   #2
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
IF this is a users password you are talking about, just login as root and change that users password to what you like. If this is the roots password, reboot the machine, pass a kernel argument single to your kernel, so the line looks like this:

kernel /boot/vmlinuz...... single

and boot that. You will come into single mode, where you can change the roots password by simply typing in the passwd command. However you should try thinking of protecting your computer against such a password change, with a GRUB password.
 
Old 05-10-2005, 10:15 AM   #3
DanielTan
Member
 
Registered: Sep 2004
Location: Malaysia
Distribution: FC6, Solaris
Posts: 340

Original Poster
Rep: Reputation: 30
How come the root password suddenly can be loss or unrecovered or ..... ? do u mean i have to use linux boot disk or cd to pass a kernel argument ?

Regards
Daniel



Quote:
Originally posted by marghorp
IF this is a users password you are talking about, just login as root and change that users password to what you like. If this is the roots password, reboot the machine, pass a kernel argument single to your kernel, so the line looks like this:

kernel /boot/vmlinuz...... single

and boot that. You will come into single mode, where you can change the roots password by simply typing in the passwd command. However you should try thinking of protecting your computer against such a password change, with a GRUB password.
 
Old 05-11-2005, 10:09 PM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
DanielTan:
I've done this in RH9 - it goes like this:

1. either boot into single user mode via GRUB or from the installation disk.

1.a) via GRUB
When the GRUB screen shows up (on reboot) press "e" to edit the GRUB configuration. You see three lines, the middle one starts with the word "kernel". Select the kernel line - press "e" again, and anter the word single at the end of the line. Enter gets you out of there and "b" will boot the selected kernel.

1.b) boot from an installation disk - you'll go into single user mode.

You need to edit the /mnt/sys/image/etc/shadow file. There is a line starting "root: blah blah blah : other stuff : more stuff : etc :" - get rid of everything between the first two colons. That removes the password. Save changes and reboot - log in as root and you'll be prompted for the new password.

Info courtesy of Mad Dog Hall.
 
Old 05-12-2005, 02:42 AM   #5
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 85
Perhaps this is slightly OT, but this question also points out that having physical access to a machine gives someone the ability to defeat any and all security measures that may have been put in place. Keep your important machines behind locked doors! -- J.W.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual boot RH9 WinXP password recovery pymehta Linux - Security 1 09-16-2005 09:54 PM
Password Recovery rockfort Linux - Security 11 02-02-2005 07:12 AM
password recovery JesseMor Linux - Security 2 09-10-2004 07:18 PM
Password recovery mikeshn Linux - Security 1 09-08-2002 10:50 AM
Windows XP password recovery Scorcher2005 Linux - Security 2 04-28-2002 06:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration