Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1766653 - enabled repositories upload fails with not subscribed error, when run as non-root user.
Summary: enabled repositories upload fails with not subscribed error, when run as non-...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: katello-agent
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.11.0
Assignee: Lucy Fu
QA Contact: sganar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-29 15:20 UTC by Jason Dickerson
Modified: 2023-10-06 18:43 UTC (History)
5 users (show)

Fixed In Version: katello-host-tools-3.5.6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-05 13:27:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 32744 0 Normal New enabled repositories upload fails with not subscribed error, when run as non-root user. 2021-06-07 17:58:12 UTC
Red Hat Product Errata RHBA-2022:5497 0 None None None 2022-07-05 13:27:17 UTC

Description Jason Dickerson 2019-10-29 15:20:32 UTC
Description of problem:
The enabled repositories plugin cannot run as a non-root user.  however, it displays the following error, indicating the server is no longer subscribed to Satellite:

[provisioner@sirtgpu01 ~]$ yum search htop
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, subscription-manager
============================================================================================= N/S matched: htop ==============================================================================================
htop.x86_64 : Interactive process viewer

  Name and summary matches only, use "search all" for everything.
Uploading Enabled Repositories Report
2019-10-29 09:21:44,038 [INFO] yum:240513:Dummy-1 @connection.py:905 - Connection built: host=sirt-satellite01.homeoffice.wal-mart.com port=443 handler=/rhsm auth=identity_cert ca_dir=/etc/rhsm/ca/ insecure=False
Loaded plugins: product-id, subscription-manager
2019-10-29 09:21:44,046 [WARNING] yum:240513:Dummy-1 @logutil.py:142 - logging already initialized
Cannot upload enabled repos report, is this client registered?
[provisioner@sirtgpu01 ~]$


Version-Release number of selected component (if applicable):
Latest Client tools provided with Sat 6.6


How reproducible:
completely


Steps to Reproduce:
1.Run a yum command as a non root user
2.
3.

Actual results:

You get the error


Expected results:
The plugin checks if it is running as root or not, and you either get a warning you are a non-root user, or it logs the warning silently.  


Additional info:
This creates confusion when non-root users run yum commands.  This could be avoided with better messaging or security context awareness.

Comment 3 Lucy Fu 2021-06-07 17:58:11 UTC
Created redmine issue https://projects.theforeman.org/issues/32744 from this bug

Comment 4 Maria 2021-08-26 10:01:38 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/32744 has been resolved.

Comment 7 sganar 2022-05-19 07:50:31 UTC
Verified.

Tested on Satellite 6.11.0 Snap 20.0

Steps followed: 
1. Run a yum command as a non root user

Observation: 
A proper message is displayed saying "you are not logged in as root"

```$ yum search curl
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, subscription-manager
=================================================================================================================================== N/S matched: curl ====================================================================================================================================
python-pycurl.x86_64 : A Python interface to libcurl
curl.x86_64 : A utility for getting files from remote servers (FTP, HTTP, and others)
libcurl.x86_64 : A library for getting files from web servers

  Name and summary matches only, use "search all" for everything.
Skipping Enabled Repositories Upload because you are not logged in as root```

Comment 10 errata-xmlrpc 2022-07-05 13:27:14 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 (Satellite 6 Satellite Client 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/RHBA-2022:5497


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