From 3a3a92c7a487124901a702276f9fd5926554b94d Mon Sep 17 00:00:00 2001 From: "Lei, HUANG" Date: Thu, 14 May 2026 16:56:39 +0800 Subject: [PATCH] docs: add `cli user admin-password` command for resetting admin password - `enterprise/user.md`: document the new CLI command for resetting the admin password via `greptime cli user admin-password`, covering both English and Chinese versions (nightly and v1.0) - note that the command must be invoked from a Metasrv instance and reads backend storage settings from a Metasrv config file Signed-off-by: Lei, HUANG --- docs/enterprise/user.md | 13 +++++++++++++ .../current/enterprise/user.md | 11 +++++++++++ .../version-1.0/enterprise/user.md | 11 +++++++++++ versioned_docs/version-1.0/enterprise/user.md | 13 +++++++++++++ 4 files changed, 48 insertions(+) diff --git a/docs/enterprise/user.md b/docs/enterprise/user.md index 1f8a17f706..3ed880d1b9 100644 --- a/docs/enterprise/user.md +++ b/docs/enterprise/user.md @@ -251,6 +251,19 @@ expression form: ```text Created admin user with auto-generated password ``` +- **Resetting the Admin Password**: You can reset the `admin` password using the + CLI without manually editing the KV store. The command reads backend storage + settings from a Metasrv config file and supports the standard + `GREPTIMEDB_METASRV__...` environment variable overrides. + ```shell + ./greptime cli user admin-password \ + --new-password \ + --config-file /path/to/metasrv.toml + ``` + This command must be invoked from a Metasrv instance. The `--config-file` + should point to the same Metasrv config file used by your Metasrv (or + standalone) deployment, so the CLI can locate the correct backend storage + (etcd, MySQL, or PostgreSQL). - **Persistence**: User information is persisted in the Metasrv's KV store, making it available across all frontend nodes in a cluster. - **Admin Protection**: The built-in `admin` user cannot be deleted via the API. diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/enterprise/user.md b/i18n/zh/docusaurus-plugin-content-docs/current/enterprise/user.md index 4a9f47c986..db4bfb7af9 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/enterprise/user.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/enterprise/user.md @@ -237,6 +237,17 @@ ACL 表单包含两个页签。你可以选择精确的表,也可以选择整 ```text Created admin user with auto-generated password ``` +- **重置管理员密码**:你可以使用 CLI 重置 `admin` 密码,无需手动编辑 KV 存储。 + 该命令从 Metasrv 配置文件中读取后端存储设置,并支持标准的 + `GREPTIMEDB_METASRV__...` 环境变量覆盖。 + ```shell + ./greptime cli user admin-password \ + --new-password \ + --config-file /path/to/metasrv.toml + ``` + 此命令必须在 Metasrv 实例上执行。`--config-file` 应指向你的 Metasrv(或 + standalone)部署所使用的同一 Metasrv 配置文件,以便 CLI 能够定位正确的后端 + 存储(etcd、MySQL 或 PostgreSQL)。 - **持久化**:用户信息会持久化在 Metasrv 的 KV 存储中,因此集群中的所有 frontend 节点都可以访问这些用户信息。 - **Admin 保护**:内置的 `admin` 用户不能通过 API 删除。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/enterprise/user.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/enterprise/user.md index 4a9f47c986..db4bfb7af9 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/enterprise/user.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/enterprise/user.md @@ -237,6 +237,17 @@ ACL 表单包含两个页签。你可以选择精确的表,也可以选择整 ```text Created admin user with auto-generated password ``` +- **重置管理员密码**:你可以使用 CLI 重置 `admin` 密码,无需手动编辑 KV 存储。 + 该命令从 Metasrv 配置文件中读取后端存储设置,并支持标准的 + `GREPTIMEDB_METASRV__...` 环境变量覆盖。 + ```shell + ./greptime cli user admin-password \ + --new-password \ + --config-file /path/to/metasrv.toml + ``` + 此命令必须在 Metasrv 实例上执行。`--config-file` 应指向你的 Metasrv(或 + standalone)部署所使用的同一 Metasrv 配置文件,以便 CLI 能够定位正确的后端 + 存储(etcd、MySQL 或 PostgreSQL)。 - **持久化**:用户信息会持久化在 Metasrv 的 KV 存储中,因此集群中的所有 frontend 节点都可以访问这些用户信息。 - **Admin 保护**:内置的 `admin` 用户不能通过 API 删除。 diff --git a/versioned_docs/version-1.0/enterprise/user.md b/versioned_docs/version-1.0/enterprise/user.md index 1f8a17f706..3ed880d1b9 100644 --- a/versioned_docs/version-1.0/enterprise/user.md +++ b/versioned_docs/version-1.0/enterprise/user.md @@ -251,6 +251,19 @@ expression form: ```text Created admin user with auto-generated password ``` +- **Resetting the Admin Password**: You can reset the `admin` password using the + CLI without manually editing the KV store. The command reads backend storage + settings from a Metasrv config file and supports the standard + `GREPTIMEDB_METASRV__...` environment variable overrides. + ```shell + ./greptime cli user admin-password \ + --new-password \ + --config-file /path/to/metasrv.toml + ``` + This command must be invoked from a Metasrv instance. The `--config-file` + should point to the same Metasrv config file used by your Metasrv (or + standalone) deployment, so the CLI can locate the correct backend storage + (etcd, MySQL, or PostgreSQL). - **Persistence**: User information is persisted in the Metasrv's KV store, making it available across all frontend nodes in a cluster. - **Admin Protection**: The built-in `admin` user cannot be deleted via the API.