---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.4
alternate:
  - https://ydb.tech/docs/en/yql/reference/syntax/create-user.md
  - https://ydb.tech/docs/ru/yql/reference/syntax/create-user.md
sourcePath: en/core/yql/reference/syntax/create-user.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt

# CREATE USER

Creates a user with the specified name and password.

Syntax:

```yql
CREATE USER user_name [option]
```

* `user_name`: The name of the user. It may contain lowercase Latin letters and digits.
* `option` — command option:
  * `PASSWORD 'password'` — creates a user with the password `password`.
  * `PASSWORD NULL` — creates a user with an empty password (default).
  * `NOLOGIN` - disallows user login (user lockout).
  * `LOGIN` - allows user login (default).

<!-- source: en/_includes/do-not-create-users-in-ldap.md -->
{% note info %}

The scope of the commands `CREATE USER`, `ALTER USER`, and `DROP USER` does not extend to external user directories. Keep this in mind if users with third-party authentication (e.g., LDAP) are connecting to YDB. For example, the `CREATE USER` command does not create a user in the LDAP directory. Learn more about [YDB's interaction with the LDAP directory](https://ydb.tech/docs/en/security/authentication.md#ldap-auth-provider).

{% endnote %}
<!-- endsource: en/_includes/do-not-create-users-in-ldap.md -->
