Domino9 Bulk Reset your email password under Web mode
Recently, the company has a distribution of nearly 700 people, all need to reset a mailbox password, reset password simple, can be numerous, if the administrator through a manual way a reset will bring great trouble to administrators, while the password requirements reset to a different password, If all the user password reset to a password for a lot of convenience, so think of the Web program to achieve the bulk of the password reset mailbox, after finishing, the effect is good, and then share to everyone, for reference learning.
Password reset requirement is user name +*** after 6 bit; The format requirement for resetting user passwords by Web is: User name, password method
650) this.width=650; "title=" clip_image002 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image002" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742512w7OE.jpg" height= "314"/>
We'll start by creating an empty database in notes
650) this.width=650; "title=" clip_image004 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image004" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742512i7U3.jpg" height= "363"/>
Name the database: CHANGEPWD.NSF
650) this.width=650; "title=" clip_image006 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image006" src= "http://img1.51cto.com/attachment/201410/8/451336_14127425126Di7.jpg" height= "357"/>
Once created, we open the database through Desinger.
650) this.width=650; "title=" clip_image008 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image008" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742513bRcp.jpg" height= "429"/>
Since we've started to define the layout page for the Web, we'll start by creating a form
650) this.width=650; "title=" clip_image010 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image010" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742513dLQG.jpg" height= "225"/>
Form name: pwd
650) this.width=650; "title=" clip_image012 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image012" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742513kckk.jpg" height= "/>"
Set your own page format: see below for specific references:
<div style= "Display:none" ></div><div style= "text-align:center" >
After writing the code well, we save
650) this.width=650; "title=" clip_image014 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image014" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742513NSHm.jpg" height= "242"/>
650) this.width=650; "title=" clip_image016 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image016" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742513f1H3.jpg" height= "343"/>
User Name field Value Property---text, multi-value
650) this.width=650; "title=" clip_image018 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image018" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742513oX4C.jpg" height= "358"/>
The input parameters are distinguished by a new line
650) this.width=650; "title=" clip_image020 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image020" src= "http://img1.51cto.com/attachment/201410/8/451336_14127425139ch7.jpg" height= "/>"
Adjust page size
650) this.width=650; "title=" clip_image022 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image022" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742513m7H8.jpg" height= "335"/>
Add a Reset button
650) this.width=650; "title=" clip_image024 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image024" src= "http://img1.51cto.com/attachment/201410/8/451336_14127425134AMK.jpg" height= "347"/>
The form for resetting the password has been completed.
650) this.width=650; "title=" clip_image026 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image026" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742517CW6y.jpg" height= "331"/>
Reset Password Program:---new agent agtpwd
650) this.width=650; "title=" clip_image028 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image028" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742517E2hr.jpg" height= "336"/>
650) this.width=650; "title=" clip_image030 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image030" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742517dBbR.jpg" height= "" "/>
editing programs
650) this.width=650; "title=" clip_image032 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image032" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742517Q6Ca.jpg" height= "307"/>
%remagent Modify user name password created 2013-12-15 by administrator/iiosoftdescription: comments for Agent%END REMOption PublicOption DeclareDim session As Notessessiondim db as notesdatabasedim doc as notesdocumentdim namesdb As NotesDatabaseDim namesdoc As NotesDocumentDim namesview As notesviewsub initializeon error goto err_handledim flag as booleandim mstring as stringdim arr as variantset session = new Notessessionset db = session. Currentdatabaseset doc = session. Documentcontextset namesdb = new notesdatabase ("", "Names.nsf") flag = FalseIf not namesdb. isopen thenmsgbox "You do not have permission to modify, please contact the administrator" print |<script type= ' Text/javascript ' >alert ("You do not have permission to modify , please contact the Administrator "");window.location = "/httpIio-mail01.iiosoft.com/chgupwd.nsf/|+doc.form (0) +|? OpenForm "; </script>| Exit subend ifset namesview = namesdb. Getview ("People") forall msg in doc.usernamecall fnchangeuserpwd (msg) end forallprint |<a href = "/| & doc.dbpath (0) & |/pwd?openform" >click here to return | Exit suberr_handle:msgbox session. Currentdatabase.filepath + session. currentagent.namemsgbox errormsgbox erlend sub%remsub fnchangeuserpwddescription: Comments for sub%end remsub fnchangeuserpwd (msg as string) On Error Goto ehdim namedoc as notesdocumentdim user as stringdim pwd as stringif msg= "" thenexit subend ifuser=strleft (MSG, ",") Pwd=strright (msg, ",") Set namedoc=namesview. Getdocumentbykey (user, true) if not namedoc is nOthing thennamedoc.httppassword = evaluate (| @Password ("| & pwd &|") |) Namedoc. httppasswordchangedate = nowcall namedoc.save (true,true) Print "change user : " & user & " &NBSP;PASSWORD&NBSP;: " & pwd & " ,Rest success <br>" elseprint "can not find user: " & user & "<br>" end ifexit subeh:msgbox error & " " & erlend sub
650) this.width=650; "title=" clip_image034 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image034" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742517VOmp.jpg" height= "354"/>
%remagent Modify user name password created 2013-12-15 by administrator/iiosoftdescription:comments for Agent%end Remoption PublicOption Declare
650) this.width=650; "title=" clip_image036 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image036" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742517SRRU.jpg" height= "358"/>
Dim session as Notessessiondim DB as Notesdatabasedim Doc as Notesdocumentdim Namesdb as Notesdatabasedim Namesdoc as Note Sdocumentdim Namesview as Notesview
650) this.width=650; "title=" clip_image038 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image038" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742517CGc4.jpg" height= "346"/>
Sub initializeon error goto err_handledim flag as booleandim mstring as stringdim arr as variantset session = new notessessionset db = session. Currentdatabaseset doc = session. Documentcontextset namesdb = new notesdatabase ("", "Names.nsf") flag = FalseIf not namesdb. isopen thenmsgbox "You do not have permission to modify, please contact the administrator" print |<script type= ' Text/javascript ' >alert ("You do not have permission to modify , please contact the Administrator "");window.location = "Http://iio-mail01.iiosoft.com/ChgUpwd.nsf/|+doc.Form (0) +|? OpenForm "; </script>| Exit subend ifset namesview = namesdb. Getview ("People") forall msg in doc.usernamecall fnchangeuserpwd (msg) end forallprint |<a href = "/| & doc.dbpath (0) & |/pwd?openform" >click here to return | exit suberr_handle:msgbox a session. Currentdatabase.filepath + session. Currentagent.namemsgbox errormsgbox erlend sub
650) this.width=650; "title=" clip_image040 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image040" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742517C26U.jpg" height= "336"/>
%remsub fnchangeuserpwddescription: comments for sub%end remsub fnchangeuserpwd ( msg as string) on error goto ehdim namedoc as notesdocumentdim User as stringdim pwd as stringif msg= "" thenexit subend ifuser= Strleft (MSG, ",") Pwd=strright (msg, ",") Set namedoc=namesview. Getdocumentbykey (user, true) If not namedoc is nothing thennamedoc.httppassword = evaluate (| @Password ("| & pwd &|") |) Namedoc. httppasswordchangedate = nowcall namedoc.save (true,true) Print "change user : " & user & " &NBSP;PASSWORD&NBSP;: " & pwd & " ,Rest success <br>" elseprint "can not find user: " & user & "<br>" end ifexit subeh:msgbox error &&nbSP; " " & erlend sub
After the code is tagged, we need to invoke the program through the form
650) this.width=650; "title=" clip_image042 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image042" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742518Appz.jpg" height= "361"/>
View server information
650) this.width=650; "title=" clip_image044 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image044" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742518W34r.jpg" height= "336"/>
Enter the user and password that need to be reset to reset the password
650) this.width=650; "title=" clip_image046 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image046" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742518IhDN.jpg" height= "356"/>
After the reset is complete, we can see the log of the operation
650) this.width=650; "title=" clip_image048 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image048" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742518MNNG.jpg" height= "259"/>
After resetting, you can also click the jump page to jump to the password reset home page
650) this.width=650; "title=" clip_image050 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image050" src= "http://img1.51cto.com/attachment/201410/8/451336_1412742518hova.jpg" height= "269"/>
After resetting, we use the console to verify that the password is reset successfully
650) this.width=650; "title=" clip_image052 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt = "clip_image052" src= "http://img1.51cto.com/attachment/201410/8/451336_141274251886u2.jpg" height= "239"/>
650) this.width=650; "title=" clip_image054 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image054 "src=" http://img1.51cto.com/attachment/201410/8/451336_1412742518Z0Sj.jpg "height=" 227 "/>
Note: The database is uploaded to the page, after you download the attachment, change the extension to. 7z before extracting it.
This article is from the "Gao Wenrong" blog, make sure to keep this source http://gaowenlong.blog.51cto.com/451336/1561185
Domino9 Bulk Reset your email password under Web mode