%META:TOPICINFO{author="ProjectContributor" date="1716289088" format="1.1" version="1"}%
%META:TOPICPARENT{name="AdminToolsCategory"}%
---+ Bulk Reset Passwords

Administrators can use this topic to reset any number of user passwords.

Users whose passwords are reset with this will be sent an e-mail at the address recorded in the %WIKITOOLNAME% password system. The administrator will *not* be told the new passwords.
Each user will receive an email with a new random password, along with a link they can then use to reset the password.

Note.  This page loads the user table %DEFAULTPAGESIZE% users at a time.  To
load the page for all users [[BulkResetPassword?pagesize=;pager=off][click here]] *(Caution: very long running on large systems)*  Or pass in the desired pagesize in the URL.

*Follow these two steps:*

<form action="%SCRIPTURLPATH{"manage"}%/%WEB%/%TOPIC%" method="post">
<div class='foswikiFormSteps'>
<div class='foswikiFormStep'>
---+++ Select users [<a onclick="javascript:$('input[name="LoginName"]').each(function(_,v){$(v).attr('checked',!$(v).attr('checked'))})">Toggle all</a>]
%IF{
  "context passwords_modifyable"
  then=""
  else="<strong>%MAKETEXT{"Sorry, the password system is currently read only, please contact [_1]" args="%WIKIWEBMASTER%"}%</strong>"
}%
<!--
      * Set NOTMODIFYABLE = %IF{"context passwords_modifyable" then="" else="DISABLED"}%
-->
%SEARCH{
  "form.name ~ '*UserForm'"
  web="%USERSWEB%"
  type="query"
  header="|*WikiName*  | *Reset* |"
  format="| $web.$topic | <input %NOTMODIFYABLE% type='checkbox' name='LoginName' value='$topic'>  |"
  nosearch="on" nototal="on"
  pager="%URLPARAM{"pager" default="on"}%"
  %URLPARAM{"pagesize" default="pagesize=\"%DEFAULTPAGESIZE%\"}%
}%

*Note* if you don't see all the users you expect in this table, make sure their home topic has an attached %SYSTEMWEB%.UserForm. This is used to identify users.
</div>
<div class='foswikiFormStep'>
---+++ Write message

*This text will be sent to users in their "reset" e-mail.* The login name and password will be filled in automatically.
<textarea class="foswikiInputField" name="Introduction" rows="4" cols="70" style="width:99%;">
Welcome! The site is ready for your use. Please use the login name and password listed below and contact me if you have any questions.
</textarea>
</div>
<div class='foswikiFormStep foswikiLast'>
<input type="hidden" name="action" value="resetPassword">
<input %NOTMODIFYABLE% type="submit" class="foswikiSubmit" value="Reset selected user passwords and send message">
</div>
</div>

</form>

---

*Related Topics:* AdminToolsCategory

   * Set ALLOWTOPICVIEW = %USERSWEB%.AdminGroup
   * Set ALLOWTOPICCHANGE = %USERSWEB%.AdminGroup
