#!/bin/bash
#
username="$1"
pass="$2"
shift 2
fname="$*"
useradd -m -s /bin/bash -c "$fname" "$username"
echo "$username:$pass" | chpasswd
#!/bin/bash
#
username="$1"
pass="$2"
shift 2
fname="$*"
useradd -m -s /bin/bash -c "$fname" "$username"
echo "$username:$pass" | chpasswd