KingbaseES-密码复杂度参数

在这里插入图片描述

passwordcheck.enable 密码复杂度开关,默认为关闭状态。

\c - sso
show passwordcheck.enable;
passwordcheck.enable
----------------------
off
(1 行记录)
alter system set passwordcheck.enable=on;
ALTER SYSTEM
select sys_reload_conf();
sys_reload_conf
-----------------
t
(1 行记录)
show passwordcheck.enable;
passwordcheck.enable
----------------------
on
(1 行记录)
passwordcheck.password_length 口令的最小长度,取值范围为 [8,63],缺省为8。

\c - sso
SHOW passwordcheck.password_length;
passwordcheck.password_length
-------------------------------
8
(1 row)

alter system SET passwordcheck.password_length = 10;
select sys_reload_conf();

SHOW passwordcheck.password_length;
passwordcheck.password_length
-------------------------------
10
(1 row)

\c - system
CREATE USER u_pwd PASSWORD '123ab';
ERROR: password length 5 is too short, should be longer than min
password length 10.
CREATE USER u_pwd PASSWORD '1234567890ab';
CREATE ROLE

passwordcheck.password_condition_letter 口令至少包含几个字母,取值范围为[2,61],缺省为2。

\c - sso
SHOW passwordcheck.password_condition_letter;
passwordcheck.password_condition_letter
-----------------------------------------
2
(1 row)

alter system SET passwordcheck.password_condition_letter = 3;
select sys_reload_conf();

SHOW passwordcheck.password_condition_letter;
passwordcheck.password_condition_letter
-----------------------------------------
3
(1 row)

\c - system
ALTER USER u_pwd PASSWORD '1234567890';
ERROR: Password should contain at least 3 letter and the current
number is 0
ALTER USER u_pwd PASSWORD '1234567890ab';
ERROR: Password should contain at least 3 letter and the current
number is 2
ALTER USER u_pwd PASSWORD '1234567890abC';
ALTER ROLE

passwordcheck.password_condition_digit 口令至少包含几个数字,取值范围为 [2,61],缺省为2。

\c - sso
SHOW passwordcheck.password_condition_digit;
passwordcheck.password_condition_digit
----------------------------------------
2
(1 row)

alter system SET passwordcheck.password_condition_digit = 3;
select sys_reload_conf();

SHOW passwordcheck.password_condition_digit;
passwordcheck.password_condition_digit
----------------------------------------
3
(1 row)

\c - system
ALTER USER u_pwd PASSWORD 'abcdefghij';
ERROR: Password should contain at least 3 digit and the current
number is 0
ALTER USER u_pwd PASSWORD 'abcdefghij123';
ALTER ROLE

passwordcheck.password_condition_punct 口令至少包含几个特殊字符,取值范围为 [0,59],缺 省为 0。其中特殊符号为除空白符、英文字母、单引号和数字外的所有可见字符。

\c - sso
SHOW passwordcheck.password_condition_punct;
passwordcheck.password_condition_punct
----------------------------------------
0
(1 row)

alter system SET passwordcheck.password_condition_punct = 2;
select sys_reload_conf();

SHOW passwordcheck.password_condition_punct;
passwordcheck.password_condition_punct
----------------------------------------
2
(1 row)

\c - system
ALTER USER u_pwd PASSWORD '1234567890abc.';
ERROR: Password should contain at least 2 punct and the current
number is 1
ALTER USER u_pwd PASSWORD '1234567890abc./';
ALTER ROLE
  • 10
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值