Service hardening: User=, ProtectSystem, NoNewPrivileges
cheat sheet · Ubuntu 24.04 · systemd 255 https://lab.dimsanych.ru/en/wiki/systemd-hardening/Cheat sheet
-
systemd-analyze securityrating of every service -
systemd-analyze security appsettings table and total -
systemd-analyze security --threshold=50 appexit code 1 above 5.0 -
systemctl show app -p User -p ProtectSystem -p NoNewPrivileges -
sudo systemctl edit appdrop-in with limits -
ps -o user,pid,cmd -C python3who runs the process -
sudo systemd-run --pipe --wait -q -p User=demo idtry a setting