How do I run a script as a certain user when it is called by another user with sudo?
Updated -
If a script that has been written needs to be run as a particular user, the /etc/sudoers
file needs to be modified to include default user options.
Edit the /etc/sudoers
file by invoking:
#visudo
In this example, SCRIPT1
is the script that will be executed. TESTUSER
is the alias of users who have permissi...
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.