濮阳杆衣贸易有限公司

主頁 > 知識庫 > centos7如何設(shè)置密碼規(guī)則?centos7設(shè)置密碼規(guī)則的方法

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

熱門標(biāo)簽:ai智能外呼系統(tǒng)是什么 百度ai電銷機(jī)器人排名 哪種品牌的400電話申請 適用的400電話辦理 成都米蘭申請 百度地圖地圖標(biāo)注客服多少 廣東電話機(jī)器人開戶 iphone地圖標(biāo)注我的店鋪 旅游路書地圖標(biāo)注

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

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

重復(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 

# 在新密碼中至少需要一個小寫字符。
 [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 

# 在新密碼中至少需要一個大寫字符
 [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 

# 在新密碼中至少需要一個數(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 

# 密碼包括至少一個特殊字符
 [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個字符的字是否包含在新密碼中。
 [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 

標(biāo)簽:紹興 玉林 大連 汕頭 泰安 遼陽 陜西 茂名

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《centos7如何設(shè)置密碼規(guī)則?centos7設(shè)置密碼規(guī)則的方法》,本文關(guān)鍵詞  centos7,如何,設(shè)置,密碼,規(guī)則,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《centos7如何設(shè)置密碼規(guī)則?centos7設(shè)置密碼規(guī)則的方法》相關(guān)的同類信息!
  • 本頁收集關(guān)于centos7如何設(shè)置密碼規(guī)則?centos7設(shè)置密碼規(guī)則的方法的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    改则县| 蒙山县| 鸡泽县| 普宁市| 龙江县| 福建省| 庄河市| 郯城县| 宜君县| 额济纳旗| 留坝县| 新丰县| 德格县| 讷河市| 微博| 竹山县| 榆社县| 和田市| 固始县| 平湖市| 游戏| 司法| 工布江达县| 新沂市| 平顺县| 平顶山市| 松原市| 柳林县| 宁国市| 乌审旗| 张家港市| 周口市| 通山县| 龙胜| 柏乡县| 信丰县| 吴川市| 张家界市| 大兴区| 平山县| 视频|