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 © 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 © 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 © 2004-2018, GBase. All Rights Reserved.
gbase>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值