AppArmor installation on XFCE minimal

Hello there! It’s been maybe two weeks since I did a fresh manjaro XFCE minimal install. Everything working perfectly.

inxi output
System:
  Kernel: 5.15.12-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
    root=UUID=d490644f-c0c6-4cd2-a1b8-3399f98ade5c rw quiet
    resume=UUID=f8aae6e5-5e27-4d69-8332-16701ccef143 udev.log_priority=3
  Desktop: Xfce 4.16.0 tk: Gtk 3.24.29 info: xfce4-panel wm: xfwm 4.16.1
    vt: 7 dm: LightDM 1.30.0 Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: Dell product: Inspiron 3584 v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Dell model: 05RCHV v: A00 serial: <superuser required> UEFI: Dell
    v: 1.15.0 date: 10/05/2021
Battery:
  ID-1: BAT0 charge: 8.0 Wh (46.0%) condition: 17.4/42.0 Wh (41.3%)
    volts: 11.5 min: 11.4 model: BYD DELL FW8KR96 type: Li-ion serial: <filter>
    status: Discharging
Memory:
  RAM: total: 3.73 GiB used: 2.54 GiB (68.1%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: Intel Core i3-7020U bits: 64 type: MT MCP arch: Amber/Kaby Lake
    note: check family: 6 model-id: 0x8E (142) stepping: 9 microcode: 0xEA
  Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
    L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB
    L3: 3 MiB desc: 1x3 MiB
  Speed (MHz): avg: 1726 high: 1800 min/max: 400/2300 scaling:
    driver: intel_pstate governor: powersave cores: 1: 1726 2: 1660 3: 1800
    4: 1720 bogomips: 18406
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat arch_perfmon
    art avx avx2 bmi1 bmi2 bts clflush clflushopt cmov constant_tsc cpuid
    cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept ept_ad erms est
    f16c flexpriority flush_l1d fma fpu fsgsbase fxsr ht hwp hwp_act_window
    hwp_epp hwp_notify ibpb ibrs intel_pt invpcid invpcid_single lahf_lm lm
    mca mce md_clear mmx monitor movbe mpx msr mtrr nonstop_tsc nopl nx pae
    pat pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln pni popcnt pse pse36 pti
    pts rdrand rdseed rdtscp rep_good sdbg sep smap smep ss ssbd sse sse2
    sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust
    tsc_deadline_timer vme vmx vnmi vpid x2apic xgetbv1 xsave xsavec xsaveopt
    xsaves xtopology xtpr
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf
    mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional,
    IBRS_FW, STIBP: conditional, RSB filling
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel vendor: Dell driver: i915 v: kernel bus-ID: 00:02.0
    chip-ID: 8086:5921 class-ID: 0300
  Device-2: Realtek Integrated_Webcam_HD type: USB driver: uvcvideo
    bus-ID: 1-5:3 chip-ID: 0bda:5520 class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org 1.21.1.2 compositor: xfwm4 v: 4.16.1 driver:
    loaded: modesetting alternate: fbdev,vesa display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.2x8.0")
    s-diag: 414mm (16.3")
  Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Dell driver: snd_hda_intel
    v: kernel alternate: snd_soc_skl bus-ID: 00:1f.3 chip-ID: 8086:9d71
    class-ID: 0403
  Sound Server-1: ALSA v: k5.15.12-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.19 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.42 running: yes
Network:
  Device-1: Realtek RTL810xE PCI Express Fast Ethernet vendor: Dell
    driver: r8169 v: kernel port: e000 bus-ID: 01:00.0 chip-ID: 10ec:8136
    class-ID: 0200
  IF: enp1s0 state: down mac: <filter>
  Device-2: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter
    vendor: Dell driver: ath10k_pci v: kernel bus-ID: 02:00.0 chip-ID: 168c:0042
    class-ID: 0280
  IF: wlp2s0 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Device-1: Qualcomm Atheros type: USB driver: btusb v: 0.8 bus-ID: 1-7:5
    chip-ID: 0cf3:e009 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 2 state: down bt-service: disabled
    rfk-block: hardware: no software: no address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci
    v: 3.0 port: f060 bus-ID: 00:17.0 chip-ID: 8086:282a rev: N/A class-ID: 0104
Drives:
  Local Storage: total: 931.51 GiB used: 52.63 GiB (5.7%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital
    model: WD10SPZX-75Z10T2 size: 931.51 GiB block-size: physical: 4096 B
    logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter>
    rev: 1A03 scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 38 GiB size: 37.11 GiB (97.65%) used: 19.97 GiB (53.8%)
    fs: ext4 dev: /dev/sda8 maj-min: 8:8 label: N/A
    uuid: d490644f-c0c6-4cd2-a1b8-3399f98ade5c
  ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%)
    used: 292 KiB (0.1%) fs: vfat dev: /dev/sda7 maj-min: 8:7 label: NO_LABEL
    uuid: F9C1-B0CE
  ID-3: /home raw-size: 121.02 GiB size: 118.56 GiB (97.97%)
    used: 32.66 GiB (27.5%) fs: ext4 dev: /dev/sda10 maj-min: 8:10 label: N/A
    uuid: 3989e7da-996f-4a8c-9b06-6d3d52e37b63
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 4 GiB used: 1.5 MiB (0.0%) priority: -2
    dev: /dev/sda9 maj-min: 8:9 label: N/A
    uuid: f8aae6e5-5e27-4d69-8332-16701ccef143
Unmounted:
  ID-1: /dev/sda1 maj-min: 8:1 size: 650 MiB fs: vfat label: ESP
    uuid: D211-7C1A
  ID-2: /dev/sda2 maj-min: 8:2 size: 128 MiB fs: <superuser required>
    label: N/A uuid: N/A
  ID-3: /dev/sda3 maj-min: 8:3 size: 752.71 GiB fs: ntfs label: OS
    uuid: 8868568F68567BBE
  ID-4: /dev/sda4 maj-min: 8:4 size: 990 MiB fs: ntfs label: WINRETOOLS
    uuid: 2E66E97566E93DE9
  ID-5: /dev/sda5 maj-min: 8:5 size: 12.33 GiB fs: ntfs label: Image
    uuid: 1AC8EA5AC8EA33A3
  ID-6: /dev/sda6 maj-min: 8:6 size: 1.22 GiB fs: ntfs label: DELLSUPPORT
    uuid: 8C98D3C298D3A8CA
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 12 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-3:2 info: MosArt Wireless Mouse 2.4G type: Mouse
    driver: hid-generic,usbhid interfaces: 1 rev: 1.1 speed: 12 Mb/s
    power: 100mA chip-ID: 062a:4106 class-ID: 0301
  Device-2: 1-5:3 info: Realtek Integrated_Webcam_HD type: Video
    driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA
    chip-ID: 0bda:5520 class-ID: 0e02 serial: <filter>
  Device-3: 1-6:4 info: Realtek RTS5129 Card Reader Controller
    type: <vendor specific> driver: rtsx_usb,rtsx_usb_ms,rtsx_usb_sdmmc
    interfaces: 1 rev: 2.0 speed: 480 Mb/s power: 500mA chip-ID: 0bda:0129
    class-ID: ff00 serial: <filter>
  Device-4: 1-7:5 info: Qualcomm Atheros type: Bluetooth driver: btusb
    interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 0cf3:e009
    class-ID: e001
  Hub-2: 2-0:1 info: Super-speed hub ports: 6 rev: 3.0 speed: 5 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: 46.0 C pch: 43.0 C mobo: 44.0 C sodimm: SODIMM C
  Fan Speeds (RPM): cpu: 2679
Info:
  Processes: 201 Uptime: 3h 44m wakeups: 2 Init: systemd v: 250
  tool: systemctl Compilers: gcc: 11.1.0 clang: 13.0.0 Packages: pacman: 1111
  lib: 323 flatpak: 0 Shell: Bash v: 5.1.12 running-in: xfce4-terminal
  inxi: 3.3.11

But a few days ago I tried to install AppArmor and it just won’t work.

I followed ArchWiki’s installation guide except for setting the kernel parameter since I never messed with kernel config.

Here is what I get when I do:

aa-status
apparmor module is loaded.
apparmor filesystem is not mounted.
aa-enabled
No - disabled at boot.

Plus when I try to debug with sudo journalctl -fx as indicated on the official website, this is all I get:

jan 08 12:04:52 ****** systemd[1]: systemd 250-5-manjaro running in system mode (+PAM +AUDIT -SELINUX -APPARMOR -IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK +XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified)
jan 08 12:04:52 ****** systemd[1]: Load AppArmor profiles was skipped because of a failed condition check (ConditionSecurity=apparmor).

Just looking at the output and the one from aa-enabled I get it must be the kernel parameter thing, but I find nothing more about it.
man apparmor wasn’t helpful about that. And I couldn’t find many info on doing that.

So what do I do to get it working now?

In a nutshell:

systemctl enable apparmor.service

add in grub to GRUB_CMDLINE_LINUX_DEFAULT
apparmor=1 security=apparmor

sudo update-grub

restart

To check:

aa-enabled

systemctl status apparmor

sudo aa-status

Yup.


There are more contemporary instructions …
https://wiki.archlinux.org/title/AppArmor#Installation

PS - I dont use apparmor, but checking our default lsm params vs the suggestion, I suppose it should look like this:

lsm=landlock,lockdown,yama,loadpin,safesetid,integrity,apparmor,bpf
1 Like

Thanks a lot. The only is problem is that I don’t know where are the configuration files I should add that to. Can you tell me what file exactly I should edit?

Take a look in

/etc/default/grub

:wink:

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.