CML Reference Guide

Chapter 4.21:  Password Functions

[TOP] [UP] [PREV]

Caucus version 3.2 adds a much more complete set of userid & password manipulation functions.  See the swebd configuration file swebd.conf for more information about setting up the initial userid & password management.

$pw_can_add()
Evaluates to 1 if userids may be added to the userid & password database, and 0 otherwise.

$pw_can_change()
Evaluates to 1 if passwords may be changed in the userid & password database, and 0 otherwise.

$pw_can_delete()
Evaluates to 1 if userids may be deleted from the userid & password database, and 0 otherwise.

$pw_can_verify()
Evaluates to 1 if userids and passwords may be verified from the userid & password database, and 0 otherwise. 

The values of the above 4 functions are taken directly from the parameters of the same name in swebd.conf.

 

$pw_add(id pw override)
Add the userid id with password pw to the password database.  If override is 1, anyone can add a userid.  Otherwise, the user must have the MGR_MKID permission bit.  Evaluates to 0 on success, or one of the error codes listed below.

$pw_change(id pw)
Change userid id's password to pw.  A user may change their own password, or a manager with the MGR_CHGPASS permission bit may change anyone's password.  Evaluates to 0 on success, or one of the error codes listed below.

$pw_delete(id)
Delete userid id from the password database.  Requires that the user have the MGR_RMID permission bit.  Evaluates to 0 on success, or one of the error codes listed below.

(Remember to delete the user information with $per_delete() before deleting the userid!)

$pw_verify(id pw)
Verifies that userid id has password pw.  Evaluates to 0 on success, or one of the error codes listed below.

The error codes for the previous 4 pw_ functions are: