[fix] The install script should use the right db to check if a user exists

This commit is contained in:
alban 2020-10-16 08:47:37 +02:00
parent 506616cb1b
commit 88998abde7
1 changed files with 2 additions and 2 deletions

View File

@ -4,10 +4,10 @@
[[ 0 -ne $UID ]] && { echo "Must run as root. Exiting."; exit; }
# Require a user for exploitation
DEFAULT=$(getent group 1000|cut -d: -f1)
DEFAULT=$(getent passwd 1000|cut -d: -f1)
read -e -i "$DEFAULT" -p "Please provide the system user who will own the project: " USER
getent group "$USER" &>/dev/null || { echo "Sorry, but '$USER' does not exist on this system. Exiting."; exit 2; }
getent passwd "$USER" &>/dev/null || { echo "Sorry, but '$USER' does not exist on this system. Exiting."; exit 2; }
# Propose some packages
echo -e "\nThe following packages are not mandatory, add them as needed.\n"