Change Web Password

By using a combination of JavaScript and a LotusScript Agent, users can submit requests to change a Domino Web password and it is automatically changed in the appropriate person document. An administrator can also be e-mailed if any security violations occur.

This code is placed behind the OnClick event of a hotspot on a Form.

var passWin

passwin = window.open ('FormName?OpenForm', '',


In the Form I collect first name, last name and the new password twice. The submit button calls a JavaScript function called 'validate()'


function validate(){

var msg;
var msgflag;
var pswdflag;

msgflag = "false";
pswdflag = "false";

if(document.forms[0].NewPasswd.value != ""){
passStr = new String(document.forms[0].NewPasswd.value)
if(passStr.length < 4){
pswdflag = "true";
alert("Password must be a minimum of 4 characters long!");
if(document.forms[0].ConfirmPasswd.value == ""){
pswdflag = "true";
alert("Please verify you new password by re-entering it into the New Password
Confirmation field!");

if(document.forms[0].ConfirmPasswd.value != ""){
if(document.forms[0].ConfirmPasswd.value !=
pswdflag = "true";
alert("The password entered in the New password Confirmation field does match the New Password!");

if(msgflag == "true"){
if(pswdflag == "false") {

} } } *************************************
Finally I schedule the following LotusScript Agent to run every fifteen minutes.

Dim tmpsecurename As String
Dim tmpwebName As String
Dim itemFirst As String
Dim itemLast As String
Dim itemAuthor As String
Dim passChange As String

Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim nextDoc As NotesDocument
Dim view As NotesView

Dim i As Variant

Set db = session.CurrentDatabase
Set view = db.GetView("PersonalInfo")
Set doc = view.GetFirstdocument

While Not (doc Is Nothing)
passChange = doc.NewPasswd(0)
itemFirst = doc.FirstName(0)
itemLast = doc.LastName(0)
itemAuthor = doc.Author(0)
tmpwebName = itemFirst & " " & itemLast
tmpsecureName = itemAuthor

Call VerifyName(tmpwebName, tmpsecureName)

Set nextDoc = view.GetNextDocument(doc)
Call doc.remove(True)
Set doc = nextDoc


End Sub Sub SecurityError
Dim securitylog As NotesLog

Set securitylog = New NotesLog("Security Violations")

Call securitylog.OpenMailLog _
("Admin Name", "Security Violations")

Call securitylog.LogAction( tmpsecureName & " attempted to change the password of " & _
tmpwebName & ".")

Call securitylog.Close

End Sub

Function VerifyName(webName As String, secureName As String) As String
Dim domDir As New NotesDatabase("", "names.nsf"), personDoc As NotesDocument, passItem As NotesItem
Dim userView As NotesView, tmpuserFirst As Variant, tmpuserLast As Variant,
userFirst As String, userLast As String, verifiedUser As String
Dim passEncrypt As Variant

webName = tmpwebName
secureName = tmpsecureName

If ebName <> secureName Then
Call SecurityError()
Set userView = domDir.GetView("People")
Set personDoc = userView.GetFirstDocument

While Not (personDoc Is Nothing)
If personDoc.HasItem("FirstName") Then
tmpuserFirst = personDoc.GetItemValue("FirstName")
userFirst = tmpuserFirst(0)

End If
If personDoc.HasItem("LastName") Then
tmpuserLast = personDoc.

This was first published in November 2000

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.