收藏文章 楼主

Linux账户密码过期安全策略设置

版块:linux   类型:普通   作者:小绿叶技术博客   查看:880   回复:0   获赞:0   时间:2021-10-26 17:40:22




# Password aging controls:

#

#       PASS_MAX_DAYS   Maximum number of days a password may be used.

#       PASS_MIN_DAYS   Minimum number of days allowed between password changes.

#       PASS_MIN_LEN    Minimum acceptable password length.

#       PASS_WARN_AGE   Number of days warning given before a password expires.

 

 

PASS_MAX_DAYS 60      #密码最大有效期,此处参数PASS_MAX_DAYS为60,表示60天后,密码会过期。99999表示永不过期。

PASS_MIN_DAYS 0      #两次修改密码的最小间隔时间,0表示可以随时修改账号密码

PASS_MIN_LEN  8      #密码最小长度,对于root无效

PASS_WARN_AGE 7      #密码过期前多少天开始提示

 

#

# Min/max values for automatic uid selection in useradd

#

UID_MIN                   500

UID_MAX                 60000

 

UID_MIN    #用户ID的最小值

UID_MAX    #用户ID的最大值

 

#

# Min/max values for automatic gid selection in groupadd

#

GID_MIN                   500

GID_MAX                 60000

 

GID_MIN    #组ID最小值

GID_MAX    #组ID最大值

 

 

#

# If defined, this command is run when removing a user.

# It should remove any at/cron/print jobs etc. owned by

# the user to be removed (passed as the first argument).

#

#USERDEL_CMD    /usr/sbin/userdel_local

 

USERDEL_CMD    #默认注释状态,如果定义了该变量,表示当删除一个user时,应删除/打印/ cron的工作等所拥有的用户被删除(作为第一个参数传递)。

 

#

# If useradd should create home directories for users by default

# On RH systems, we do. This option is overridden with the -m flag on

# useradd command line.

#

CREATE_HOME     yes

 

CREATE_HOME  #表示是否创建用户home目录。

 

 

# The permission mask is initialized to this value. If not specified, 

# the permission mask will be initialized to 022.

UMASK           077

 

UMASK     #权限掩码初始化值

 

# This enables userdel to remove user groups if no members exist.

#

USERGROUPS_ENAB yes

 

USERGROUPS_ENAB   #该参数启用,表示userdel删除用户时,如果该用户用户组如果没有成员存在,则会删除该用户组

 

# Use MD5 or DES to encrypt password? Red Hat use MD5 by default.

MD5_CRYPT_ENAB yes

 

ENCRYPT_METHOD MD5   

 

ENCRYPT_METHOD  #表示用户密码加密方式,此处表示用MD5加密密码


       https://www.cnblogs.com/kerrycode/p/5600525.html

提供企业建站服务,免费网防系统,提交信息登录 http://yundun.ddoss.cn 邮箱: proposal@ddoss.cn 
回复列表
默认   热门   正序   倒序

回复:Linux账户密码过期安全策略设置

头像

用户名:

粉丝数:

签名:

资料 关注 好友 消息