Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionDalibor Pospíšil
2016-10-31 15:17:04 UTC
Description of problem:
If user's shell does not exist, sshd makes a not of that in log but still lets client to attempt login with another password. Sshd could act similarly as when /bin/false or /sbin/nologin is used as a shell.
There's no point of letting client to try another password if it is obvious that the login will fail again.
Version-Release number of selected component (if applicable):
openssh-6.6.1p1-31.el7
How reproducible:
100%
Steps to Reproduce:
1. useradd test -s /xyz
2. echo test | passwd --stdin test
3. ssh test.0.1
Actual results:
# ssh test.0.1
test.0.1's password:
Permission denied, please try again.
test.0.1's password:
Permission denied, please try again.
test.0.1's password:
# cat /var/log/secure
Oct 31 16:11:58 sopos-rhel7-brq sshd[19365]: User test not allowed because shell /xyz does not exist
Oct 31 16:11:58 sopos-rhel7-brq sshd[19365]: input_userauth_request: invalid user test [preauth]
Oct 31 16:11:59 sopos-rhel7-brq unix_chkpwd[19367]: password check failed for user (test)
Expected results:
# ssh test.0.1
test.0.1's password:
Permission denied, permanent error, giving up.
Hello Dalibor. It is not a bug. It is a (security) feature.
You don't want to tell all the people on the internet that this account does not exists, does not have shell or does not have password. You want to behave the same way for all the accounts and not give any side channel information, which could be used against you.
I don't want to close the bug with the first comment so I will give you some time to think about it, if it is clear from my explanation (if not, feel free to ask). But certainly, we are not going to change this behavior.