mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 04:52:11 +00:00
Check if username tpot exists for post install
Abort installation in case the user exists
This commit is contained in:
parent
6aa69e82aa
commit
58713e9b84
2 changed files with 12 additions and 0 deletions
|
@ -262,6 +262,8 @@ In some cases it is necessary to install Debian 10 (Buster) on your own:
|
||||||
|
|
||||||
The T-Pot Universal Installer will upgrade the system and install all required T-Pot dependencies.
|
The T-Pot Universal Installer will upgrade the system and install all required T-Pot dependencies.
|
||||||
|
|
||||||
|
Important notice: The user / group `tpot` are reserved for T-Pot. The installation will abort if the user `tpot` exists. Make sure to use a different user name when preparing the OS installation for T-Pot.
|
||||||
|
|
||||||
Just follow these steps:
|
Just follow these steps:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -436,6 +436,16 @@ if [ -s "$myTPOT_CONF_FILE" ] && [ "$myTPOT_CONF_FILE" != "" ];
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare running the installer
|
# 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
|
echo "$myINFO" | head -n 3
|
||||||
fuCHECK_PORTS
|
fuCHECK_PORTS
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue