LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   lost user name and password for linux red hat help help (https://www.linuxquestions.org/questions/red-hat-31/lost-user-name-and-password-for-linux-red-hat-help-help-412398/)

hjepsen 02-06-2006 06:48 PM

lost user name and password for linux red hat help help
 
i have a laptop in my basement its an old one i even forgot i had it but im going to give it to my neice but ive lost, forgotten whatever the user name and password i used on it please help:Pengy: :newbie: :confused: :scratch:

pljvaldez 02-06-2006 07:08 PM

You can boot off a rescue floppy (like tom's root and boot disk http://www.toms.net/rb/) or a live CD (like knoppix http://www.knoppix.org/), mount your root partition and edit /etc/passwd. Look for the entry for root, remove the "x" from that line,

eg:
root:x:0:0::/root:/bin/bash

becomes
root::0:0::/root:/bin/bash

Now save the file, reboot and now root will not have a password. Don't forget to assign a password for root straight away with the passwd command.

hjepsen 02-06-2006 07:36 PM

help lost user name and password
 
is there any way to just reformat the hard drive theres really nothing on there im afraid of losing

pljvaldez 02-06-2006 07:39 PM

Certainly. If you're installing an OS, just pop in the install CD and overwrite the whole drive with the new install.

Or pop in a knoppix CD and use "shred" to secure delete the entire hard drive. This basically low level writes over the whole drive several times to make sure no data can ever be recovered.

Or if it has a floppy, there's some floppy tools that will do the same. google for "secure delete floppy" or something like that. Here's one http://dban.sourceforge.net/


All times are GMT -5. The time now is 04:28 PM.