Linux 关于/etc/login.defs文件

Linux 关于/etc/login.defs文件

2013年12月20日 10:21:21 不再去说匆前 阅读数:7069更多

个人分类: Linux

man login.defs

/etc/login.defs文件定义了与/etc/password和/etc/shadow配套的用户限制设定。这个文件是需要的,缺失并不会影响系统的使用,但是也许会产生意想不到的错误。

如果/etc/shadow文件里有相同的选项,则以/etc/shadow里的设置为准,也就是说/etc/shadow的配置优先级高于/etc/login.defs。

 

# *REQUIRED* required
#  Directory where mailboxes reside, _or_ name of file, relative to the
#   home directory.  If you _do_ define both, MAIL_DIR takes precedence.
#   QMAIL_DIR is for Qmail
#
#QMAIL_DIR      Maildir
MAIL_DIR        /var/spool/mail
#创建用户时,要在目录/var/spool/mail中创建一个用户mail文件
#MAIL_FILE      .mail

# 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   99999
#密码最大有效期
PASS_MIN_DAYS   0
#两次修改密码的最小间隔时间
PASS_MIN_LEN    5
#密码最小长度,对于root无效
PASS_WARN_AGE   7
#密码过期前多少天开始提示
#
# Min/max values for automatic uid selection in useradd
#创建用户时不指定UID的话自动UID的范围
UID_MIN                   500
#用户ID的最小值
UID_MAX                 60000
#用户ID的最大值
#
# Min/max values for automatic gid selection in groupadd
#自动组ID的范围
GID_MIN                   500
#组ID的最小值
GID_MAX                 60000
#组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
#当删除用户的时候执行的脚本

#
# 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
#使用useradd的时候是够创建用户目录

# The permission mask is initialized to this value. If not specified,
# the permission mask will be initialized to 022.
UMASK           077

# This enables userdel to remove user groups if no members exist.
#
USERGROUPS_ENAB yes
#用MD5加密密码

转载于:https://my.oschina.net/u/3367404/blog/2967359

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值