Another issue. When I do a
chage -d 0 -M 999 <username>
we are assuming that the user is going to have a direct access to the machine's console so will be prompted for a change password stuff by the system. But when the user tries this with "ssh" session, he gets bombed out when first time logging in. It asks for password first time and when he enters the right password, it says that
Server responded "Connection closed".
Connection to the remote host was lost.
and nothing more. This is because SSH does not know how to handle the change password.