From 88998abde7094e57be589290ca3296509e95aad2 Mon Sep 17 00:00:00 2001 From: alban Date: Fri, 16 Oct 2020 08:47:37 +0200 Subject: [PATCH] [fix] The install script should use the right db to check if a user exists --- server/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/install.sh b/server/install.sh index 2b3f3f9..45ed53e 100755 --- a/server/install.sh +++ b/server/install.sh @@ -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"