Bug 1677180

Summary: [RFE] Provide the ability to use su as the effective method with password
Product: Red Hat Satellite Reporter: Barbora Vassova <bvassova>
Component: Remote ExecutionAssignee: Suraj Patil <supatil>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: aruzicka, bkearney, inecas, kagarwal, ktordeur, supatil
Target Milestone: 6.9.0Keywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman_remote_execution-4.0.0, tfm-rubygem-foreman_remote_execution_core-1.4.0, Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-21 13:11:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Barbora Vassova 2019-02-14 08:37:25 UTC
Business Case
Due to an unspecified security compliance being in use, it is required to have disabled sudo for all accounts, to not allow the root account to SSH into the remote machine and switching to root account must require the user to supply the root password. Usage of dzdo is not suitable either. Therefore, in this case it is necessary to use su as the effective user method, but with password. This is currently not possible due to su being available only as passwordless option. 

Technical Requirements:
Providing a new parameter to specify su password, similar to the already present "Sudo password" in settings (or "ansible_sudo_pass" in case of Ansible jobs)

Additional information: 
This concerns primarily "Run Commands - SSH Default" and "Run Commands - Ansible Default" templates.

Comment 2 Suraj Patil 2020-06-22 15:46:55 UTC
Created redmine issue https://projects.theforeman.org/issues/30188 from this bug

Comment 3 Bryan Kearney 2020-07-23 12:03:19 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30188 has been resolved.

Comment 4 Peter Ondrejka 2020-12-09 13:54:43 UTC
Verified on Satellite 6.9 snap 4, su effective user with password enabled through global setting executes rex job as expected

Comment 5 Adam Ruzicka 2021-02-02 10:27:36 UTC
*** Bug 1923771 has been marked as a duplicate of this bug. ***

Comment 8 errata-xmlrpc 2021-04-21 13:11:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.9 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:1313