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

25 lines
393 B
Bash
Raw Normal View History

2024-06-27 05:08:47 +00:00
#!/bin/bash
if [[ $1 == "Debian" ]]; then
2024-06-28 19:13:14 +00:00
if [[ ! -z $(grep $2 /etc/passwd) ]]; then
echo "usermod -aG sudo $2"
else
echo "Username is Invalid"
exit 1
fi
2024-06-28 19:13:14 +00:00
fi
if [[ $1 == "Arch" ]]; then
2024-06-28 19:13:14 +00:00
if [[ ! -z $(grep $2 /etc/passwd) ]]; then
echo "usermod -aG wheel $2"
break
else
echo "Username is Invalid"
exit 1
fi
fi