Tuesday, February 21, 2012

Executing a command using another user on linux

If the user has no shell associated with it (ie. passwd indicates a nologin at the end of

su -s /bin/bash -c "command to run" apache

If user has a login shell then there is no need for -s /bin/bash



No comments: