2024-06-27 05:08:47 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-06-27 07:24:32 +00:00
|
|
|
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-27 07:24:32 +00:00
|
|
|
|
2024-06-28 19:13:14 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ $1 == "Arch" ]]; then
|
2024-06-27 07:24:32 +00:00
|
|
|
|
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
|
2024-06-27 07:24:32 +00:00
|
|
|
|
|
|
|
fi
|