Hand-Editing Gods Password in outdb

Javelin explains how to recover god's password in PennMUSH by editing the database. This log is posted as a courtesy to Javelin, as his Guide for PennMUSH Gods does not contain this explanation.

Author: Javelin@M*U*S*H
Category: Hardcode

MUSHCode for Hand-Editing Gods Password in outdb

Topic: Hand-Editing Gods Password in outdb
Author: Javelin
Summary: Javelin explains how to recover god's password in PennMUSH by editing
the database. This log is posted as a courtesy to Javelin, as his Guide for PennMUSH
Gods does not contain this explanation.

<Code> Trispis says, "Just in case it doesn't say so in the Guide for Gods,
God's #dbref is stored in /hdrs/conf.h"
<Code> Looking for Coding Help Cball says, "where in config.h is the GOD
dbref#?"
<Code> Javelin says, "hdrs/conf.h, not config.h"
<Code> Looking for Coding Help Cball says, "thats where im at"
<Code> Looking for Coding Help Cball says, "i dontr see it.."
<Code> Looking for Coding Help Cball says, "are you sure the GOD dbref# is in
there?"
<Code> Trispis says, "What's your version number, Cball?"
<Code> Trispis says, "version and patchlevel"
<Code> Javelin says, "Try, in the shell: grep '#define GOD' hdrs/*.h, from the
top-level directory, and you'll find it."
<Code> Looking for Coding Help Cball says, "172p17"
<Code> Looking for Coding Help Cball says, "im running off of home PC"
<Code> Javelin notes, by the way, that he doesn't much like the 'redefine GOD'
approach to recovering from a lost God pw. (Yeah, in p17, GOD was somewhere
else)
<Code> Looking for Coding Help Cball says, "cant find a server"
<Code> Looking for Coding Help Cball says, "oh.."
<Code> Javelin prefers the 'edit the db by hand and delete God's password'
approach.
<Code> Looking for Coding Help Cball says, "how do i do that?"
<Code> Trispis says, "Are you running Nick Gammon's Win32Penn port?"
<Code> Looking for Coding Help Cball says, "To my knowledge"
<Code> Trispis says, "i.e., are you running it on a Windows PC?"
<Code> Looking for Coding Help Cball says, "Yes"
<Code> Trispis says, "That changes EVERYTHING."
<Code> Looking for Coding Help Cball says, "Good or bad?"
<Code> Raven says, "Heh."
<Code> Trispis has no idea how to recover god's password in Win32Penn.
<Code> Looking for Coding Help Cball says, "Great..."
<Code> Trispis says, "email nick gammon."
<Code> Looking for Coding Help Cball says, "well..im screwed then.."
<Code> Looking for Coding Help Cball says, "I can try...."
<Code> Trispis says, "Or better... post a message to the Win32 PennMUSH bboard
group... and then email him... so he'll post a solution here, too."
<Code> Javelin says, "It's the same as in any PennMUSH, Cball. Do you have
source code that you've compiled, or is this a binary onlly?"
<Code> Nymeria hums ... believe I did it once by manually editing the DB .. if
I dont remember completely incorrectly.
<Code> Javelin can tell you how to do it. The 'edit the db' approach works on
all platforms.
<Code> Looking for Coding Help Cball says, "OK..im all ears Jav"
<Code> Javelin says, "The 'redefine GOD' approach works on any platform where
you have source code and compile yourself (i.e., not for precompiled
executables)"
<Code> Javelin says, "Did you read the Guide, Cball?"
<Code> Looking for Coding Help Cball says, "couldnt find it"
<Code> Javelin says, "http://www.pennmush.org/~alansz/guide.html"
<Code> Javelin says, "Tips for Gods section, Server tips subsection."
<Code> Javelin hmms. Actually, the hand-editing solutoin isn't described.
Sorry, Cball, I'll describe it.
<Code> Looking for Coding Help Cball says, "ok"
<Code> Javelin says, "All you need is an editor that won't mess with your db
file (try to wrap words in long lines, etc.) Got something like that?"
<Code> Trispis says, "Notepad with wordwrap turned off."
<Code> Javelin says, "(For example, PFE). Yeah, notepad w/o wordwrap might
work if your db isn't very large."
<Code> Looking for Coding Help Cball says, "I have notepad"
<Code> Halatir says, "Textpad. :)"
<Code> Javelin says, "Let's be safe. Make a backup copy of your db file (I'm
assuming you've shut down, and can back up outdb)."
<Code> Looking for Coding Help Cball says, "which files do i back up?"
<Code> Javelin says, "game/data/outdb, from the top level dir"
<Code> Looking for Coding Help Cball says, "thats it..only that one?"
<Code> Javelin says, "Then edit outdb, and search for a line beginning with
!1. This marks the start of #1's entry"
<Code> Javelin nods, Cball, that's the whole object db.
<Code> Looking for Coding Help Cball says, "Ok"
<Code> Javelin says, "Then look down through #1's entry to find a line that
contains XYXXY. If you reach a line that says !2, you've gone too far."
<Code> Looking for Coding Help Cball says, "OK..copied..looknig for !1 now"
<Code> Looking for Coding Help Cball says, "Um..i have to open it in
wordpad..."
<Code> Looking for Coding Help Cball says, "its to large"
<Code> Trispis says, "No!!!!"
<Code> Javelin nods. After !1, you want a line that looks something like
]XYXXY^1^54
<Code> Trispis says, "Wordpad won't work!"
<Code> Javelin says, "You can't turn off wrapping in wordpad, tris?"
<Code> Trispis says, "You can, but it will reformat the file when it saves
it."
<Code> Halatir says, "Wordpad sometimes does strange formatting stuff."
<Code> Trispis will email Cball a copy of Superpad.
<Code> Looking for Coding Help Cball says, "Ok..thanx"
<Code> Javelin hmms. Ok, you could use MS word, in text mode, if you're
careful about how you save files.
<Code> Trispis says, "It's small and will send quickly."
<Code> Halatir says, "Is Superpad anything like Textpad?"
<Code> Javelin will wait until you get Superpad, then, Cball.
<Code> Looking for Coding Help Cball says, "Ok..thanx"


