[Mediawiki-l] Fwd: encryption of paasword

Alexis Moinet alexis.moinet at fpms.ac.be
Mon Jan 14 12:32:49 UTC 2008

The simplest way to do this would be :

1. edit LocalSettings.php and add $wgGroupPermissions['*']['createaccount']    = false; (see http://www.mediawiki.org/wiki/Help:User_rights)
2. login as an admin (sysop) of the wiki and then go to http://yourwiki/index.php?title=Special:Userlogin&type=signup (or go to http://yourwiki/index.php/Special:Userlogin and click on the "Don't have a login? Create an account" link)
3. fill the form to create a new user

This is the safest/simplest way to create new users while disabling new account creation

However it's not practical if you have a bunch of users to create, you might want to check and modify the php script in maintenance/createAndPromote.php (see http://www.mediawiki.org/wiki/Manual:Maintenance_scripts)

In that file you'll find the sequence of php instructions needed to create a new user (it will also give him admin rights, you'll need to remove that part of the code)

Or maybe there already is a php script for what you're asking on http://www.mediawiki.org ...


sharmishtha gupta wrote :
> Hi,
> We want to disable Signup for new users in mediawiki and want to add
> them into database manually. for this we want to understand the sequence
> of function used to store a new user into mediawiki database. we looked
> this:-
> includes/GlobalFunctions.php
> function wfEncryptPassword( $userid, $password ) {
>         global $wgPasswordSalt;
>         $p = md5( $password);
>         if($wgPasswordSalt)
>                 return md5( "{$userid}-{$p}" );
>         else
>                 return $p;
> }
> But need to know that where $wgPasswordSalt set its value and finally
> where this function called to get encryted password.
> Can you suggest sequence of storing a new user in mediawiki as this will
> be of great help.
> Thank you
> On 1/14/08, Alexis Moinet <alexis.moinet-LfqbaU+xhLyZIoH1IeqzKA at public.gmane.org> wrote:
>> sharmishtha gupta wrote :
>>> I think i frame my question little bit confusing, let me modifie a bit
>>> I need to know that In what form is the password stored in MediaWiki,
>>> OR, What encryption do we need to use to store a password manually in MW
>>> user table?".
>> see :
>> http://lists.wikimedia.org/mailman/htdig/mediawiki-l/2007-August/022784.htmland the file includes/GlobalFunctions.php (function
>> wfEncryptPassword(  $userid, $password  ) )
>> _______________________________________________
>> MediaWiki-l mailing list
>> MediaWiki-l-RusutVdil2icGmH+5r0DM0B+6BGkLq7r at public.gmane.org
>> http://lists.wikimedia.org/mailman/listinfo/mediawiki-l

More information about the MediaWiki-l mailing list