arch-automated-installer/scripts/system-setup/sudo-setup.sh

25 lines
393 B
Bash
Executable file

#!/bin/bash
if [[ $1 == "Debian" ]]; then
if [[ ! -z $(grep $2 /etc/passwd) ]]; then
echo "usermod -aG sudo $2"
else
echo "Username is Invalid"
exit 1
fi
fi
if [[ $1 == "Arch" ]]; then
if [[ ! -z $(grep $2 /etc/passwd) ]]; then
echo "usermod -aG wheel $2"
break
else
echo "Username is Invalid"
exit 1
fi
fi