title: Send email when user changes password
body: <p>I have a remote server to which I login using ssh. Is there a way to be notified through email (using a bash script) when someone changes the user password using passwd including the new password?</p>
  
  <p>I am guessing it has to do with /etc/pam/passwd, but not entirely sure what the trigger and flags should be.</p>
  
  <p>This would be useful if for example I give my access to a "friend" and they decide to lock me out of my account. Of course I could create a new account for them etc, but this is more of a "it should be possible" task rather than a practical one.</p>