User management
.px.pm. addUser create a user deleteUser delete a user getUser get user information lock lock a user’s account resetPassword reset a user’s password setUserGroups set a user‘s groups unlockUser unlock a user’s account updatePolicy update a user’s password policy updateUser update a user’s information
.px.pm.addUser
Create a user
.px.pm.addUser x
Creates a user corresponding to entries in dictionary x
:
name | type | description
----------------|---------|---------------------------
user | symbol | Username of new user
password | symbol | Password for new user
authType | symbol | Authentication type
inherit | boolean | Inherit user group authentication true/false
policyUserGroup | symbol | Group to inherit policy from
maxAttempts | int | Maximum password attempts before account is locked
minHistory | int | Number of previous passwords the user cannot repeat
minLength | int | Minimum password length
maxLength | int | Maximum password length
duration | int | Number of days before password must be changed
policy | dict | Custom policy with number of each character type
email | symbol | Email address
and returns null.
q)dict
user | `TestUser2
password | `PA55word^&
inherit | 0b
maxAttempts| 12
minHistory | 11
minLength | 6
maxLength | 13
duration | 20
policy | `cLower`cUpper`number`special!2 2 2 2i
email | `TestUser2@emailaddress.com
.px.pm.addUser[dict]
.px.pm.deleteUser
Delete a user
.px.pm.deleteUser x
Deletes user whose name matches the symbol atom x
, and returns null.
.px.pm.deleteUser `TestUser2
.px.pm.getUser
Details for a user
.px.pm.getUser x
Returns a dictionary of user information for the user whose name matches symbol atom x
.
q).px.pm.getUser[`TestUser2]
user | `TestUser2
groups | `BSU`DashboardUsers
ip | *
attempts | 0N
status | `reset
..
.px.pm.lock
Lock a user’s account
.px.pm.lock x
Locks the account of the user whose name matches the symbol atom x
, and returns null.
.px.pm.lock `TestUser1
.px.pm.resetPassword
Reset a user’s password
.px.pm.resetPassword[x;y]
Resets to symbol atom y
the password of the user whose name matches symbol atom x
, and returns null.
.px.pm.resetPassword[`TestUser1;`$"Password2"]
.px.pm.setUserGroups
Update groups for a user
.px.pm.setUserGroups[x;y]
Makes the user whose name matches symbol atom x
a member of the groups identified in symbol atom or vector y
, and returns null.
.px.pm.setUserGroups[`TestUser2;()]
.px.pm.setUserGroups[`TestUser2;`BSU]
.px.pm.setUserGroups[`TestUser2;`DashboardUsers`BSUManagers]
.px.pm.unlockuser
Unlock a user’s account
.px.pm.unlockuser x
Unlocks the account os the user whose name matches symbol atom x
and returns null.
.px.pm.unlock `TestUser1
.px.pm.updatePolicy
Update password policy for user
.px.pm.updatePolicy x
Sets the password policy for users x.user
to match other entries in dictionary x
user symbol Username of user
inherit boolean Inherit user group authentication true/false
policyUserGroup symbol Group to inherit policy from
maxAttempts int Maximum password attempts before account is locked
minHistory int Number of previous passwords the user cannot repeat
minLength int Minimum password length
maxLength int Maximum password length
duration int Number of days before password must be changed
policy dict Custom policy with number of each character type
and returns null.
q)dict
user | `TestUser2
policyUserGroup| ()
inherit | 0b
maxAttempts | 10
minHistory | 11
minLength | 6
maxLength | 13
duration | 20
policy | `cLower`cUpper`number`special!2 2 2 2i
q).px.pm.updatePolicy dict
q).px.pm.updatePolicy `user`policyUserGroup`inherit!(`TestUser2;`BSU;1b)
.px.pm.updateUser
Update details for a user
.px.pm.updateUser x
Set details for user x.user
accoring to o.ther entries in dictionary x
user symbol Username of user
groups symbol/s Groups user will belong to
inherit boolean Inherit user group authentication true/false
policyUserGroup symbol Group to inherit policy from
maxAttempts int Maximum password attempts before account is locked
minHistory int Number of previous passwords the user cannot repeat
minLength int Minimum password length
maxLength int Maximum password length
duration int Number of days before password must be changed
policy dict Custom policy with number of each character type
email symbol Email address
and return null.
q)dict
user | `TestUser1
groups | `BSU`DashboardUsers
inherit | 0b
maxAttempts| 12
minHistory | 11
minLength | 6
maxLength | 13
duration | 20
policy | `cLower`cUpper`number`special!2 3 2 1i
email | `TestUser1New@emailaddress.com
q).px.pm.updateUser dict
q)dict:`user`policyUserGroup`groups`inherit!(`TestUser2;`BSU;`BSU`DashboardUsers;1b)
q).px.pm.updateUser dict