PortValhalla/scripts/Arch/OS/user.sh

14 lines
386 B
Bash
Executable file

#!/bin/bash
USER_NAME="${USER_NAME}";
USER_DISPLAYNAME="${USER_DISPLAYNAME}";
USER_GROUPS="${USER_GROUPS}";
useradd --create-home --comment "$USER_DISPLAYNAME" --groups wheel "$USER_NAME";
usermod -aG wheel "$USER_NAME";
if [ ! -z "$USER_GROUPS" ]
then
usermod -aG "$USER_GROUPS" "$USER_NAME";
fi;
echo "Please Choose a New Password for User \`$USER_NAME\`";
passwd "$USER_NAME";