Use this statement to add users to the database.
You must have the system privilege CREATE USER.
- For the user to be able to log in, the system privilege CREATE SESSION must be granted.
User names are restricted by the same rules as SQL identifiers, except that user names are case insensitive even when delimited by quotation marks. This means that the usernames "Test", "TEST", and "test" are synonymous.
Periods are not allowed in usernames.For more information, see SQL Identifier.
- For authentication, you can use passwords, Kerberos, or LDAP.
- A user will not be automatically associated with a schema when created .
- A user can be altered using the ALTER USER command and renamed using the RENAME command.
- For information about the database users, refer to the system tables EXA_DBA_USERS, EXA_ALL_USERS, and EXA_USER_USERS.
- For details about password security (complexity, expiry, locking accounts, see Database Users and Roles and Privileges.
Authentication using password
If you want to authenticate the database user with a password, create a user authenticated by a password. The database checks the password when they log in. The password has to be specified as identifier. If you use delimited (quoted) identifiers, then the password is case sensitive. For more information, see SQL Identifier.
In case of a regular identifier (unquoted) the password will be set to uppercase letters and has to be adjusted for the login.
Authentication using Kerberos
If you want to enable single sign on with Kerberos, create a user authenticated by Kerberos. The JDBC and ODBC drivers will then authenticate the user by Kerberos service (single sign-on). The defined principal looks like <user>@<realm>.
For additional information about the overall Kerberos configuration, refer to the Kerberos Single Sign-On section.
Authentication using LDAP
If you want to authenticate the database user with LDAP Lightweight Directory Access Protocol (authentication service), create a user authenticated by LDAP. The database checks the password against an LDAP server which can be configured per database
Make sure that your LDAP server is already set up for authenticating the database users.
- Log in to EXAoperation.
- Shut down the database.
- Edit the database and add the LDAP Server URLs starting with either ldap:// or ldaps://.
For more information about how to edit a database, see Edit a Database.
- Click Apply to save the changes.
- Start the database.
- Log in to your database using an SQL client.
- Run the following statement to create a user with LDAP authentication.
You can find the required information for the above statement from the following methods depending on your operating system:
Windows OS: You can use one of the following commands to find the information from your LDAP server:
a) Get-ADUser: Use the command through Powershell. To use this method, you need Remote Server Administration Tools installed and the feature Active Directory-Module for Windows PowerShell at your system. Example:
b) dsquery: Use the command through cmd with admin privilege. To use this method, you need Remote Server Administration Tools installed on your system. Example:
Linux OS: You can use the LDAPSEARCH command to find the information from your LDAP server. Examples:
For more information, see Linux man page for LDAPSEARCH.
Further Information on LDAP in Exasol
If you want to know more about LDAP authentication in Exasol, see the following Exasol Knowledge Base articles:
Multi-factor Authentication (MFA)
Multi-factor authentication (MFA) can be used if it is supported by the authentication provider. For more information, refer to the authentication provider’s documentation.