[systemd-devel] Best way to limit per-user system-wide units

Samuel Williams space.ship.traveller at gmail.com
Tue Dec 13 22:55:48 UTC 2016


So, I was playing around with sudo and found the following:

% env | grep XDG
XDG_SESSION_ID=4
XDG_RUNTIME_DIR=/run/user/1000

% sudo -u http env | grep XDG
... nothing...


Found this: http://stackoverflow.com/questions/28809235/how-to-get-xdg-variables-with-sudo

Of course, using a login shell is not feasible:

% sudo -iu http env
-nologin: invalid option -- 'c'

That's a deliberate security consideration.

Ideas?


More information about the systemd-devel mailing list