Enable Process Accounting (psacct)
An XCCDF Rule
Description
The process accounting service, psacct
, works with programs
including acct
and ac
to allow system administrators to view
user activity, such as commands issued by users of the system.
The psacct
service can be enabled with the following command:
$ sudo systemctl enable psacct.service
Rationale
The psacct
service can provide administrators a convenient
view into some user activities. However, it should be noted that the auditing
system and its audit records provide more authoritative and comprehensive
records.
- ID
- xccdf_org.ssgproject.content_rule_service_psacct_enabled
- Severity
- Low
- References
- Updated
Remediation - OS Build Blueprint
[customizations.services]
enabled = ["psacct"]
Remediation - Ansible
- name: Enable service psacct
block:
- name: Gather the package facts
package_facts:
manager: auto
Remediation - Puppet
include enable_psacct
class enable_psacct {
service {'psacct':
enable => true,
ensure => 'running',
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" unmask 'psacct.service'
"$SYSTEMCTL_EXEC" start 'psacct.service'