Skip to content

Install the pam_apparmor Package

An XCCDF Rule

Description

The pam_apparmor package can be installed with the following command:

$ apt-get install pam_apparmor

Rationale

Protection of system integrity using AppArmor depends on this package being installed.

ID
xccdf_org.ssgproject.content_rule_package_pam_apparmor_installed
Severity
Medium
Updated



Remediation - Puppet

include install_libpam-apparmor

class install_libpam-apparmor {
  package { 'libpam-apparmor':
    ensure => 'installed',
  }

Remediation - OS Build Blueprint


[[packages]]
name = "libpam-apparmor"
version = "*"

Remediation - Shell Script

# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then

DEBIAN_FRONTEND=noninteractive apt-get install -y "libpam-apparmor"

else

Remediation - Ansible

- name: Ensure libpam-apparmor is installed
  package:
    name: libpam-apparmor
    state: present
  when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
  tags: