How to run script with another user privileges

Here’s how to run a script with another user privilege. You can run this user with root.

su -c "/usr/bin/executable" -s /bin/sh username

Where the “username” is the username whom privilege you want to execute

Scroll to Top