> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CREATE USER

See [Users](https://docs.kinetica.com/content/security/sec_concepts.md#security-concepts-users) for details about users within
*Kinetica*.

[Users](https://docs.kinetica.com/content/security/sec_concepts.md#security-concepts-users) can be added to the system and assigned
[permissions](https://docs.kinetica.com/content/security/sec_concepts.md#security-concepts-permissions) either directly or via
[roles](https://docs.kinetica.com/content/security/sec_concepts.md#security-concepts-roles).

Optionally, the user can be associated with a
[resource group](https://docs.kinetica.com/content/rm/concepts.md#rm-concepts-resource-groups) and/or be assigned a
[default schema](https://docs.kinetica.com/content/concepts/schemas.md#schema-default).

```sql title="CREATE USER Syntax" theme={null}
CREATE USER <user name>
[ < [WITH] PASSWORD [=] | IDENTIFIED BY [PASSWORD] > '<user password>' ]
[ [WITH] RESOURCE GROUP [=] <group name> ]
[ [WITH] DEFAULT SCHEMA [=] <schema name> ]
[ [WITH] ACTIVATED [=] <TRUE | FALSE> ]
```

> [!NOTE]
>
> The password needs to be single-quoted and must not contain single quotes.

## Examples

Two of the ways to create a new internal user with the user ID of
**jsmith** and a password of **secret** are:

```sql IDENTIFIED BY theme={null}
CREATE USER jsmith IDENTIFIED BY 'secret'
```

```sql WITH PASSWORD theme={null}
CREATE USER jsmith WITH PASSWORD 'secret'
```

To create an internal user with the user ID of **jsmith**, a password of
**secret**, and assigning the **memory\_over\_execution** *resource group*:

```sql CREATE USER with Resource Group Example theme={null}
CREATE USER jsmith
IDENTIFIED BY 'secret'
WITH RESOURCE GROUP memory_over_execution
```

To create a user with an existing external LDAP user, the user name should match
the LDAP user name and be prepended with the `@` symbol; no password is
supplied, as the user will be externally authenticated:

```sql CREATE USER (External) Example theme={null}
CREATE USER "@jsmith"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.