It is possible to keep some variable when users do "su - xxx" (i know that "-" will erase the environment variable, but i am asking if others solutions or possibilities exists) ?
Thanks !
It is possible to keep some variable when users do "su - xxx" (i know that "-" will erase the environment variable, but i am asking if others solutions or possibilities exists) ?
Thanks !
Use -m
eg
su -m xxxx
-m, --preserve-environment
do not reset environment variables
online manpage with additional information (PATH and IFS might be changed nevertheless)