Hide Forgot
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 ~]$
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.
Ok in this case I am reopening this bug. Feel free to defer it for the pam stack portion, but I think we should get at least the warning part.
Changing the summary accordingly.
Setting qe_test_coverage‑. There is nothing to test.