PortValhalla/scripts/Arch/OS/user.sh

15 lines
386 B
Bash
Raw Normal View History

2023-04-03 08:35:01 +00:00
#!/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";