mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
Check if username tpot exists for post install
Abort installation in case the user exists
This commit is contained in:
@ -436,6 +436,16 @@ if [ -s "$myTPOT_CONF_FILE" ] && [ "$myTPOT_CONF_FILE" != "" ];
|
||||
fi
|
||||
|
||||
# Prepare running the installer
|
||||
myUSERCHECK=$(grep "tpot" /etc/passwd | wc -l)
|
||||
if [ "$myUSERCHECK" -gt "0" ];
|
||||
then
|
||||
echo "### The user name \"tpot\" already exists. The tpot username and group may not previously exist or T-Pot will not work."
|
||||
echo "### We recommend a fresh install according to the T-Pot Readme Post-Install method."
|
||||
echo
|
||||
echo "Aborting."
|
||||
echo
|
||||
exit 0
|
||||
fi
|
||||
echo "$myINFO" | head -n 3
|
||||
fuCHECK_PORTS
|
||||
|
||||
|
Reference in New Issue
Block a user