Here’s an example to create a user account for Charles:

/usr/sbin/groupadd -K GID_MIN=500 -K GID_MAX=10000 ckim
/usr/sbin/useradd -g ckim -K UID_MIN=500 -K UID_MAX=10000 -c "Charles Kim" -d /home/ckim -m -s /bin/bash ckim

Then here is another example of creating a user for David:

# set -o vi
# for i in dknight; do groupadd -K GID_MIN=500 -K GID_MAX=10000 $i; /usr/sbin/useradd -g $i -K UID_MIN=500 -K UID_MAX=10000 -d /home/$i -m -s /bin/bash $i ; chage -d0 $i;echo "newpassword" | passwd --stdin $i;done
Changing password for user dknight