LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Resetting Root password (http://www.linuxquestions.org/questions/linux-software-2/resetting-root-password-194728/)

lorddecker 06-17-2004 06:17 PM

Resetting Root password
 
Is there a way to reset the root password with a script.

Currently i have a custom boot cd that boots up, mounts the partition and overwrites the shadow file with my original one. The password doesn't work.

Do you HAVE to run passwd on the system or is there a better way to reset the password automatically?

Bruce Hill 06-17-2004 07:09 PM

You have to run "passwd" as root. Another of the nice security features that separates *nix from that OS that comes from the State of Washington's garbage dump.

tux2furious 06-17-2004 11:30 PM

Re: Resetting Root password
 
Quote:

Originally posted by lorddecker
Is there a way to reset the root password with a script.

Currently i have a custom boot cd that boots up, mounts the partition and overwrites the shadow file with my original one. The password doesn't work.

Do you HAVE to run passwd on the system or is there a better way to reset the password automatically?

I dont think you can change the root password with a script (cause no script can be executed if you can't login)

Anyway for your reference:
http://www.fedoraguide.org/fc2/fc2be...ordifforgotten

Should work for your distro too

Cerbere 06-18-2004 06:47 AM

If you're forgetting your password often enough that you need a script to reset it, maybe you should just write it down ;-)

Enjoy!
--- Cerbere

P.S. I hear that ginkgo-biloba stuff really works, but I keep forgetting where I put the bottle.

lorddecker 06-18-2004 03:48 PM

lol! Yeah. This is not for my personal machine. Anyway i figured out how to do it. Just overwritting the shadow hash will work. I just had a spelling mistake which caused it not to work. Thanks!


All times are GMT -5. The time now is 08:45 PM.