[p4] How to reset superuser's password?
Jeff Grills
jgrills at junctionpoint.com
Fri Sep 1 12:42:34 PDT 2006
IIRC, p4 user passwords get hashed to strings of the same length so it's
probably not too big of a deal to replace one since offsets within the file
won't change, but that would (as you mention) invalidate a checksum if one
was present. I don't think perforce makes the binary format public (I
believe it's a modified Berkley DB, but that's just what I've heard), and
they have no reason to ever make it public since they have the text
checkpoints. In fact, since the only supported way to change between
architectures is by checkpointing and restoring, it's even possible that the
DB format differs on different architectures, which very well might be true
for 32bit vs 64bit platforms. I suspect, though, that replacing the
password text will just happen to work. Importing a journal/checkpoint
record to fix up the entry is a much safer solution. In every place where
I've worked that has used perforce, it's always been mission critical, so I
personally would always chose the safer solution of the text record
recovery.
j
-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of
Ken.Williams at thomson.com
Sent: Friday, September 01, 2006 1:44 PM
To: vierycn at gmail.com; perforce-user at perforce.com
Subject: Re: [p4] How to reset superuser's password?
Whoa. You edited the binary DB file with a text editor? You're either very
brave, very foolish, or you know something about the structure of that file
that I don't. To me that file is an opaque binary with no user-serviceable
parts inside it. In particular, it might have internal checksums, indices,
and so on. Is the format actually known so that this edit operation is
known to be safe?
-Ken
> -----Original Message-----
> From: perforce-user-bounces at perforce.com
> [mailto:perforce-user-bounces at perforce.com] On Behalf Of Viery Lee
> Sent: Thursday, August 31, 2006 9:14 PM
> To: perforce-user at perforce.com
> Subject: Re: [p4] How to reset superuser's password?
>
> Thanks Jeff.
>
> Now I resoved this problem.
>
> 1. On perforce server, I find db.user file in perforce installed
> directory.
> 2. Open this file with text edit tool, such as editplus.
> 3. I find serveral places of the superuser in this file, and after
> the username, there is a 32 bit encrypted password. Then replace the
> last one with formal encrypted password.
> 4. Finally I log into perforce.
>
> That's OK.
>
> Btw, if I use following command to change password: p4 passwd
> username, then when I login to perforce, will show "Invalid password".
> But when I change password in p4v, then login is OK.
> I don't know the difference of this two way.
More information about the perforce-user
mailing list