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脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

记事本++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.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.压缩文件夹为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.zip文件[root@cgls]#unzipmydata.zip5.查看myd

当默认快捷键与使用的软件按键冲突或需要按照自己的习惯使用快捷键,这时候只好修改和设置默认快捷键,该怎么修改CentOS7默认的快捷键额?下面我们就来看看详细的教程。1、开启虚拟机中的Centos7系统,进入桌面2、单击左上角的应用程序->系统工具->设置3、进入到设置界面,单击设备4、选择Keyboard,单击右边任意一项,并在键盘上按下要设置的快捷键,即可更改其快捷键,(注意有些是无法更改的!)5、更改后如下所示,最后点击设置,这样快捷键的设置修改就完成了。
