Recovering from a lost God password (1.8.0+)

Having forgotten the god pw on my tinkering site, I went into the db to hack it out...and lo and behold, the instructions in the Guide for 1.7.x no longer applied! The new db format deprecated them. With Jav's help, I figured out how to do it with the new format.

Instructions are as follows:
Decompress your outdb and open it in your favorite editor. Look for an attribute resembling this:

attrcount 10

Reduce it by one.

Then look for something like this:

 name "XYXXY"
  owner #1
  flags "no_command wizard locked internal"
  derefs 0
  value "XX13793169753747280487"

Delete everything between the end of the previous attribute and the !2 (signifying the start of #2). Save. Re-compress, restart your game, et voilà! You've just hacked #1's pw.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Or you could be really bold

Or you could be really bold and do it the "Walker" way by attaching gdb to the process, setting a breakpoint on 'password_check()' (i think it is), attempting to login as #1 and when it gets to the checking the password point i believe you just type 'return 1' and it assumes the password is valid and lets you in :)

javelin's picture

That's actually my standard

That's actually my standard approach (on unix/linux) when I help people recover the God password or someone sends me their db to look at and I don't have the God password. It's really easy if you know a little gdb and a little Penn source.

Fix not working here ...

I work in a Vista environment with Pennmush and tried this fix out to access a db a friend had kindly given me. She couldn't remember the password for One though. Every time I try this method the following result is logged in netmush.log:


[02/12 11:45:30] ANALYZING: data/indb
[02/12 11:45:30] ANALYZING: data/indb (done)
[02/12 11:45:30] LOADING: data/indb
[02/12 11:45:30] Loading database saved on Thu Feb 12 19:42:27 2009 UTC
[02/12 11:45:30] DB: error: Got label 'name', expected label 'flagcount' at line 4
[02/12 11:45:30] ERROR READING DATABASE
[02/12 11:45:30] ERROR: Couldn't load databases! Exiting.

Using pennmush-1.8.2p7

If you still have a copy of

If you still have a copy of the unmodified db, try doing this:

Change XYXXY to something innocuous, like "XYLOPHONE"
Change flags to just "no_command"

And that should do it =).

- Walker

--
My kingdom for a minute of silence!

I did the changes you

I did the changes you suggested in the original unmodified outdb, and got the following result:


[02/12 13:56:50] Creating file: data/indb
[02/12 13:56:50] Copying file: outdb, 5735325 bytes
[02/12 13:56:50] Copied 1 file, 5735325 bytes
[02/12 13:56:50] Verifying selected database.
[02/12 13:56:50] File "data/indb" found, size 5735325 bytes, modified on 12 Feb 2009 21:56:50
[02/12 13:56:50] Input database verified. Proceeding to analysis.
[02/12 13:56:50] ANALYZING: data/indb
[02/12 13:56:50] ANALYZING: data/indb (done)
[02/12 13:56:50] LOADING: data/indb
[02/12 13:56:50] Loading database saved on Tue Jan 01 23:27:28 2008 UTC
[02/12 13:56:50] DB: Unexpected EOF at line 3
[02/12 13:56:50] ERROR READING DATABASE
[02/12 13:56:50] ERROR: Couldn't load databases! Exiting.



These are the first four lines to the newly created indb:

+V532671490
savedtime "Tue Jan 01 23:27:28 2008"
+FLAGS LIST
flagcount 59

What did you edit the db

What did you edit the db with?

You may have to change the line endings.

On the other hand, I'm not too familiar with Windows installs of penn.

--
My kingdom for a minute of silence!

Good news, and good

Good news, and good question, Walker. I had previously edited the outdb file with Wordpad. On a whim I switched to Notepad with word wrap off. It's a lot harder to make out the file, but I'd open Wordpad and check to see if it had edited right. Well, that was the problem. Wordpad was inserting extraneous characters into the file. When I used Notepad, the restart of PennMUSH saw One back to the default pw. Success!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.