Sil*_*ker 3 security login tty timeout
可能的重复:
为什么错误的密码会造成很大的延迟
每当我在登录 tty 时输入错误密码时,我注意到我必须等待一秒钟才能再次登录。我似乎无法找到造成这种情况的原因或导致它的原因。我只能认为这是一些安全层,可防止从连接到机器的脚本化 HID 进行暴力破解登录。有没有办法缩短延迟?如果我是对的,我会在 kdm 和其他屏幕锁定中看到相同的行为。
您关于它被用于减轻蛮力攻击的假设是正确的。在 Linux 中,这由 pam_faildelay 模块处理。有一种方法可以缩短延迟,但它可能是特定于操作系统的。在 Linux 中,该/etc/pam.d/login文件包含用于 login(1) 的策略。
这是默认 debian 安装的示例行:
# Enforce a minimal delay in case of failure (in microseconds).
# (Replaces the `FAIL_DELAY' setting from login.defs)
# Note that other modules may require another minimal delay. (for example,
# to disable any delay, you should add the nodelay option to pam_unix)
auth optional pam_faildelay.so delay=3000000
Run Code Online (Sandbox Code Playgroud)
您可以调整这条线路的延迟。