ChangePassword

Item Description

Use with:

Startup scripts, Terminal Launcher, Web, Windows

SecureLogin Version:

All

Type:

Action

Usage:

ChangePassword Variable [Text] [Random]

Arguments:

Variable

[Text]

[Random]

A normal or runtime variable that the new password is stored in.

The text you want displayed in the change password dialog box.

Invokes the random password generator.

Description:

Allows a single variable to be changed. Use this command in scenarios where password expiration is an issue. The Variable will be set to the new password.

The flag for this command is Random. If Random is set, the new password will be generated automatically in compliance with the variable's password policy.

If Random is not set, a dialog box prompts the user to enter a new password. The new password is tried against any variable password policies that are in place. Also see RestrictVariable.

Syntax Examples:

ChangePassword $NewPassword
ChangePassword ?NewPassword "Enter a new password"
ChangePassword ?NewPassword Random

Example:
Windows Script

The script detects the change password event. The application requires the current username and password, then the new password and confirmation of the new password. The script creates a backup of the old password in case the password change fails (which can be detected via the message that pops up). The script then generates and enters a new password.

# Change Password Dialog Box 
Dialog
Class #32770
Title "Change Password"
EndDialog
Set $PasswordBackup $Password 
Type $Password #1015
ChangePassword $Password Random
Type $Password #1005
Type $Password #1006
Click #1
# Change Password Failed Dialog Box 
Dialog
Class #32770
Title "Change Password Failed"
EndDialog
# Set the password back as the password change failed 
Set $Password $PasswordBackup
MessageBox "The change password process failed. Retry the password change at your next login. IT x453."