Bug 1660552 - cannot use dnf as a regular user with the spacewalk plugin
Summary: cannot use dnf as a regular user with the spacewalk plugin
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf-plugin-spacewalk
Version: 8.0
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: 8.0
Assignee: Michael Mráka
QA Contact: Jan Hutař
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-18 15:36 UTC by Karel Srot
Modified: 2019-05-30 14:37 UTC (History)
3 users (show)

Fixed In Version: dnf-plugin-spacewalk-2.8.5-9-el8 satellite-5-client-1.0-820181219103855.9edba152
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-21 11:41:26 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description Karel Srot 2018-12-18 15:36:31 UTC
Description of problem:

Once the system is registered to Satellite 5 I am not able to use dnf as a regular user due to a following error.

Not root, Subscription Management repositories not updated
This system is not registered with Spacewalk server.
Spacewalk based repositories will be disabled.
[Errno 13] Permission denied: '/var/lib/dnf/_spacewalk.json'

It is reasonable that Spacewalk based repos are disabled but dnf should not fail.

Please forward it to dnf if it is a dnf issue.

Version-Release number of selected component (if applicable):
dnf-4.0.9-1.el8.noarch
libdnf-0.22.3-1.el8.x86_64
rhn-setup-2.8.16-11.module+el8+2180+4b61dcd8.x86_64
dnf-plugin-spacewalk-2.8.5-7.module+el8+2180+4b61dcd8.noarch

How reproducible:
always

Steps to Reproduce:
1. # rhnreg_ks ...
2. # useradd -m karel
3. # su - karel -c 'dnf repolist'

Comment 3 Michael Mráka 2018-12-19 09:53:12 UTC
Fixed in spacewalk git by
commit fb4b3a462f2a5ec8d9de5cc3b23ab8c173cab986
    1660552 - report and fail gracefully if not root
commit 15ac8acbd117db2cd479ab9292ea61e003a4a445
    logger.warn() has been obsoleted

Comment 7 Michael Mráka 2019-05-21 11:41:26 UTC
The bug has been addresses and released as a part of Red Hat Enterprise Linux 8 GA.


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