LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 03-21-2006, 06:05 AM   #1
sunlinux
Member
 
Registered: Feb 2006
Distribution: RHCL 5
Posts: 239

Rep: Reputation: 30
Thumbs up changing root password


I am in the mess. forget linux redhat 3.0 entr. server's root password. how can i recover it ?
 
Old 03-21-2006, 06:20 AM   #2
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
You boot into single-user mode and use the "passwd" command to change (not recover) the root password. For more info:
* http://www.redhat.com/docs/manuals/e...ot-passwd.html
* http://linuxgazette.net/107/tomar.html
 
Old 03-21-2006, 06:24 AM   #3
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
You can't. But there is good news... you can change it.
Code:
$ sudo passwd root
Otherwise, if you havn't enabled sudo, you will have to boot from a rescue CD. (CD1 or the DVD, "linux rescue" at the "boot:" prompt). This will boot you into single user mode.

From there you need to edit the /sys/image/etc/shadow file... look for the line starting "root:" It will look like this
Code:
root:$1$4m0pQ7wB$lWLD5xKy2hwb0IBJgXFSt1:13228:0:99999:7:::
... remove everything between the first two colons, so it looks like this:
Code:
root::13228:0:99999:7:::
... this will set a blank password.

Logout - login as root, hit enter for the password blank password), obtain a new root password (# passwd root)
 
  


Reply



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
Root Password Keeps Changing jameskilbane Linux - Security 4 10-14-2005 04:51 PM
changing root password minm Linux - Newbie 9 08-31-2004 03:03 AM
Changing the root password divsky Linux - Newbie 4 04-03-2004 10:02 PM
Changing root password Gibby Mandriva 1 10-02-2003 10:38 PM
changing root password jamaso Linux - Newbie 1 12-25-2001 10:38 PM

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

All times are GMT -5. The time now is 07:48 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
Open Source Consulting | Domain Registration