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 2064696 - The /etc/tmux.conf file created has root 600 permissions, which delays the user login
Summary: The /etc/tmux.conf file created has root 600 permissions, which delays the us...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: scap-security-guide
Version: 8.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Vojtech Polasek
QA Contact: Milan Lysonek
Jan Fiala
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-16 11:15 UTC by Welterlen Benoit
Modified: 2022-11-08 10:33 UTC (History)
9 users (show)

Fixed In Version: scap-security-guide-0.1.63-1.el8
Doc Type: Bug Fix
Doc Text:
.OpenSCAP remediation sets correct permissions for `/etc/tmux.conf` Previously, when remediating the SCAP rule `configure_tmux_lock_after_time`, the `/etc/tmux.conf` file was created with permissions respecting umask (600). This caused `/etc/tmux.conf` to be unreadable by regular users. If a regular user logged in, they received an error message and had to wait for several minutes before a timeout ran out and they were logged in. With this update, the remediation of rule `configure_tmux_lock_after_time` sets specific permissions of `/etc/tmux.conf` to 644. As a result, regular users no longer encounter the error message or login delay.
Clone Of:
Environment:
Last Closed: 2022-11-08 09:39:56 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-115729 0 None None None 2022-03-16 11:26:22 UTC
Red Hat Product Errata RHBA-2022:7563 0 None None None 2022-11-08 09:40:30 UTC

Description Welterlen Benoit 2022-03-16 11:15:08 UTC
Description of problem:
When applying the ansible or bash remediation for rule:

http://static.open-scap.org/ssg-guides/ssg-rhel8-guide-stig.html#xccdf_org.ssgproject.content_rule_configure_tmux_lock_after_time

The file /etc/tmux.conf has permissions 600 for root user because of a previous rule.


- From ansible doc:
---
If mode is not specified and the destination filesystem object does not exist, the default umask on the system will be used when setting the mode for the newly created filesystem object.
---

- And we can see in the same STIG guide (http://static.open-scap.org/ssg-guides/ssg-rhel8-guide-stig.html#!) that umask must be set to 077:
---
Ensure that Users Have Sensible Umask Values   Group contains 5 rules
Group   Ensure that Users Have Sensible Umask Values   Group contains 5 rules http://static.open-scap.org/ssg-guides/ssg-rhel8-guide-stig.html#xccdf_org.ssgproject.content_group_user_umask
---

Then all normal user will have a message "/etc/tmux.conf: Permission denied" and 'stuck' for 2.5 minutes when login.

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

How reproducible:
Always

Steps to Reproduce:
1. apply stig ansible role https://github.com/RedHatOfficial/ansible-role-rhel8-stig
2. login with non root user
3. 

Actual results:
- /etc/tmux.conf with wrong permissions
- Message "/etc/tmux.conf: Permission denied" with delay to have the prompt

Expected results:
- right permissions and no delay to login

Additional info:

Comment 7 Jan Černý 2022-07-01 10:45:34 UTC
PR has been opened in upstream https://github.com/ComplianceAsCode/content/pull/9080

Comment 8 Jan Černý 2022-07-18 14:30:16 UTC
The PR https://github.com/ComplianceAsCode/content/pull/9080 has been merged upstream.

Comment 18 errata-xmlrpc 2022-11-08 09:39:56 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 (scap-security-guide 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-2022:7563


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