Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

UserPassword

  • Last UpdatedJul 18, 2023
  • 2 minute read

Not available for a Windows user.

Changes the password for the user. Changes are written to both the Users database and the runtime database in memory.

An alarm server needs to be configured and running in the project, so that all clients are notified that an online change to the users configuration has been completed.

If you use this function to perform user configuration changes across an online system with multiple computers running SCADA nodes, you will need to use the [CtEdit]Run and [CtEdit]Copy parameters to distribute the updated files throughout the system.

You will also need to execute the UserPassword function on:

  • The computer where the master/source Users.dbf and _Users.rdb files are located.

    Or:

  • The computer to which [CtEdit]Copy is pointing.

    Or:

  • The computer from which [CtEdit]Copy is copying files.

UserPassword can only work for users that are contained in the main project.

Note: Only those users assigned a role with "Manage User" privilege set to True can set a user password without knowing the existing password. Other users attempting to run will encounter an error.

This function is a blocking function. It blocks the calling Cicode task until the operation is complete.

Syntax

UserPassword(sName [, sPassword] [, sOldPassword] )

sName:

The name of the user.

sPassword:

The password of the user.

The sPassword argument is optional. If not passed, this argument defaults to an empty string which is subsequently ignored. It is included for the purposes of handling duplicate user names and separate password identification compatibility.

sOldPassword:

The password assigned to the user before the UserPassword() function is run.

The sOldPassword argument is optional. If passed, Plant SCADA will only permit the password change (and consequent re-setting of the expiry period) when the old password is correctly entered. If the sOldPassword parameter is not passed, the password change will proceed without restriction.

Return Value

0 (zero) if successful, otherwise an error code is returned.

UserPasswordForm, UserCreate, UserEditForm

Example

/* Change Fred's password */

UserPassword("Fred", "secret");

See Also

Security Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in