====== Create_User subroutine ====== ==== Description ==== Creates a new user or modifies information about an existing user in the current database. In OpenInsight 10 and above, this routine is a legacy interface, providing reduced functionality; for complete functionality, using the new OpenInsight authentication procedures, see the RTI_CREATE_USER_DETAILS function. Note: Only Level 1 (Administrator) and Level 2 (System Administrator) users can create users. Level 0 (User) users can only change their own, existing information. ==== Syntax ==== **Create_User**(//userID//, //userpassword//, //userlevel//, [//overwriteflag], [expirval], [expirdate], [currentPwd]//) ==== Parameters ==== The Create_User routine has the following parameters. ^Parameter^Description^ |//userID//|A user identifier. //userID// must begin with an alpha character, followed by any combination of characters, digits, and underscores and cannot include spaces. The length cannot exceed 49 characters.| |//userpassword//|The new password for this user. If enhanced authentication is enabled, then the password must match the specified authentication policy. If legacy authentication is used instead, the password must be a string of characters, 6 to 20 characters in length, and - if not specified - the default is null, and a password is not required to access the database as this user.| |//userlevel//|There are three levels of users. When the user is logged in, the value is stored in the system variable @ADMIN.\\ \\ __Value__ __Description__\\ 0 - User.\\ 1 - Administrator.\\ 2 - System Administrator.\\ There is no default value for //userlevel//. If you do not specify a value, execution fails, and an error is generated.| |//overwriteflag//|If //overwriteflag// is true (1), any existing access level is overwritten. If overwriteflag is 0 or unspecified, and the user exists, the access level cannot be changed.| |expirval|Expiration parameter for the password. Possible values are:\\ \\ __Value__ __Description__\\ 0 - Expires at next login\\ 1 - Never Expires (default)\\ 2 - Expires at expirdate.| |expirdate|If expirval = 2, the expiration date (passed as a standard output converted date in a format such as mm/dd/yyyy). Only required if expirval = 2. Note that this value is only relevant when legacy authentication is enabled, expiration will be as per policy.| |currentPwd|If enhanced authentication is enabled on this OpenInsight system, the a User-level user who wishes to change any user information must pass in the current password in this parameter. This allows the system to verify that they are authorized to make changes to this user information.| ==== See Also ==== [[delete_user|Delete_User]], [[list_users|List_Users]], RTI_CREATE_USER_DETAILS ==== Example ==== /* At System Monitor prompt, Create the administrative level user ACCOUNTING. The password is ACCT_PASS. The password never expires.*/ RUN CREATE_USER 'ACCOUNTING', 'ACCT_PASS', 1 /* Create the user AC with no password, at the user level. The password needs to be changed at the next logon. */ RUN CREATE_USER 'AC', '', 0, 0, 0 /* Create the user ACCTG with a password ACCTG_PASS, as a system administrator. The password expires on October 3, 2003 */ RUN CREATE_USER 'ACCTG', 'ACCTG_PASS', 2, 1, 2, '10/3/2003'