#!/bin/bash for users in "$@"; do IFS=':' read -a data <<< "$users" user="${data[0]}" pass="${data[1]}" if [ "${data[2]}" == "e" ]; then chpasswdParams="-e" uid="${data[3]}" gid="${data[4]}" else uid="${data[2]}" gid="${data[3]}" fi useraddParams="--create-home --no-user-group" if [ -n "$uid" ]; then useraddParams="$useraddParams --non-unique --uid $uid" fi if [ -n "$gid" ]; then useraddParams="$useraddParams --gid $gid" groupadd --gid $gid $gid fi useradd $useraddParams "$user" chown root:root /home/$user chmod 755 /home/$user if [ -z "$pass" ]; then pass="$(echo `