Problem Statement:

Your UAT Testing is going to start and you have 20 users list to setup so that they can start testing your functionality.

Recipe:

Salesforce provide Reset password option on user profile which send an email to user to set new password but we want to set user password using code without notifying user so we can run this using apex code from system console.

set setUsername = new set();
setUsername.add('a@test.com');
setUsername.add('b@test.com');
setUsername.add('c@test.com');
setUsername.add('d@test.com');
setUsername.add('e@test.com');
setUsername.add('f@test.com');
String userpassword = 'test@1234';
for(User u : [select id from user where username in : setUsername])
{
system.setPassword(u.id,userpassword); //set new password
}

As you can see with above code you can easily reset password for 5 users without notifying them. you can read more details here.