/ bash

bulk create users

This script is very basic and only creates a new user setting a password and expires this password so the user needs to change it on first logon.

#!/bin/bash
array=( user1 user2 user3 userN )
for user in "${array[@]}"
do
        useradd -N $user
        echo "defaultpass" | passwd $user --stdin
        chage -d 0 $user
done