some updates for buster

This commit is contained in:
2019-10-21 16:00:06 +02:00
parent 4ce386eeed
commit 67b84ed088
17 changed files with 117 additions and 110 deletions

View File

@@ -1,13 +1,13 @@
#!/bin/sh
echo -e '\033[35m
echo '\033[35m
__ _______ __________
/ / / / ___// ____/ __ \
/ / / /\__ \/ __/ / /_/ /
/ /_/ /___/ / /___/ _, _/
\____//____/_____/_/ |_|
\033[0m'
echo -e "\033[35;1mCreate new user (you will be asked a user name and a password) \033[0m"
echo "\033[35;1mCreate new user (you will be asked a user name and a password) \033[0m"
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
@@ -37,12 +37,17 @@ do
fi
done
# TODO
# ./install.sh: 42: bin/user.sh: adduser: not found
# adding dev to admin group and limiting su to the admin group
# ./install.sh: 44: bin/user.sh: groupadd: not found
# ./install.sh: 45: bin/user.sh: usermod: not found
# dpkg-statoverride: error: group 'admin' does not exist
# read -p "Continue? (Y/N): " confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1
adduser "$user"
echo "adding $user to admin group and limiting su to the admin group"
groupadd admin
usermod -a -G admin "$user"
# allow admin group to su
dpkg-statoverride --update --add root admin 4750 /bin/su
echo -e "\033[92;1muser $user configured\033[Om"
echo "\033[92;1muser $user configured\033[Om"