Bug #34368
closedREX doesn't honor effective_user when async_ssh is true
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2048560
Description of problem:
When option async_ssh is true and remote_execution_ssh_user is not root, the resulting job is not executed with the effective_user on the target server
Version-Release number of selected component (if applicable):
satellite 6.10.2
How reproducible:
always
Steps to Reproduce:
1. Configure async_ssh to true:
- grep async /etc/foreman-proxy/settings.d/remote_execution_ssh.yml
- Whether to run remote execution jobs asynchronously
:async_ssh: true
~~~
2. Configure remote_execution_ssh_user to a regular user and define remote_execution_effective_user_method to sudo
3. Initiate a job to run "whoami" on a target host. Check the output of the job and you'll see the regular user, instead of root.
4. Change the async_ssh back to false, and run the same job again. You'll see root on the output.
Actual results:
job is execute with the regular user.
Expected results:
job to be executed with root
Additional info:
Updated by The Foreman Bot almost 3 years ago
- Status changed from New to Ready For Testing
- Assignee set to Adam Ruzicka
- Pull request https://github.com/theforeman/smart_proxy_remote_execution_ssh/pull/70 added
Updated by Ondřej Ezr almost 3 years ago
- Target version changed from foreman_remote_execution-4.9.0 to smart_proxy_remote_execution_ssh-0.5.2
Updated by Ondřej Ezr almost 3 years ago
- Fixed in Releases smart_proxy_remote_execution_ssh-0.5.2 added
Updated by Anonymous almost 3 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman_proxy_plugin|cf599563dad123d1821870999bf191f09546ab08.