Bug 1696 - output an error message when an account is locked
Summary: output an error message when an account is locked
Status: CLOSED INVALID
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 5.2p1
Hardware: All All
: P2 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-11 06:34 AEDT by Vincent Lefevre
Modified: 2016-08-02 10:41 AEST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Lefevre 2010-01-11 06:34:14 AEDT
On an account with no password ("user" on a Nokia N900), I set up RSA authentication, but ssh still asked me a password. After looking at sshd debug messages on the N900 (server from OpenSSH 5.1p1), I saw that this was because the account was locked. This surprised me because there is no such behavior with OpenSSH 4.7p1 on the N810. In fact I wasn't aware of the notion of locked accounts for ssh until now.

So, I think it would be better for the end user if ssh output an error message saying that the account is locked instead of asking a password. Or would that be a security problem? If yes, even if the server checks that the public key is authorized and outputs the error message only in this case?

Also, though the sshd(8) man page has a paragraph about locked accounts, there's nothing in the ssh(1) man page.
Comment 1 Darren Tucker 2015-04-28 13:33:11 AEST
(In reply to Vincent Lefevre from comment #0)
> So, I think it would be better for the end user if ssh output an
> error message saying that the account is locked instead of asking a
> password. Or would that be a security problem? If yes, even if the
> server checks that the public key is authorized and outputs the
> error message only in this case?

Sorry for the inconvenience but I don't think we're going to change the behaviour.  It's poor form to leak information to unauthorized users (and in the case where the account is locked, the user is not authorized).

> Also, though the sshd(8) man page has a paragraph about locked
> accounts, there's nothing in the ssh(1) man page.

This is behaviour is entirely within sshd, so attempting to document it in ssh would be incorrect.
Comment 2 Vincent Lefevre 2015-04-28 18:06:19 AEST
(In reply to Darren Tucker from comment #1)
> This is behaviour is entirely within sshd, so attempting to document
> it in ssh would be incorrect.

I disagree. The ssh(1) man page has sshd information that can be useful to the ssh user, e.g. it mentions ~/.ssh/authorized_keys, ~/.ssh/known_hosts and ~/.ssh/rc files, which are only used by sshd. Note that the first one is also about authorization.
Comment 3 Damien Miller 2016-08-02 10:41:08 AEST
Close all resolved bugs after 7.3p1 release