Juho Heikkurinen <juxo(a)consumerium.org> writes:
I _guess_ that the hash used is standard UNIX passwd
hash which can be
invoked with command 'htpasswd' but I do not know this for certain, I
just do not see any reason to use any other hashing scheme
see 'man htpasswd' or 'htpasswd' or 'htpasswd --help' for more
information
I looked at the code. The relevant function is encryptPassword() in
User.php. The password is calculated like this:
md5(USER_ID + "-" + md5(USER_PASS))
Unless you have set $wgPasswordSalt to false in which case it is
md5(USER_PASS)
If you want to create a new password, you can create the following
PHP file:
,----[ genpwd.php ]
| <?
| $user_id=123;
| $pass="reset";
| $salt=true;
|
| if($salt)
| $pass_md5=md5($pass);
| else
| $pass_md5=$pass;
|
| print md5("{$user_id}-{$pass_md5}");
| print "\n";
| ?>
`----
Adjust the first three lines to your needs and execute it on the
command line with: `php genpwd.php' (no quotes). Or put it into your
Web path and execute it with your favorite browser¹.
Hope this helps,
Patrice
______________
¹ <http://www.mozilla.org/products/firefox/>
--
Jesus answered, "I am the way and the truth and the life. No one comes
to the Father except through me." (The Bible, John 14:6)