Verify Group Who Owns lastlog Command
An XCCDF Rule
Description
To properly set the group owner of /var/log/lastlog
, run the command:
$ sudo chgrp root /var/log/lastlog
Rationale
Unauthorized disclosure of the contents of the /var/log/lastlog file can reveal system data to attackers, thus compromising its confidentiality.
- ID
- xccdf_org.ssgproject.content_rule_file_groupownership_lastlog
- Severity
- Medium
- References
- Updated
Remediation - Ansible
- name: Test for existence /usr/bin/lastlog
stat:
path: /usr/bin/lastlog
register: file_exists
tags:
- DISA-STIG-OL08-00-020264
Remediation - Shell Script
chgrp 0 /usr/bin/lastlog