The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to set new Root Passwd gini SUN Solaris 2 12-05-2006 12:33 PM
Recover root passwd gini SUN Solaris 5 11-29-2006 04:09 AM
Need to change root passwd mayewil UNIX for Dummies Questions & Answers 4 10-27-2006 03:03 PM
root passwd expiration on AIX aixguy AIX 1 05-19-2006 01:19 AM
Preventing passwd root? scottsl UNIX for Advanced & Expert Users 4 01-06-2006 08:32 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-11-2007
Registered User
 

Join Date: Oct 2007
Posts: 7
hw to reterive root passwd

heyy
i forgot my root passwd but i cant reinstall due to some reason can anyone tell me hw to reterive root passwd
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 11-11-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Not knowing what system you have means we can only give general advice.

I suggest you post operating system version, hardware etc.

The general solution is to boot in single user mode using a CD-ROM, then mount the root partition which typically has the /etc directory on it, and manually edit the "passwd" file to remove the password for root.

Altenatively use "chroot" to set the volume as your root and run the passwd command directly.
Reply With Quote
  #3 (permalink)  
Old 11-22-2007
Registered User
 

Join Date: Oct 2007
Posts: 7
Question

ya ...im using fedora-7 and i had set the grub loading password ....do i have any way to change or retreive my root passwd......actually i have some important data that i dont want to loose.....
Reply With Quote
  #4 (permalink)  
Old 11-22-2007
Read Only
 

Join Date: Nov 2007
Posts: 165
You may be able to boot into maintenance mode (or something similar), but that may ask for the root passwd anyway!
Otherwise, you could boot from a "live" CD and then mount your hard disk to be able to get at the file as described in the first response (note that you delete the password field with the editor, not the whole line).
Once that's done, you can then reboot from your hard disk and login with no password.
Make a copy of that passwd file before you edit it, or you could get in a right pickle if you make a mistake.
Reply With Quote
  #5 (permalink)  
Old 11-22-2007
Registered User
 

Join Date: Oct 2007
Posts: 7
hiiiiii.....
thanks i tried the chroot command and i m able to change my root passwd.....but as a security reason....can u telll me hw to restrict it ...i mean i had entered as a user and by using this command i m able to view my root directory .....at this instant its ok for me ...but hw to restrict this....or any user can have access to this............
Reply With Quote
  #6 (permalink)  
Old 11-22-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
You have to

(a) restrict the BIOS options for what the machine can boot from, eg only from first harddisk and password protect the BIOS

(b) put the machine in a locked room or cupboard

unless you encrypt the drive you can always remove the drive from that machine and put it in another machine to do the same thing.

Of course once you do that you will be posting a message saying how do you reset the BIOS password or asking where you put the key for your cupboard.
Reply With Quote
  #7 (permalink)  
Old 11-22-2007
cassj's Avatar
Supporter
 

Join Date: Jul 2003
Location: Interweb
Posts: 107
Quote:
Originally Posted by porter View Post
(b) put the machine in a locked room or cupboard
cassj looks in cupboard.....corn flakes, oatmeal, ritz crackers, web server, ramen noodles...
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:08 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0