createUser(userId, password, [groupIds], [isAdmin=false])


userId is a string indicating a user name. It can only contain letters, underscores, or numbers. It cannot start with numbers. The length cannot exceed 30 characters.

password is a string indicating the password. It cannot contain space or control characters.

Since DolphinDB, users can determine whether to verify the complexity of password by setting the configuration enhancedSecurityVerification. If it is not specified, no verification will be applied; if it is set to true, the password must meet the following conditions:

  • 8-20 characters

  • at least 1 capital letter

  • at least 1 special character, including !"#$%&'()*+,-./:;<=>?@[]^_`{|}~

groupIds (optional) is a STRING scalar/vector indicating the group(s) the user belongs to.

isAdmin (optional) is a Boolean value indicating whether the user is an administrator.


Create an user. It can only be executed by an administrator.

The groups in groupIds must have been created with createGroup.


Create a user with user name 'JohnSmith' and password 'Qb0507'. This user belongs to group "research" and group "production. He is not an administrator.

createUser(`JohnSmith, "Qb0507#$", `research`production);