Batch modify Http passwords under Domino
It is not easy to be a Domino administrator. Why? We know that the daily creation and deletion of user accounts will cause great troubles to administrators, if the created user and the password to be reset are many other tasks, the administrator should stop doing things all day long. It is estimated that there is no appetite for eating for a day. Is there any good solution! Yes, that is, through Domino development, and then batch change users' Http passwords. For details, see
Environment Introduction:
Server1: dsgrd-mail01.dsgrd.com
Server2: dsgrd-mail02.dsgrd.com
Register users on different servers:
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://www.bkjia.com/uploads/allimg/131228/0143035S1-0.jpg "height =" 281 "/>
2. Create a database, create a form, and edit the relevant data.
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://www.bkjia.com/uploads/allimg/131228/0143033501-1.jpg "height =" 379 "/>
3. Create an attempt:
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://www.bkjia.com/uploads/allimg/131228/01430344K-2.jpg "height =" 378 "/>
4. Enter the code:
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://www.bkjia.com/uploads/allimg/131228/014303JM-3.jpg "height =" 339 "/>
5. For the code content, see:
Sub Click (Source As Button)
Dim ws As New NotesUIWorkspace
Dim se As New NotesSession
Dim curdoc As NotesDocument
Set curdoc = ws. CurrentDocument. Document
Dim sfile As Variant
Sfile = ws. OpenFileDialog (False, "select an Excel file", "c :\")
Dim sDomain As String
SDomain = Inputbox ("Enter the Domain name. ")
If sDomain = "" Then
Msgbox "requires domain input. "
Exit Sub
End If
Dim sUser, sUser2 As String
Dim sdate As String
Dim I As Integer
If Not (Isempty (sfile) Then
Forall filename In sfile
If Right (filename, 4) <> ". xls" Then
Msgbox "select an Excel file. "
Exit Sub
End If
Dim oExcel As Variant
Set oExcel = CreateObject ("Excel. Application ")
Set oWorkbook = oExcel. Workbooks. Open (Cstr (filename ))
Set oWorkSheet = oWorkbook. Sheets (1)
Dim namesdb As New notesdatabase (se. CurrentDatabase. Server, "names. nsf ")
Dim namesview As notesview
Dim namesdoc As notesdocument
Dim ss As String
Set namesview = namesdb. getview ("($ VIMPeople )")
I = 2
Dim cs As String
While oWorkSheet. Range ("A" & Cstr (I). Value <> ""
SUser = oWorkSheet. Range ("A" & Cstr (I). Value
SUser2 = sUser + "/" + sDomain
Sdate = oWorkSheet. Range ("B" & Cstr (I). Value
Dim doc As notesdocument
Dim username As NotesName, username1 As NotesName
Set username = New NotesName (sUser2)
Newpwd = sUser + sdate
Set namesdoc = namesview. getdocumentbykey (Cstr (username. Abbreviated), True)
If namesdoc Is Nothing Then
Ss = "the user information" + sUser + "is not found in the address book! "
Else
Mstring = "@ Password ('" + newpwd + "')"
Namesdoc. HTTPPassword = Evaluate (mstring)
Call namesdoc. save (True, True)
The password for ss = sUser + "is reset to" + newpwd + ". "
End If
Cs = cs + Chr (10) + ss
I = I + 1
Wend
Call ws. CurrentDocument. FieldSetText ("rtf", cs)
'Msgbox cs
Msgbox "execution completed. "
End Forall
End If
End Sub
6. Save the database and copy it to the Data directory of the server:
Note: add permissions to the person who needs to execute the database.
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://www.bkjia.com/uploads/allimg/131228/0143031057-4.jpg "height =" 401 "/>
7. Open the database on the notes console. Download the workbook template and enter the password of the user to be reset.
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://www.bkjia.com/uploads/allimg/131228/014303G54-5.jpg "height =" 381 "/>
Enter the name of the user whose password needs to be reset under the user name, and enter the second half of the user password in the mail date column:
Because I asked the user to reset the password to the user name + the time the user needs to reset the email sent
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://www.bkjia.com/uploads/allimg/131228/0143035T8-6.jpg "height =" 292 "/>
After entering this information, we will crack down on uploading:
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://www.bkjia.com/uploads/allimg/131228/0143031017-7.jpg "height =" 381 "/>
Enter the network domain name of your current email
650) this. width = 650; "title =" image "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 =" image "src =" http://www.bkjia.com/uploads/allimg/131228/01430362N-8.png "height =" 359 "/>
The execution is complete. The execution result is shown below.
650) this. width = 650; "title =" image "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 =" image "src =" http://www.bkjia.com/uploads/allimg/131228/014303FQ-9.png "height =" 299 "/>
This article from "Gao Wenlong" blog, please be sure to keep this source http://gaowenlong.blog.51cto.com/451336/1191276