[systemd-devel] How to prevent users form seeing other user processes with loginctl/systemctl ?
antisimus
antisimus at gmail.com
Sun Jun 4 09:50:20 UTC 2023
Hello,
Is there a way to hide process information (pids, command line) and prevent
one user accessing other user processes information.
On a shared system this can be a potential security risk and I really do
not like idea users inspecting each other's running processes.
Here I have user *bob *accessing user *alice *process info but same can be
done even to inspect *root *users processes
systemd 247 (247.3-7+deb11u2)
Linux systemd-vps 5.10.0-23-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12)
x86_64 GNU/Linux
bob at systemd-vps:~$ loginctl user-status alice
alice (1002)
Since: Sun 2023-06-04 08:37:18 UTC; 2min 39s ago
State: active
Sessions: *7
Linger: no
Unit: user-1002.slice
├─session-7.scope
│ ├─1025 sshd: alice [priv]
│ ├─1046 sshd: alice at pts/1
│ ├─1047 -bash
│ ├─1305 bash myapp.sh
│ └─1306 sleep 5
└─user at 1002.service
└─init.scope
├─1028 /lib/systemd/systemd --user
└─1029 (sd-pam)
bob at systemd-vps:~$ loginctl user-status root
root (0)
Since: Sun 2023-06-04 09:43:03 UTC; 3min 45s ago
State: active
Sessions: 5 *1
Linger: no
Unit: user-0.slice
├─session-1.scope
│ ├─740 sshd: root at pts/0
│ ├─765 -bash
│ ├─769 su - bob
│ ├─770 -bash
│ ├─877 loginctl user-status root
│ └─878 less
├─session-5.scope
│ ├─820 sshd: root at pts/2
│ ├─826 -bash
│ └─872 sleep 100
└─user at 0.service
└─init.scope
├─747 /lib/systemd/systemd --user
└─748 (sd-pam)
Best regards,
Ante
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20230604/9c53dfa2/attachment.htm>
More information about the systemd-devel
mailing list