How to add auto generate password link for admin? I am using Drupal 7 for my website.
I have two roles administrator and IT.
I want to add auto generate password link at the time change the password by superadmin or IT role and also send the mail to respective user.

Please help how to add this functionality in my site.
You can used hook_user_presave() to get the changed password in your module:

function mymodule_user_presave(&amp;$edit, $account, $category){
 echo $_REQUEST['pass']['pass1'];
}


and use the functions hook_mail() &amp; drupal_mail() to send the email in hook_user_presave() with the changed password in $_REQUEST['pass']['pass1'].