RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 2125227 - [RFE] Guest user running yum command get system not registered message even when the system is actually registered.
Summary: [RFE] Guest user running yum command get system not registered message even ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: subscription-manager
Version: 9.0
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: 9.2
Assignee: Jason Jerome
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks: 2134165
TreeView+ depends on / blocked
 
Reported: 2022-09-08 11:42 UTC by Rupesh Patel
Modified: 2023-05-09 10:26 UTC (History)
4 users (show)

Fixed In Version: subscription-manager-1.29.31-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2134165 (view as bug list)
Environment:
Last Closed: 2023-05-09 08:18:42 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 3146 0 None Merged 2125227: Fixed incorrect registration warning with yum/dnf 2022-10-13 09:47:26 UTC
Red Hat Issue Tracker RHELPLAN-133525 0 None None None 2022-09-08 13:00:34 UTC
Red Hat Product Errata RHBA-2023:2493 0 None None None 2023-05-09 08:19:03 UTC

Description Rupesh Patel 2022-09-08 11:42:18 UTC
Description of problem:

For Systems that are already registered using subscription-manager, while running yum install as a non-root user print message that the system is not registered along with required yum to run as root. 

This message doesn't seem accurate or misleading the guest users (even though it is correct that guest user can not install packages and required root)

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

Red Hat Enterprise Linux 9.0 

How reproducible:

Steps to Reproduce:

1. Installed fresh system
2. Register it using subscription-manager
3. log in as guest user
4. It says root is required but it also says the system is not registered which is not true. 

Actual results:

[rupesh@rupeshlap-redhat-com ~]$ yum install haproxy
Not root, Subscription Management repositories not updated
 
This system is not registered with an entitlement server. You can use subscription-manager to register.
 
Error: This command has to be run with superuser privileges (under the root user on most systems).
[rupesh@rupeshlap-redhat-com ~]$

 
Expected results:


[rupesh@rupeshlap-redhat-com ~]$ yum install haproxy
Not root, Subscription Management repositories not updated
 
Error: This command has to be run with superuser privileges (under the root user on most systems).
[rupesh@rupeshlap-redhat-com ~]$

Comment 3 Craig Donnelly 2022-10-19 15:38:51 UTC
>> Pre-verification against RHEL-9.2.0-20221017.0:

[root@rhel92 ~]# rpm -q subscription-manager
subscription-manager-1.29.30-1.el9.x86_64

[root@rhel92 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Not Specified       

[root@rhel92 ~]# su - testuser
Last login: Wed Oct 19 11:28:49 EDT 2022 on pts/0

[testuser@rhel92 ~]$ yum install vim
Not root, Subscription Management repositories not updated
Error: This command has to be run with superuser privileges (under the root user on most systems).

>> LGTM, pre-verified.

Comment 4 Craig Donnelly 2022-10-19 15:43:42 UTC
>> For clarification, when unregistered the output is as such:

[root@rhel92 ~]# subscription-manager unregister
Unregistering from: subscription.rhsm.redhat.com:443/subscription
System has been unregistered.

[root@rhel92 ~]# su - testuser
Last login: Wed Oct 19 11:35:47 EDT 2022 on pts/0

[testuser@rhel92 ~]$ yum install vim
Not root, Subscription Management repositories not updated

This system is not registered with an entitlement server. You can use subscription-manager to register.

Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Comment 7 Zdenek Petracek 2022-11-04 14:20:00 UTC
Final verification on SM version:
[root@kvm-02-guest04 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 4.2.10-1
subscription management rules: 5.43
subscription-manager: 1.29.31-1.el9

Registering the system:
[root@kvm-02-guest04 ~]# subscription-manager register
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: zpetracePH03
Password: 
The system has been registered with ID: ef44444a-1662-45f6-9972-e5d0618cd0b1
The registered system name is: kvm-02-guest04.rhts.eng.brq.redhat.com

[root@kvm-02-guest04 ~]# subscription-manager attach --auto
Installed Product Current Status:    
Product Name: Red Hat Enterprise Linux for x86_64 Beta
Status:       Subscribed

[root@kvm-02-guest04 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Not Specified       

Switching to testuser and running yum command:
[root@kvm-02-guest04 ~]# su - testuser
Last login: Fri Nov  4 15:11:14 CET 2022 on pts/0

[testuser@kvm-02-guest04 ~]$ yum install zsh
Not root, Subscription Management repositories not updated
Error: This command has to be run with superuser privileges (under the root user on most systems).

^^ Final Verification PASSED - message "This system is not registered with an entitlement server. You can use subscription-manager to register." was not included

Comment 9 errata-xmlrpc 2023-05-09 08:18:42 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 (subscription-manager bug fix and enhancement update), 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-2023:2493


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