使用此程序,在嘗試登入失敗達特定次數後會鎖定一般使用者帳戶。
開始之前
不要在用來進行管理活動的系統上,將此保護設定為全系統保護。而是應該監控管理系統是否有不尋常的使用,並使其維持可供管理員使用的狀態。
您必須擔任 root 角色。如需更多資訊,請參閱Securing Users and Processes in Oracle Solaris 11.2 中的Using Your Assigned Administrative Rights。
選擇屬性值的範圍。
此類保護適用於嘗試使用系統的所有使用者。
# pfedit /etc/security/policy.conf ... #LOCK_AFTER_RETRIES=NO LOCK_AFTER_RETRIES=YES ...
此類保護只適用於您對其執行此指令的使用者。如果有許多使用者,這並非具備可擴充性的解決方案。
# usermod -K lock_after_retries=yes username
此類保護適用於您指派此權限設定檔的所有使用者或系統。
# profiles -p shared-profile -S ldap shared-profile: set lock_after_retries=yes ...
如需更多建立權限設定檔的資訊,請參閱Securing Users and Processes in Oracle Solaris 11.2 中的Creating Rights Profiles and Authorizations。
若是多位使用者共用一個權限設定檔的情況,可在權限設定檔中設定這個值,作為具備可擴充性的解決方案。
# usermod -P shared-profile username
您也可以在 policy.conf 檔案中個別指派每個系統的設定檔。
# pfedit /etc/security/policy.conf ... #PROFS_GRANTED=Basic Solaris User PROFS_GRANTED=shared-profile,Basic Solaris User
選擇屬性值的範圍。
# pfedit /etc/default/login ... #RETRIES=5 RETRIES=3 ...
# usermod -K lock_after_retries=3 username
請依照Step 4中的步驟,建立一個包含 lock_after_retries=3 的權限設定檔。
另請參閱
如需使用者和角色安全性屬性的討論內容,請參閱Securing Users and Processes in Oracle Solaris 11.2 中的第 8 章Reference for Oracle Solaris Rights。
相關線上手冊:包括 policy.conf(4)、profiles(1)、user_attr(4) 以及 usermod(1M)。