Bug 1647237 - Remote Execution with Sudo password is not working as expected in Satellite 6.4
Summary: Remote Execution with Sudo password is not working as expected in Satellite 6.4
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-06 22:58 UTC by Satyajit Das
Modified: 2021-12-10 18:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-28 14:13:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Global Setting for RemoteExecution (130.45 KB, image/png)
2018-11-07 13:16 UTC, Satyajit Das
no flags Details

Description Satyajit Das 2018-11-06 22:58:22 UTC
Description of problem:

Remote Execution with Sudo password in not working expected in Satellite 6.4

For reference, please refer the below documentation link:-
https://access.redhat.com/documentation/en-us/red_hat_satellite/6.4/html/managing_hosts/chap-managing_hosts-running_remote_jobs_on_hosts#sect-Managing_Hosts-Configuring_Global_Settings


Version-Release number of selected component (if applicable):

satellite-common-6.4.0-15.el7sat.noarch
tfm-rubygem-foreman_theme_satellite-2.0.1.11-1.el7sat.noarch
satellite-6.4.0-15.el7sat.noarch
satellite-installer-6.4.0.7-2.el7sat.noarch
satellite-cli-6.4.0-15.el7sat.noarch
rubygem-smart_proxy_remote_execution_ssh-0.2.0-3.el7sat.noarch
tfm-rubygem-foreman_remote_execution-1.5.6-4.el7sat.noarch
tfm-rubygem-foreman_remote_execution_core-1.1.3-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_remote_execution-0.1.0-1.el7sat.noarch



How reproducible:

It is reproducible.


Steps to Reproduce:

1. On the client machine created a user and added it to the sudoers.
2. Added the below entry in the 

echo "testuser   ALL=ALL   ALL" > /etc/sudoers.d/testuser

3. Added the value to the  below parameter in the  “Global Settings for Remote Execution”. 

SSH User  <>
Default SSH password <>

Effective User Method <>

Effective User <>


Actual results:

Got the below exception:-

1:[sudo] password for testuser:
2:Exit status: 1


Expected results:

The command should have executed, without prompting for password


Additional info:

I tried with root user and it worked as expected, the reason I am mentioning this  as I did not exchange the ssh keys.

Comment 3 Satyajit Das 2018-11-07 13:16:54 UTC
Created attachment 1502974 [details]
Global Setting for RemoteExecution

Comment 9 Adam Ruzicka 2018-11-28 14:12:09 UTC
I created another BZ[1] to handle the encrypted settings. Meanwhile, a potentional workaround would be to unset the setting and create a global parameter (Configure > Global parameters) called remote_execution_sudo_password and set it as hidden. This would configure a password to be used globally for all hosts, but it wouldn't be shown in plaintext.

Because all of the concerns in this BZ were addressed or covered by another BZ, I'll go ahead and close this one. If you feel there is anything that remains unsolved, please feel free to reopen it.

[1] - https://bugzilla.redhat.com/show_bug.cgi?id=1654318


Note You need to log in before you can comment on or make changes to this bug.