简单的Linux用户口令


由于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用户口令控制。

相关内容

    暂无相关文章