---
title: "ezgh warehouse users create"
description: "Create a user."
---

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

# ezgh warehouse users create

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh warehouse users create <warehouse> <name> [--preset p [--grants json]] [--settings-profile p] [--wait] [flags]
```

Create a user. Its password is generated and written to a new Secret in the project, which `users get` names; ezgh never prints it. Names are lowercase letters, digits and underscores, starting with a letter; default and names starting ezgh\_ are reserved. Presets: admin (everything in every database, every connection, other users' queries), readWrite (select, insert, alter and table DDL in every database), readOnly (select and show) or custom, whose grants go in `--grants` as the API's JSON: \[&#123;"database":"events","table":"\*","privileges":\["SELECT","INSERT"\]&#125;\], where table is a table's name or \* and privileges are SELECT, INSERT, ALTER, CREATE, DROP, TRUNCATE, OPTIMIZE and SHOW. `--settings-profile` is default, heavy or light.

Part of [`ezgh warehouse users`](/cli/reference/warehouse-users).

## Examples

```sh
ezgh warehouse users create analytics grafana --preset readOnly --settings-profile light --wait
ezgh warehouse users create analytics loader --preset custom \
  --grants '[{"database":"events","table":"*","privileges":["SELECT","INSERT"]}]' --wait
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--grants` | string |  | custom's grants as the API's JSON: \[&#123;"database":"events","table":"\*","privileges":\["SELECT"\]&#125;\] |
| `--preset` | string |  | admin, readWrite, readOnly or custom (with `--grants`) |
| `--settings-profile` | string |  | default, heavy or light |
| `--wait` | boolean |  | wait until it's available, and print it then |
| `--wait-timeout` | duration | `10m0s` | how long `--wait` waits |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/warehouse-users-create/index.mdx
