LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-17-2004, 05:17 PM   #1
lorddecker
LQ Newbie
 
Registered: Aug 2003
Posts: 9

Rep: Reputation: 0
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?
 
Old 06-17-2004, 06:09 PM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
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.
 
Old 06-17-2004, 10:30 PM   #3
tux2furious
LQ Newbie
 
Registered: Jun 2004
Location: Malaysia
Distribution: Fedora Core
Posts: 13

Rep: Reputation: 0
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
 
Old 06-18-2004, 05:47 AM   #4
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
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.
 
Old 06-18-2004, 02:48 PM   #5
lorddecker
LQ Newbie
 
Registered: Aug 2003
Posts: 9

Original Poster
Rep: Reputation: 0
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!
 
  


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
resetting pop3 password matt1982 Debian 1 08-26-2005 09:38 AM
Resetting Username & Password - HELP Shanahan Fedora 3 05-12-2005 04:50 AM
resetting th root password on rh9 hamza11050 Linux - Software 4 09-30-2004 07:21 PM
Resetting MySQL root password b200306 Linux - Software 3 02-08-2004 03:21 PM
resetting root password. Reaps^ Linux - Security 1 07-06-2003 03:46 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration