when I create a user in the system with Chef, I always upload its public key to .ssh/authorized_keys
. When user logs in for the first time, he is required to "change" his password. For that a stub password is used, so he can enter the "current" password. This is how it looks like now:
ssh user@host
WARNING: Your password has expired.
You must change your password now and login again!
Changing password for user.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Connection to host closed.
Current password is well-known (I'll tell you a secret: initial
), which is useless anyway. How can I avoid asking for the current
password for the first time? (To stress it more, it is safe, because user already authenticated with his public key).