[fix] The install script should use the right db to check if a user exists
This commit is contained in:
parent
506616cb1b
commit
88998abde7
@ -4,10 +4,10 @@
|
|||||||
[[ 0 -ne $UID ]] && { echo "Must run as root. Exiting."; exit; }
|
[[ 0 -ne $UID ]] && { echo "Must run as root. Exiting."; exit; }
|
||||||
|
|
||||||
# Require a user for exploitation
|
# 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
|
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
|
# Propose some packages
|
||||||
echo -e "\nThe following packages are not mandatory, add them as needed.\n"
|
echo -e "\nThe following packages are not mandatory, add them as needed.\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user