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 1304385 - [RFE] sosreport should provide a sudoers.d file example for user that do not what to use root.
Summary: [RFE] sosreport should provide a sudoers.d file example for user that do not ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sos
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Pavel Moravec
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks: 995735
TreeView+ depends on / blocked
 
Reported: 2016-02-03 13:11 UTC by Yaniv Lavi
Modified: 2016-02-22 09:37 UTC (History)
18 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-03 15:15:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Yaniv Lavi 2016-02-03 13:11:44 UTC
Sosreport currently requires root user to run. Privilege escalation to root should only absolutely required. Please add support for sudo (probably via sudoers.d.

Comment 2 Bryn M. Reeves 2016-02-03 13:42:20 UTC
If this is for RHEV's use it would need to be dropped in by one of the RHEV-specific configuration packages - sudoers.d is for the site administrator's use: we cannot make this sort of change in RHEL packages as we cannot force this kind of policy decision onto end users.

Comment 3 Yaniv Lavi 2016-02-03 14:12:33 UTC
(In reply to Bryn M. Reeves from comment #2)
> If this is for RHEV's use it would need to be dropped in by one of the
> RHEV-specific configuration packages - sudoers.d is for the site
> administrator's use: we cannot make this sort of change in RHEL packages as
> we cannot force this kind of policy decision onto end users.

Can you provide a example of what is needed in the sudoers file to not fail without needing to reverse engineer this?
It's not a RHEV requirement to not use root for sosreport, this is coming from many customers.

Comment 4 Yaniv Lavi 2016-02-03 14:22:31 UTC
I'll rephrase the RFE.

Comment 5 Bryn M. Reeves 2016-02-03 14:27:45 UTC
> Can you provide a example of what is needed in the sudoers file to not fail 
> without needing to reverse engineer this?

Not really: you nuked the entire bug template so I don't actually know what problem you are having. If you can explain what is failing for you and what changes you have made we might be able to help - as far as I know sudoers.d uses the syntax described in sudoers(5).

The sosreport command "supports" sudo in the same way as any other program requiring root privileges - you just prefix it with 'sudo' - I am not aware of any need or requirement for applications to configure themselves for sudo use via sudoers.d. I use sos via sudo all the time without modifying this directory.

Comment 6 Yaniv Lavi 2016-02-03 14:35:24 UTC
(In reply to Bryn M. Reeves from comment #5)
> > Can you provide a example of what is needed in the sudoers file to not fail 
> > without needing to reverse engineer this?
> 
> Not really: you nuked the entire bug template so I don't actually know what
> problem you are having. If you can explain what is failing for you and what
> changes you have made we might be able to help - as far as I know sudoers.d
> uses the syntax described in sudoers(5).
> 
> The sosreport command "supports" sudo in the same way as any other program
> requiring root privileges - you just prefix it with 'sudo' - I am not aware
> of any need or requirement for applications to configure themselves for sudo
> use via sudoers.d. I use sos via sudo all the time without modifying this
> directory.

The goal is to allow using the tool without root and only specifying some commands  in root context. See bug #995735 and #1085907.

Comment 7 Bryn M. Reeves 2016-02-03 15:15:52 UTC
Just configure and use sudo as required for RHEV's needs. This is a confiuration problem - it does not need any changes in sos.

Comment 8 Yaniv Lavi 2016-02-21 11:58:58 UTC
(In reply to Bryn M. Reeves from comment #7)
> Just configure and use sudo as required for RHEV's needs. This is a
> confiuration problem - it does not need any changes in sos.

It does need changes if you don't want to give unlimited root access to the user.
Can you provide this for the default plugins based on tools those plugin require?

Comment 9 Bryn M. Reeves 2016-02-22 09:37:12 UTC
Please provide some actual examples of what you are requesting, or the missing template sections.

Configuring sudo is the responsibility of the system administrator. If you want to provide a pre-configured set up in certain products that is fine but sos will not be including this.

We have a long term plan to add authenticated access via Dbus and polkit - if you want to help you are more than welcome to contribute to that upstream so that we can see the results sooner in Red Hat products.

Otherwise I am going to close this bug again as it seems it's just a request to move your team's problem to another group.


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