find all users of a certain role and return that list
The name of the role is in the role table so just join that in as well:

function mymodule_query_role_filter_alter(QueryAlterableInterface $query) {
  $query-&gt;innerJoin('users_roles', 'ur', 'users.uid = ur.uid');  
  $query-&gt;innerJoin('role', 'r', 'r.rid = ur.rid');
  $query-&gt;condition('r.name', 'administrator');
}


Note that you want inner joins here, not left, otherwise you'll just get whether they have the admin role or not. You don't need an and as you only have one condition.

The hashed password is added by user_load, not your query, so you'd have to address that separately. I'm not sure there's an easy way to exclude a property from an entity load, it would make for a good follow-up question.