国产成人精品久久免费动漫-国产成人精品天堂-国产成人精品区在线观看-国产成人精品日本-a级毛片无码免费真人-a级毛片毛片免费观看久潮喷

您的位置:首頁技術(shù)文章
文章詳情頁

centos7如何設(shè)置密碼規(guī)則?centos7設(shè)置密碼規(guī)則的方法

瀏覽:208日期:2022-06-06 14:39:11

出于安全考慮設(shè)置密碼規(guī)則

設(shè)置密碼到期的天數(shù)。 
用戶必須在天內(nèi)更改密碼。 
此設(shè)置僅影響創(chuàng)建用戶,而不會(huì)影響現(xiàn)有用戶。 
如果設(shè)置為現(xiàn)有用戶,請運(yùn)行命令“chage -M(days)(user)”。
PASS_MAX_DAYS   60 # 密碼到期時(shí)間
PASS_MIN_DAYS   3  # 初始密碼更改時(shí)間
PASS_MIN_LEN    8  # 密碼最小長度
PASS_WARN_AGE   7  # 密碼過期提示時(shí)間

重復(fù)密碼限制使用

 [root@linuxprobe~]# vi /etc/pam.d/system-auth
# near line 15: prohibit to use the same password for 5 generation in past

password     sufficient     pam_unix.so sha512 shadow nullok try_first_pass use_authtok remember=5

設(shè)置最小密碼長度。 用戶不能設(shè)置小于此參數(shù)的密碼長度。

 # set 8 for minimum password length

[root@linuxprobe~]# authconfig --passminlen=8 --update
# the parameter is set in a config below

[root@linuxprobe~]# grep "^minlen" /etc/security/pwquality.conf
minlen = 8 

# 在新密碼中設(shè)置同一類的允許連續(xù)字符的最大數(shù)目
 # set 4 for maximum number of allowed consecutive characters of the same class

[root@linuxprobe~]# authconfig --passmaxclassrepeat=4 --update
# the parameter is set in a config below

[root@linuxprobe~]# grep "^maxclassrepeat" /etc/security/pwquality.conf
maxclassrepeat = 4 

# 在新密碼中至少需要一個(gè)小寫字符。
 [root@linuxprobe~]# authconfig --enablereqlower --update
# the parameter is set in a config below
# (if you"d like to edit the value, edit it with vi and others)

[root@linuxprobe~]# grep "^lcredit" /etc/security/pwquality.conf
lcredit = -1 

# 在新密碼中至少需要一個(gè)大寫字符
 [root@linuxprobe~]# authconfig --enablerequpper --update
# the parameter is set in a config below

# (if you"d like to edit the value, edit it with vi and others)
[root@linuxprobe~]# grep "^ucredit" /etc/security/pwquality.conf
ucredit = -1 

# 在新密碼中至少需要一個(gè)數(shù)字
 [root@linuxprobe~]# authconfig --enablereqdigit --update
# the parameter is set in a config below

# (if you"d like to edit the value, edit it with vi and others)
[root@linuxprobe~]# grep "^dcredit" /etc/security/pwquality.conf
dcredit = -1 

# 密碼包括至少一個(gè)特殊字符
 [root@linuxprobe~]# authconfig --enablereqother --update
# the parameter is set in a config below

# (if you"d like to edit the value, edit it with vi and others)
[root@linuxprobe~]# grep "^ocredit" /etc/security/pwquality.conf
ocredit = -1 

# 在新密碼中設(shè)置單調(diào)字符序列的最大長度。 (ex⇒"12345","fedcb")
 [root@linuxprobe~]# vi /etc/security/pwquality.conf
# add to the end
maxsequence = 3 

# 設(shè)置新密碼中不能出現(xiàn)在舊密碼中的字符數(shù)
 [root@linuxprobe~]# vi /etc/security/pwquality.conf
# add to the end
difok = 5 

# 檢查來自用戶passwd條目的GECOS字段的長度超過3個(gè)字符的字是否包含在新密碼中。
 [root@linuxprobe~]# vi /etc/security/pwquality.conf
# add to the end
gecoscheck = 1 

# 設(shè)置不能包含在密碼中的Ssace分隔的單詞列表
 [root@linuxprobe~]# vi /etc/security/pwquality.conf
# add to the end
badwords = denywords1 denywords2 denywords3 

# 為新密碼設(shè)置hash / crypt算法。 (默認(rèn)為sha512)
# show current algorithm

[root@linuxprobe~]# authconfig --test | grep hashing

password hashing algorithm is md5
# chnage algorithm to sha512

[root@linuxprobe~]# authconfig --passalgo=sha512 --update
[root@linuxprobe~]# authconfig --test | grep hashing
password hashing algorithm is sha512 
相關(guān)文章:
主站蜘蛛池模板: 亚洲第一狼人区 | 精品久久成人免费第三区 | 久久国产一级毛片一区二区 | 久久久久免费视频 | 国产高清在线免费视频 | 国产免费人成在线看视频 | 精品成人在线 | 国产成人久久精品推最新 | 手机在线免费看毛片 | 欧美成人性色生活片免费在线观看 | 免费一级美国片在线观看 | 日本精品一区二区三区视频 | 国产资源精品一区二区免费 | 日本一级毛片高清免费观看视频 | 美女扒开腿让男人桶个爽 | 成人在线免费小视频 | 成人18免费网 | aaa一级毛片 | 免费三级网站 | 九九久久九九久久 | 国产黄色a三级三级三级 | 亚洲精品字幕一区二区三区 | 国产在线播放成人免费 | 无内丝袜透明在线播放 | 国产四区 | 国产精品成人在线播放 | 免费观看视频成人国产 | 色网址在线 | 日韩欧美精品一区二区 | 欧美综合一区 | 国产一区二区三区四区在线观看 | 久久久久久久国产a∨ | 欧美成人影院在线观看三级 | 男人操美女逼视频 | 男女午夜爽爽 | 亚洲欧美另类视频 | 欧美特黄特色aaa大片免费看 | 另类视频一区 | 国产成人精品日本亚洲语音1 | 毛片在线看免费 | 久久爽久久爽久久免费观看 |