mirror of
https://github.com/gravitational/teleport.git
synced 2026-11-02 23:31:08 +08:00
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
23 lines
1.2 KiB
Plaintext
23 lines
1.2 KiB
Plaintext
Create a local Teleport user with the built-in `access` role:
|
|
|
|
```code
|
|
$ tctl users add \
|
|
--roles=access \
|
|
--db-users=\* \
|
|
--db-names=\* \
|
|
alice
|
|
```
|
|
|
|
| Flag | Description |
|
|
|---------------------------|------------------------------------------------------------------------------------------------------------------------------------------|
|
|
| <nobr>`--roles`</nobr> | List of roles to assign to the user. The builtin `access` role allows them to connect to any database server registered with Teleport. |
|
|
| <nobr>`--db-users`</nobr> | List of database usernames the user will be allowed to use when connecting to the databases. A wildcard allows any user. |
|
|
| <nobr>`--db-names`</nobr> | List of logical databases (aka schemas) the user will be allowed to connect to within a database server. A wildcard allows any database. |
|
|
|
|
<Admonition type="warning">
|
|
Database names are only enforced for PostgreSQL and MongoDB databases.
|
|
</Admonition>
|
|
|
|
For more detailed information about database access controls and how to restrict
|
|
access see [RBAC](../../database-access/rbac.mdx) documentation.
|