I have an environment variable setup in user user_a's .profile:
export NODE_ENV=dev
When I log in as the user and launch a bash shell, if the environment variable is correctly set. If I do echo $NODE_ENV I get dev printed out as expected.
If I log in as a different user user_b and then become user_a via the command sudo su user_a, the environment variable is not set.
How do I ensure that the environment variable NODE_ENV is set?