-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
This is the script I use to prevent failures on startup when using proc-hidepid.service
I've had this configuration running for over a year now on a server host system, and a slew of server VMs. This is not tested on desktop systems.
sudo groupadd proc
mkdir -p /etc/systemd/system/proc-hidepid.service.d/
echo "[Service]
ExecStart=/bin/mount -o remount,nosuid,nodev,noexec,hidepid=2,gid=proc /proc
" > /etc/systemd/system/proc-hidepid.service.d/override.conf
mkdir -p /etc/systemd/system/systemd-logind.service.d/
echo "[Service]
SupplementaryGroups=proc" > /etc/systemd/system/systemd-logind.service.d/override.conf
mkdir -p /etc/systemd/system/user@.service.d/
echo "[Service]
SupplementaryGroups=proc" > /etc/systemd/system/user@.service.d/override.conf
Issues caused without this configuration, and said fixes, are mentioned here:
systemd/systemd#12955
I am unaware of exactly what security impact this may have, but it stops services from failing when booting.
Metadata
Metadata
Assignees
Labels
No labels