Skip to content

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 - Puppet

include enable_psacct

class enable_psacct {
  service {'psacct':
    enable => true,
    ensure => 'running',

Remediation - Ansible

- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - CCE-82401-1
  - NIST-800-53-AU-12(a)

Remediation - script:kickstart


service enable psacct

Remediation - OS Build Blueprint


[customizations.services]
enabled = ["psacct"]

Remediation - Shell Script

# Remediation is applicable only in certain platforms
if rpm --quiet -q kernel; then

SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" unmask 'psacct.service'
"$SYSTEMCTL_EXEC" start 'psacct.service'