#!/bin/sh GROUP=doorparty GID=1000 USERS=${SBBSCTRL}/doorparty-connector.users if ! grep -qe ^${GROUP}: /etc/group; then groupadd -g ${GID} ${GROUP} fi if [ -r ${USERS} ]; then cat ${USERS} | while read line; do user=$(echo ${line}|awk -F: '{print $1}') if ! grep -qe ^${user}: /etc/passwd; then echo "+ Adding Door Party User: ${user}" useradd -c "Door Party User" -g ${GROUP} -MN -s /usr/sbin/nologin ${user} echo -n $line | chpasswd fi done fi