MariaDB 開啓密碼複雜度審計和密碼過期

#安裝啓用
INSTALL SONAME 'simple_password_check';
#檢查驗證
show variables like '%password%';
+-----------------------------------------+-------+
| Variable_name                           | Value |
+-----------------------------------------+-------+
| default_password_lifetime               | 30    |
| disconnect_on_expired_password          | OFF   |
| max_password_errors                     | 5     |
| old_passwords                           | OFF   |
| report_password                         |       |
| simple_password_check_digits            | 1     |
| simple_password_check_letters_same_case | 1     |
| simple_password_check_minimal_length    | 8     |
| simple_password_check_other_characters  | 1     |
| strict_password_validation              | ON    |
+-----------------------------------------+-------+

配置文件設置方式

[mysqld]
#加載密碼複雜度審計插件
plugin-load=simple_password_check.so
#密碼長度,默認8位
simple_password_check_minimal_length=8
#特殊符號,1代表至少1位
simple_password_check_other_characters=1
#字母數,1代表至少1位
simple_password_check_letters_same_case=1
#數字數,1代表至少1位
simple_password_check_digits=1
#默認密碼過期時間 單位天 每過180天就要修改密碼
default_password_lifetime=180
#最大錯誤登錄次數
max_password_errors=5

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章