暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

磐维数据库password_lock_time参数对比

Z·A·Q 2025-10-27
183

password_lock_time参数

  • 当帐户被锁定时间超过password_lock_time的设定值,则当前帐户自动解锁。时间设置越长越安全,但是在使用过程中会带来不便
1.0 与 2.0 参数对比
对比项 1.0 2.0
unit 单位 分钟
vartype 参数类型 real integer
min_val 最小值 0 1
max_val 最大值 365 525600
查询结果 image.png image.png
1.0 版本调整为10分钟
[omm@pwdb1 ~]$ gs_guc reload -Z datanode -N all -I all -c "password_lock_time=0.00694445"
The gs_guc run with the following arguments: [gs_guc -Z datanode -N all -I all -c password_lock_time=0.00694445 reload ].
NOTICE: password_lock_time and failed_login_attempts must have positive for lock and unlock functions to work as.
Begin to perform the total nodes: 1.
Popen count is 1, Popen success count is 1, Popen failure count is 0.
Begin to perform gs_guc for datanodes.
Command count is 1, Command success count is 1, Command failure count is 0.

Total instances: 1. Failed instances: 0.
ALL: Success to perform gs_guc!


[omm@pwdb1 ~]$ gsql -r
gsql ((PanWeiDB(openGauss) 1.0.0 build 9a7e96bc) compiled at 2022-10-15 20:54:36 commit 0 last mr  )
NOTICE : The password has been expired, please change the password. 
Non-SSL connection (SSL connection is recommended when requiring high-security)
Type "help" for help.

PanWeiDB=# show password_lock_time ;
 password_lock_time 
--------------------
 10min
(1 row)

PanWeiDB=# 
2.0 版本调整为10分钟
[omm@pwdb2 ~]$ gs_guc reload -Z datanode -N all -I all -c "password_lock_time=10"
The pw_guc run with the following arguments: [gs_guc -Z datanode -N all -I all -c password_lock_time=10 reload ].
NOTICE: password_lock_time and failed_login_attempts must have positive for lock and unlock functions to work as.
Begin to perform the total nodes: 1.
Popen count is 1, Popen success count is 1, Popen failure count is 0.
Begin to perform gs_guc for datanodes.
Command count is 1, Command success count is 1, Command failure count is 0.

Total instances: 1. Failed instances: 0.
ALL: Success to perform gs_guc!


[omm@pgdb1 ~]$ gsql -r
gsql ((PanWeiDB_V2.0-S3.1.0_B01) compiled at 2024-12-19 11:44:29 commit 5d08dc9 )
Non-SSL connection (SSL connection is recommended when requiring high-security)
Type "help" for help.

postgres=# show password_lock_time ;
 password_lock_time 
--------------------
 10
(1 row)
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论