Configuring Firewalls
After an OS is installed, if a common user is configured, you can add ALWAYS_SET_PATH=yes to the /etc/login.defs file to prevent unauthorized operations. In addition, to prevent privilege escalation caused by bringing the environment variables of the current user into other environments during user switch using the su command, run the su - [user] command to switch the user and add ALWAYS_SET_PATH=yes to the server configuration file /etc/default/su.
Parent topic: OS Security Hardening