提示信息

/etc/login.defs 文件内容及其解释

韦欣睿 已关注

/etc/login.defs 是设置用户帐号限制的文件。该文件里的配置对root用户无效。

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

  1. # *REQUIRED* required
  2. # Directory where mailboxes reside, _or_ name of file, relative to the
  3. # home directory. If you _do_ define both, MAIL_DIR takes precedence.
  4. # QMAIL_DIR is for Qmail
  5. #
  6. #QMAIL_DIR Maildir
  7. MAIL_DIR /var/spool/mail
  8. #创建用户时,要在目录/var/spool/mail中创建一个用户mail文件
  9. #MAIL_FILE .mail
  10. # Password aging controls:
  11. #
  12. # PASS_MAX_DAYS Maximum number of days a password may be used.
  13. # PASS_MIN_DAYS Minimum number of days allowed between password changes.
  14. # PASS_MIN_LEN Minimum acceptable password length.
  15. # PASS_WARN_AGE Number of days warning given before a password expires.
  16. #
  17. PASS_MAX_DAYS 99999
  18. #密码最大有效期
  19. PASS_MIN_DAYS 0
  20. #两次修改密码的最小间隔时间
  21. PASS_MIN_LEN 5
  22. #密码最小长度,对于root无效
  23. PASS_WARN_AGE 7
  24. #密码过期前多少天开始提示
  25. #
  26. # Min/max values for automatic uid selection in useradd
  27. #创建用户时不指定UID的话自动UID的范围
  28. UID_MIN 500
  29. #用户ID的最小值
  30. UID_MAX 60000
  31. #用户ID的最大值
  32. #
  33. # Min/max values for automatic gid selection in groupadd
  34. #自动组ID的范围
  35. GID_MIN 500
  36. #组ID的最小值
  37. GID_MAX 60000
  38. #组ID的最大值
  39. #
  40. # If defined, this command is run when removing a user.
  41. # It should remove any at/cron/print jobs etc. owned by
  42. # the user to be removed (passed as the first argument).
  43. #
  44. #USERDEL_CMD /usr/sbin/userdel_local
  45. #当删除用户的时候执行的脚本
  46. #
  47. # If useradd should create home directories for users by default
  48. # On RH systems, we do. This option is overridden with the -m flag on
  49. # useradd command line.
  50. #
  51. CREATE_HOME yes
  52. #使用useradd的时候是够创建用户目录
  53. # The permission mask is initialized to this value. If not specified,
  54. # the permission mask will be initialized to 022.
  55. UMASK 077
  56. # This enables userdel to remove user groups if no members exist.
  57. #
  58. USERGROUPS_ENAB yes
  59. #用MD5加密密码
    遇到难题? "AI大模型GPT4.0、GPT" 是你的私人解答专家! 点击按钮去提问......
韦欣睿 关注 已关注

最近一次登录:2023-10-09 16:03:56   

暂时还没有签名,请关注我或评论我的文章
×
免费图表工具,画流程图、架构图