<Code> Looking for Coding Help Cball says, "Ok..im ready when you are Jav"
<Code> Trispis can't emphasize this enough. Make sure (after opening outdb)
that wordwrap is turned off.
<Code> Looking for Coding Help Cball says, "Already has it off...made sure :)"
<Code> Trispis says, "Cool."
<Code> Looking for Coding Help Cball says, "OK..im opening outdb now.."
<Code> Trispis reviews Jav's instructions until he wakes...
<Code> Trispis says, "scroll down to the line that begins !1"
<Code> Looking for Coding Help Cball says, "OK."
<Code> Looking for Coding Help Cball says, "found it"
<Code> Trispis says, "Then keep scrolling to the line that begins XYXXY"
<Code> Looking for Coding Help Cball says, "found the XXY thing too"
<Code> Halatir says, "This reminds me of one of those movies where one person
talks another thru disarming a bomb."
<Code> Trispis says, "If you get to !2, you've gone too far."
<Code> Looking for Coding Help Cball says, "hehe"
<Code> Javelin says, "Great. The line after XYXXY should be something garbagy
in quotes, like "asdf3245", right?"
<Code> Trispis grins.
<Code> Looking for Coding Help Cball says, "Which xy thing? tht ]XY oy the
"XY?"
<Code> Javelin says, "You're looking for, first, a line that matches
]XYXXY^1^54"
<Code> Javelin says, "(54 may be a different number, that's ok)"
<Code> Looking for Coding Help Cball says, "ok..i see it"
<Code> Javelin says, "Then, the line immediately after it should be some
string in quotes, right?"
<Code> Looking for Coding Help Cball says, ""XX3357124051320990187""
<Code> Javelin says, "Right. Delete *both* of those lines."
<Code> Looking for Coding Help Cball says, "both..ok"
<Code> Looking for Coding Help Cball says, "done.."
<Code> Javelin says, "Save the file, quit, and restart the MUSH. God should
now have no password, so just 'connect One' or 'connect God' or whatever #1's
name is."
<Code> Looking for Coding Help Cball says, "and then @pass?"
<Code> Javelin says, "@newpassword, yes."
<Code> Trispis hopes Cball had the MUSH shutdown first.
<Code> Javelin says, "Yoiu can't use @password if you don't have a password I
believe."
<Code> Looking for Coding Help Cball says, "Ok..saved...opening MU"
<Code> Looking for Coding Help Cball says, "true"
<Code> Apocalypse thinks you can, Jav.
<Code> Javelin dunno Apoc. Try it out. :)
<Code> Apocalypse grins.
<Code> Trispis says, "@password requires two passwords (old and new). If there
is no old, it won't work."
<Code> Apocalypse decides to take your word for it.
<Code> Looking for Coding Help Cball says, "It worked! YEAH"
<Code> Trispis logs this for 101 posterity.
<Code> Apocalypse grins.