Reset root or admin password of mediawiki

From Notes_Wiki
Revision as of 09:45, 31 January 2016 by Saurabh (talk | contribs) (Created page with "<yambe:breadcrumb>Mediawiki_configuration|Mediawiki configuration</yambe:breadcrumb> =Reset root or admin password of mediawiki= To reset root or admin password of wiki use f...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<yambe:breadcrumb>Mediawiki_configuration|Mediawiki configuration</yambe:breadcrumb>

Reset root or admin password of mediawiki

To reset root or admin password of wiki use following steps:

  1. Comment all $wgAuth settings in LocalSettings.php so that wiki only uses local authentication.
  2. Connect to wiki database by looking at database configuration in LocalSettings.php
  3. Look at user_groups table and find user_id of user who is member of bureaucrat and sysop. Look at username of the user with this id in user table.
  4. Use:
    php maintenance/changePassword.php --user=<username> --password=<new_password>
    where <new_password> must be at least 8 characters long, eg, admin123.
  5. Again uncomment $wgAuth lines in LocalSettings.php. Note that for local login select "Your domain" as local


Debugging login issues

  1. For debugging add:
    $wgShowExceptionDetails = True;
    at end of LocalSetting.php file to get more details