I'm using drupal and Aegir. Aegir automates many tasks of site creation. Aegir has control of Apache, I'm logen in as root, and I want to restart the Apache server, but I want to do it on Aegirs behalf. Unfortunately I do not know the Aegir password, so basically I'm wondering how to sudo something as another user.
Sudo a command on behalf of another user
passwordsusudousers
Best Answer
sudo accepts a user parameter, which will run it as that user.
Alternatively, since you are root: