简单的Linux用户口令
创始人
2024-06-15 13:21:41
0

由于Linux非常的受欢迎,最近很多朋友都在学习Linux,本文为你讲解Linux用户口令,希望你能学好Linux用户口令。以前别人问做USER口令控制时,推荐别人使用/etc/shadow,后来想想,好好别的地方也行,这一翻,发现以下也可以控制。

  1. [root@linux1 init.d]#            more /etc/login.defs   
  2. # *REQUIRED*  
  3. #   Directory where mailboxes reside, _or_ name of file, relative to the  
  4. #   home directory.  If you _do_ define both, MAIL_DIR takes precedence.  
  5. #   QMAIL_DIR is for Qmail  
  6. #  
  7. #QMAIL_DIR      Maildir  
  8. MAIL_DIR        /var/spool/mail  
  9. #MAIL_FILE      .mail  
  10.    
  11. # Password aging controls:  
  12. #  
  13. #       PASS_MAX_DAYS   Maximum number of days a password may be used.  
  14. #       PASS_MIN_DAYS   Minimum number of days allowed between password changes.  
  15. #       PASS_MIN_LEN    Minimum acceptable password length.  
  16. #       PASS_WARN_AGE   Number of days warning given before a password expires.  
  17. #  
  18. PASS_MAX_DAYS   99999  
  19. PASS_MIN_DAYS   0  
  20. PASS_MIN_LEN    5  
  21. PASS_WARN_AGE   7  
  22.    
  23. #  
  24. # Min/max values for automatic uid selection in useradd  
  25. #  
  26. UID_MIN                   500  
  27. UID_MAX                 60000  
  28.    
  29. #  
  30. # Min/max values for automatic gid selection in groupadd  
  31. #  
  32. GID_MIN                   500  
  33. GID_MAX                 60000  
  34.    
  35. #  
  36. # If defined, this command is run when removing a user.  
  37. # It should remove any at/cron/print jobs etc. owned by  
  38. # the user to be removed (passed as the first argument).  
  39. #  
  40. #USERDEL_CMD    /usr/sbin/userdel_local  
  41.    
  42. #  
  43. # If useradd should create home directories for users by default  
  44. # On RH systems, we do. This option is overridden with the -M flag on  
  45. # useradd command line.  
  46. #  
  47. CREATE_HOME     yes  
  48.    
  49. [root@linux1 init.d]#   

这样你就能学会Linux用户口令控制。

相关内容

热门资讯

如何允许远程连接到MySQL数... [[277004]]【51CTO.com快译】默认情况下,MySQL服务器仅侦听来自localhos...
如何利用交换机和端口设置来管理... 在网络管理中,总是有些人让管理员头疼。下面我们就将介绍一下一个网管员利用交换机以及端口设置等来进行D...
施耐德电气数据中心整体解决方案... 近日,全球能效管理专家施耐德电气正式启动大型体验活动“能效中国行——2012卡车巡展”,作为该活动的...
20个非常棒的扁平设计免费资源 Apple设备的平面图标PSD免费平板UI 平板UI套件24平图标Freen平板UI套件PSD径向平...
德国电信门户网站可实时显示全球... 德国电信周三推出一个门户网站,直观地实时提供其安装在全球各地的传感器网络检测到的网络攻击状况。该网站...
为啥国人偏爱 Mybatis,... 关于 SQL 和 ORM 的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行...
《非诚勿扰》红人闫凤娇被曝厕所... 【51CTO.com 综合消息360安全专家提醒说,“闫凤娇”、“非诚勿扰”已经被黑客盯上成为了“木...
2012年第四季度互联网状况报... [[71653]]  北京时间4月25日消息,据国外媒体报道,全球知名的云平台公司Akamai Te...