Skip to content

Commit

Permalink
Update 2.management-user.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cooper-lzy authored Oct 12, 2023
1 parent 16e0264 commit c9239a3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs-2.0/7.data-security/1.authentication/2.management-user.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,12 @@
- 语法

```ngql
ALTER USER <user_name> [WITH PASSWORD '<password>'] [WITH IP WHITELIST <ip_list>];
ALTER USER <user_name> [WITH PASSWORD '<password>'] [WITH IP WHITELIST { <ip_list> | % }];
```

- `ip_list`:IP 白名单列表。该用户只有通过列表内的 IP 才能连接{{nebula.name}}。多个 IP 之间用英文逗号(,)分隔。
- `%`:表示取消白名单。用户使用任何 IP 都可以连接{{nebula.name}}。

{{ ent.ent_end }}

{{ comm.comm_begin }}
Expand All @@ -200,10 +204,6 @@

- 示例

!!! enterpriseonly

使用`WITH IP WHITELIST`时,后面不填写任何 IP 表示取消白名单,用户使用任何 IP 都可以连接{{nebula.name}}。

```ngql
nebula> ALTER USER user2 WITH PASSWORD 'change_password';
nebula> ALTER USER user2 WITH PASSWORD 'nebula' WITH IP WHITELIST 192.168.10.10;
Expand All @@ -214,7 +214,7 @@
| "root" | "" |
| "user2" | "192.168.10.10" |
+---------+-----------------+
nebula> ALTER USER user2 WITH IP WHITELIST;
nebula> ALTER USER user2 WITH IP WHITELIST %;
nebula> SHOW USERS;
+---------+--------------+
| Account | IP Whitelist |
Expand Down

0 comments on commit c9239a3

Please sign in to comment.