I’m not C9 staff, just another user, and I don’t know an “official” answer to your query. I can offer you a good, simple workaround, though.
I don’t have a mongodb instance to do anything with, but I figure
mongodb --help would be just as good for a test.
My workaround is simply to prepend a second
sudo to your command:
sudo sudo -u mongodb mongod --help
This got me:
-h [ --help ] show this usage information
--version show version information
… and so on.
The trick here is:
- the first
sudo (with no other options) turns you into user
- because you’re (now) running it as
root, the second
sudo doesn’t need a password; as
root, you can become whoever you please.
Hope this helps!