Linux如何通过PAM限制用户登录失败次数

,如果想限制远程登录,需要改SSHD文件

    # vim /etc/pam.d/sshd

  #%PAM-1.0

  auth required pam_tally2.so deny=3 unlock_time=300 even_deny_root root_unlock_time=10

  auth include system-auth

  account required pam_nologin.so

  account include system-auth

  password include system-auth

  session optional pam_keyinit.so force revoke

  session include system-auth

  session required pam_loginuid.so

  同样是增加在第2行!


你可能感兴趣的:(include,password,required,account,用户登录)