南大通用GBase 8a集群数据库用户密码长度限制

GBase 8a集群数据库用户密码长度限制,通过系统参数password_min_length进行。

默认配置
gbase> show variables like '%password%';
+------------------------------+-------+
| Variable_name | Value |
+------------------------------+-------+
| _gbase_check_password_format | OFF |
| old_passwords | OFF |
| password_format_option | 0 |
| password_life_time | 0 |
| password_min_length | 0 |
| password_reuse_max | 0 |
| password_reuse_time | 0 |
| report_password | |
+------------------------------+-------+
8 rows in set (Elapsed: 00:00:00.00)


修改所有管理节点和计算节点的配置文件,增加
password_min_length=8
参数,重启集群所有节点


[root@gbase86_1 zxq]# gccli
GBase client 8.6.2.38-R1.105911. Copyright (c) 2004-2018, GBase. All Rights Reserved.
gbase> show variables like '%password%';
+------------------------------+-------+
| Variable_name | Value |
+------------------------------+-------+
| _gbase_check_password_format | OFF |
| old_passwords | OFF |
| password_format_option | 0 |
| password_life_time | 0 |
| password_min_length | 8 |
| password_reuse_max | 0 |
| password_reuse_time | 0 |
| report_password | |
+------------------------------+-------+
8 rows in set (Elapsed: 00:00:00.02)
gbase> ^CAborted
[root@gbase86_1 zxq]# gccli -umasked -pmasked
GBase client 8.6.2.38-R1.105911. Copyright (c) 2004-2018, GBase. All Rights Reserved.

-- 密码长度不符合要求,不会对当前已经使用的用户造成影响。
gbase> use testdb;
Query OK, 0 rows affected (Elapsed: 00:00:00.00)
gbase> show tables;
+------------------+
| Tables_in_testdb |
+------------------+
| mask_default |
| mask_default2 |
| t |
| t1 |
| t2 |
| t_enc |
+------------------+
6 rows in set (Elapsed: 00:00:00.00)

-- 只有在密码变动,创建用户等设计密码时,才会检查。
gbase> set password=password('masked');
ERROR 1802 (HY000): Invalid password format,length should >= 8.
gbase> set password=password('masked12');
Query OK, 0 rows affected (Elapsed: 00:00:00.02)
gbase> ^CAborted
[root@gbase86_1 zxq]# gccli -umasked -pmasked
ERROR 1045 (28000): Access denied for user 'masked'@'localhost' (using password: YES)
[root@gbase86_1 zxq]# gccli -umasked -pmasked12
GBase client 8.6.2.38-R1.105911. Copyright (c) 2004-2018, GBase. All Rights Reserved.
gbase>