Is there a way (without jumping through too many hoops) to run sudo -uuser command in such a way that user's environment is entirely preserved?Basically, what I need is to ensure that specific environment variables are set for all users allowed to run sudo to impersonate certain IDs - mostly things like PATH, JAVA_HOME, and database-related (Oracle and Postgres) variables.In other words - when I, as the user wobble, run sudo -u wibble echo $PATH I'd like to see wibble's path displayed instead of wobble's.
Sudo - target user environment
sudo;environment variables