Bug #32744
closedenabled repositories upload fails with not subscribed error, when run as non-root user.
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1766653
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.