簡單的Linux使用者口令

來源:互聯網
上載者:User

由於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使用者口令控制。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.