centos7如何設定密碼規則?centos7設定密碼規則的方法
出於安全考慮設定密碼規則
#设置密码到期的天数。 用户必须在天内更改密码。 此设置仅影响创建用户,而不会影响现有用户。 如果设置为现有用户,请运行命令“chage -M(days)(user)”。
PASS_MAX_DAYS 60 # 密码到期时间 PASS_MIN_DAYS 3# 初始密码更改时间 PASS_MIN_LEN8# 密码最小长度 PASS_WARN_AGE 7# 密码过期提示时间
重複密碼限制使用
[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
設定最小密碼長度。使用者不能設定小於此參數的密碼長度。
# 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 # 在新密码中设置同一类的允许连续字符的最大数目 # 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 # 在新密码中至少需要一个数字 [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 # 在新密码中设置单调字符序列的最大长度。 (ex⇒'12345','fedcb') [root@linuxprobe~]# vi /etc/security/pwquality.conf # add to the end maxsequence = 3 # 设置新密码中不能出现在旧密码中的字符数 [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 # 设置不能包含在密码中的Ssace分隔的单词列表 [root@linuxprobe~]# vi /etc/security/pwquality.conf # add to the end badwords = denywords1 denywords2 denywords3 # 为新密码设置hash / crypt算法。 (默认为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
以上是centos7如何設定密碼規則?centos7設定密碼規則的方法的詳細內容。更多資訊請關注PHP中文網其他相關文章!

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

載CentOS-7.0-1406的時候,有很多可選則的版本,對於普通用戶來說,不知道選擇哪個好,下面做一下簡單介紹:(1)CentOS-xxxx-LiveCD.ios和CentOS-xxxx- bin-DVD.iso有什麼差別?前者只有700M,後者有3.8G。其差異不僅在大小上,其更本質的差異是,CentOS-xxxx-LiveCD.ios只能載入到記憶體裡運行,不能安裝。 CentOS-xxx-bin-DVD1.iso才可以安裝到硬碟上。 (2)CentOS-xxx-bin-DVD1.iso,Ce

打開centos7頁面出現:welcometoemergencymode! afterloggingin,type“journalctl-xb”toviewsystemlogs,“systemctlreboot”toreboot,“systemctldefault”totryagaintobootintodefaultmode。 giverootpasswordformaintenance(??Control-D???):解決方法:執行r

centos7系統中tmp目錄下有很多垃圾,想要清除垃圾,該怎麼清除呢?下面我們就來看看詳細的教學。查看tmp檔案目錄下檔案列表,執行指令cdtmp/切換到tmp目前檔案目錄,執行ll指令,查看目前目錄下檔列表。如下圖所示。使用rm刪除檔案指令,需要注意的是rm指令是將檔案永遠從系統中刪除,因此建議在使用rm指令時,最好是在刪除檔案前給予提示。使用指令rm-i檔名,等用戶確認刪除(y)或跳過刪除(n),系統進行對應的操作。如下圖所示。

出於安全考慮設定密碼規則設定密碼到期的天數。使用者必須在天內更改密碼。此設定僅影響建立用戶,而不會影響現有用戶。如果設定為現有用戶,請執行指令「chage-M(days)(user)」。 PASS_MAX_DAYS60#密碼到期時間PASS_MIN_DAYS3#初始密碼更改時間PASS_MIN_LEN8#密碼最小長度PASS_WARN_AGE7#密碼過期提示時間重複密碼限制使用[root@linuxprobe~]#vi/etc/pam.d/system-auth#nearline15:

1.壓縮資料夾為zip檔[root@cgls]#zip-rmydata.zipmydata2.把mydata.zip解壓縮到mydatabak目錄裡面[root@cgls]#unzipmydata.zip-dmydatabak3.mydata01資料夾和mydata02.txt mydata.zip[root@cgls]#zipmydata.zipmydata01mydata02.txt4.直接解壓縮mydata.zipmydata.zipmydata01mydata02.txt4.直接解壓縮mydata.zip檔[root@cgls]#unzipmydata.zip5.查看myd

1.UncaughtError:Calltoundefinedfunctionmb_strlen();出現如上錯誤時,說明我們沒裝上mbstring擴展;2.進入PHP安裝目錄cd/temp001/php-7.1.0/ext/mbstring3.啟動phpize(/usr/local/bin /phpize或/usr/local/php7-abel001/bin/phpize)指令來安裝php擴充4../configure--with-php-config=/usr/local/php7-abel

centos7不帶mysql資料庫了,預設的資料庫是mariadb(mysql的一個分支)。可以依照以下步驟手動安裝mysql資料庫。 1.下載rpm安裝檔wgethttp://repo.mysql.com/mysql-community-release-el7.rpm2.執行rpm安裝rpm-ivhmysql-community-release-el7.rpm依賴解析完成後,出現下列選項:dependenciesresolved ===================================

1.官網下載安裝包選擇適合linux的版本,這裡選擇最新的版本,下載到本地後上傳到伺服器或centos下直接wget指令下載。切換到/usr/local目錄,下載軟體包#cd/usr/local#wgethttp://nginx.org/download/nginx-1.11.5.tar.gz2、安裝nginx先執行以下指令,安裝nginx依賴函式庫,如果缺少依賴函式庫,可能會安裝失敗,具體可以參考文章後面的錯誤提示資訊。 #yuminstallgcc-c++#yuminstallpcre#yumins
