VMware Aria Automation Orchestrator

 View Only

 Is it possible to use an account with sudo privileges to run a command in a target VM through the workflows “Run program in guest” (Guest operations) or “Run SSH command” (SSH Plugin)?

antonioaraujo's profile image
antonioaraujo posted Jan 14, 2026 12:31 AM

Dear Community,

I hope you are doing well.

I have a specific question regarding executing commands in VMs deployed in Aria Automation.

The context:

Let’s suppose we have a set of VMs deployed in Aria Automation through Service Broker.

An Orchestrator workflow attempts to install an agent on an existing VM using a script located in the VM.

There is an user account with sudo privileges in the VM (not root).

NOPASSWD sudo is forbidden for the user account.

The question:

Is it possible to use an user account with sudo privileges to run a command in a target VM through the workflows “Run program in guest” (Guest operations) or “Run SSH command” (SSH Plugin)?

Best regards

Antonio

ANANT KUMAR's profile image
ANANT KUMAR

I don't think directly that is possible, i can think another way to configure sudo to allow only the specific commands your workflow needs without a password. For example, add a rule like automation ALL=(ALL) NOPASSWD: /path/to/install-agent.sh in /etc/sudoers.d/automation-user. This lets the workflow run those commands as root without a password prompt, while other sudo commands still require a password. This is more secure than full NOPASSWD because it limits which commands can run without authentication.

eoinbyrne's profile image
eoinbyrne

This is possible but will depend on the version of 'sudo' the target OS has onboard.

If the "-S" option is supported then you can do

echo <the_user_passwd> | sudo -S <the protected command line>

The -S option instructs sudo to suppress password prompt and read the required password from stdin

see - https://www.man7.org/linux/man-pages/man8/sudo.8.html

Obviously your workflow would need to have the right password available and using echo like this might mean the raw password is retrievable from the process data for your invocation.

It definitely works but may have some caveats to consider

-HTH