kingbaseESV8R6设置用户口令复杂度

1、修改kingbase.conf后方追加
shared_preload_libraries参数添加passwordcheck
passwordcheck.enable=on
passwordcheck.password_length=8
passwordcheck.password_condition_letter=2
passwordcheck.password_condition_digit=2
passwordcheck.password_condition_punct=1
identity_pwdexp.password_change_interval=90

passwordcheck.enable
密码参数开关,默认值off
passwordcheck.password_length
设置密码的最小长度限制,默认值8,范围8..63
passwordcheck.password_condition_letter
设置密码至少包含几个字母,默认值2,范围2..61
passwordcheck.password_condition_digit
设置密码至少包含几个数字,默认值2,范围2..61
passwordcheck.password_condition_punct
设置密码至少包含几个特殊字符,默认值0,范围0..59

2、重启服务生效
sys_ctl -D /home/kingbase/KingbaseES/V8 data restart

3、登录数据库创建扩展
create extension passwordcheck;
create extension identity_pwdexp;

4、检查应用服务的数据库配置文件,确认口令设置是否符合要求。
test=# create user test_user with password '12345678';
ERROR:  Password should contain at least 2 letter and the current letter is 0
test=# create user test_user with password '12345678ab';
ERROR:  Password should contain at least 1 punct and the current punct is 0
test=# create user test_user with password '12345678ab!';
CREATE ROLE
test=#

  • 11
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值