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.
Description of problem:
When trying to log in to an account where the password has expired, the user is prompted to change the password. So far so good, but right after the password is changed, the connection is dropped leaving the user with an impression that something went wrong. It would be better if ssh could just permit the user in after the password was changed rather then forcing him to log in again.
Version-Release number of selected component (if applicable):
openssh-5.3p1-52.el6_1.2
How reproducible:
Every time
Steps to Reproduce:
1. expire the password of an account
chage -d 0 -M 0 local
2. try to log in:
[djuran@localhost Desktop]$ ssh local.redhat.com
local.redhat.com's password:
You are required to change your password immediately (root enforced)
Last login: Fri Sep 23 15:01:15 2011 from localhost
WARNING: Your password has expired.
You must change your password now and login again!
Changing password for user local.
Changing password for local.
(current) UNIX password:
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
Connection to rhel6.djuran.redhat.com closed.
3. Do note how the connection was dropped
Additional info:
For instance su let's the user in right away without having to re-authenticate:
[djuran@rhel6 ~]$ su - local
Password:
You are required to change your password immediately (root enforced)
Changing password for local.
(current) UNIX password:
New password:
Retype new password:
[local@rhel6 ~]$
Comment 2RHEL Program Management
2011-10-07 16:02:44 UTC
Since RHEL 6.2 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.
Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.
This is impossible. The ssh in the password-authentication method has to use passwd which is explicitly executed after the session is started. Unfortunately there is no exact way to be sure that the user really changed the password in the passwd command so the openssh must force the user to reconnect.
I suggest the customer to use keyboard-interactive authentication as a workaround.
Sorry Tomas,
but I don't get it, why is it that ssh can't use the pam stack (which I believe will give you a better error reporting) and has to run passwd instead ?
If it *has* to drop the connection can you make ssh at least warn the user it will be disconnected after the password change ?
Yeah the warning could be added before the passwd is executed.
It could probably use the pam stack however it would require substantial changes to how the pam stack is called in sshd. Basically it could probably call the PAM calls that are called by passwd directly instead of passwd but I am not sure whether it would not interfere with other things in the SSH protocol anyway so it would have to drop the connection regardless of that.
But the warning seems like something that could be easily done.