|
Switch to another user, get his env and run a command 'under his name'
I tried using:
su - user2 -c "echo $my_personal_variable"
where "my_personal_variable" is defined in user2's environment. However, to my dismay, this produced no output and i concluded that using su - * -c doesn't import the user's env variables. Are there any workarounds for this? Mind you - I'm using Solaris/Bash (but i think this still applies on Linux boxes)
ganninu.
|