> ## 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

<a id="sql-security-user-mgmt" />

See [Users](/content/security/sec_concepts#security-concepts-users) for details about users within
*Kinetica*.

<a id="sql-security-user-mgmt-create" />

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

Optionally, the user can be associated with a
[resource group](/content/rm/concepts#rm-concepts-resource-groups) and/or be assigned a
[default schema](/content/concepts/schemas#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> ]
```

<Info>
  The password needs to be single-quoted and must not contain single quotes.
</Info>

## Examples

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

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

  ```sql WITH PASSWORD theme={null}
  CREATE USER jsmith WITH PASSWORD 'secret'
  ```
</CodeGroup>

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.