I really like the sshpass idea. What we want to use it for is changing passwords on windows remote desktop. Here is the problem. Mac users have a remote desktop tool that talks to our server (Windows 2008). the problem they have is if they let their password expire (every 42 days), then they can't log in. For some strange reason the Mac won't acknowlege the password change dialog, so the only way for them to get in, is for us to turn off the "Must change password at next login" flag, have them log in and change their password while they are connected. The problem of curse is that doesn't work for evenings and after hours.
What I'd like to do is have a web page (we run apache under Linux), that would allow them to try and connect under ssh go through the password login and reset their password. We have a commercial version of sshd on the server, and although we don't allow them to connect to a shell, the password change portion of the exchange works fine, when you do it manually.
Obviously with a web page we want the entire process to happen through a non-interactive session on behalf of the user. That's why I thought sshpass would be great for this. However it only appears to pass in the first password request, not the subsequent ones, where it asks for the old password again and two copies of the new password.
Is there a way to make this work?
Log in to post a comment.