how to make chef execute with a specific user and load its environment values
There is an environment
attribute in the bash
resource. Or you can source the .bash_profile in the script. That's one of the things you can do with bash (last example)