On Thu, Jan 24, 2013 at 12:35 PM, Pierre Massat <pimassat@gmail.com> wrote:

It's a bit weird because the very same command works like a charm once i've logged in.

Any clue ?

How about using sudo?

sudo -u username -i "command"

"-i" runs the command provided in a login shell, so it runs any /etc/profile, ~/.bashrc, ~/.bash_profile scripts as well

Chuck