Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-20578

remote_execution_ssh_keys doesnt set the sudoers file created with the appropriate file perms.

XMLWordPrintable

    • None
    • None
    • None
    • None

      Description of problem: The create sudoers file portion of the snippet doesnt set the file to the correct permissions causing the user to be unable to sudo to root.

      Version-Release number of selected component (if applicable): All Satellite 6.X

      How reproducible:

      Steps to Reproduce:
      1. deploy new rhel instance with remote_execution_effective_user_method set to sudo and remote_execution_create_user is set.
      2. attempt to run remote execution against the host

      Actual results:

      user is unable to sudo to root due to incorrect permissions on /etc/sudoers.d/<username>

      Expected results:

      User should be able to sudo to root

      Additional info:

      Fix is to add

      chmod 0440 /etc/suders.d/<%= ssh_user %>

      after line 66: Defaults:<%= ssh_user %> !requiretty" > /etc/sudoers.d/<%= ssh_user %>

              jira-bugzilla-migration RH Bugzilla Integration
              jira-bugzilla-migration RH Bugzilla Integration
              RH Bugzilla Integration RH Bugzilla Integration
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: