rch*_*hen 5 linux ssh capistrano
我正在遵循Capistrano的设置指南(http://capistranorb.com/documentation/getting-started/authentication-and-authorisation/)。但是我发现我无法用锁定的用户(“部署”)进入ssh。我检查了一下/var/log/auth.log,上面写着:
sshd[29163]: User deploy not allowed because account is locked
sshd[29163]: input_userauth_request: invalid user deploy [preauth]
Run Code Online (Sandbox Code Playgroud)
使用解锁用户后passwd -u deploy,就可以进入计算机了。
我检查了手册页中的passwd,它说:
-l, --lock
Lock the password of the named account. This option disables a password by changing it to a value which matches no possible encrypted value (it adds a ´!´ at the
beginning of the password).
Note that this does not disable the account. The user may still be able to login using another authentication token (e.g. an SSH key). To disable the account,
administrators should use usermod --expiredate 1 (this set the account's expire date to Jan 2, 1970).
Users with a locked password are not allowed to change their password.
Run Code Online (Sandbox Code Playgroud)
从“请注意,这不会禁用帐户。用户仍然可以使用其他身份验证令牌(例如SSH密钥)登录”。看来我应该能够在用户锁定的情况下进入计算机,但这不是我所看到的。有人知道为什么吗?我正在运行Ubuntu 12.04.4 LTS。
手册页所说的并不是您将能够使用SSH登录到锁定的帐户。手册页上的内容是,如果您为帐户的非密码登录设置了SSH密钥,那么在锁定密码时,这种登录仍然可以进行,因为SSH密钥登录使用SSH密钥而不是密码作为身份验证令牌,绕过可能失败的密码验证步骤。
但是,即使使用非密码登录也可以,但仅表示可以。身份验证过程由PAM部分控制/管理,因此,如果您设置了SSH密钥,并且只要具有有效密码,就可以不用密码登录到“部署”用户,并且无法要在密码锁定时登录到“部署”用户,请查看您的PAM配置。
| 归档时间: |
|
| 查看次数: |
7581 次 |
| 最近记录: |