Difference between revisions of "Reset a wiki user password"

From Organic Design wiki
(put back to one-liners so can copy/paste then into mysql)
Line 7: Line 7:
 
You need to log in to the database directly. First obtain the user's id as in the following example (alternatively, go to [[Special:Userlist]] and get the id from there):
 
You need to log in to the database directly. First obtain the user's id as in the following example (alternatively, go to [[Special:Userlist]] and get the id from there):
 
{{code|<mysql>
 
{{code|<mysql>
SELECT user_id  
+
SELECT user_id FROM prefix_user WHERE user_name='WikiSysop';
FROM prefix_user
 
WHERE user_name='WikiSysop';
 
 
</mysql>
 
</mysql>
 
}}
 
}}
Line 15: Line 13:
 
Note that the password is a nested concatenation of both the md5 of the user_id combined with the md5 password.
 
Note that the password is a nested concatenation of both the md5 of the user_id combined with the md5 password.
 
{{code|<mysql>
 
{{code|<mysql>
UPDATE prefix_user  
+
UPDATE prefix_user SET user_password=md5(CONCAT('1-',md5('newpassword'))) WHERE user_id=1;
SET user_password=md5(CONCAT('1-',md5('newpassword')))  
 
WHERE user_id=1;
 
 
</mysql>
 
</mysql>
 
}}
 
}}

Revision as of 23:51, 12 December 2008

Procedure.svg Reset a wiki user password
Organic Design procedure

You need to log in to the database directly. First obtain the user's id as in the following example (alternatively, go to Special:Userlist and get the id from there):

{{{1}}}

Then apply the query shown in the following example to set the password for that user id (here the WikiSysop user id is 1): Note that the password is a nested concatenation of both the md5 of the user_id combined with the md5 password.

{{{1}}}


See also