Skip to content

[Security.NoUser] seems a bit harsh for user unit files #64

Description

Not sure if my assumptions are correct, but I've always written systemd user (as opposed to system) units without a User=foo or DynamicUser=bar. systemd itself doesn't do that for user units, as they're designed to be run by the user that calls them via systemctl --user. So I was a bit surprised to notice systemdlint always tags these with [Security.NoUser] as an error, regardless where they are placed on the filesystem:

$ systemdlint /home/glitsj16/.config/systemd/user/logout.service
/home/glitsj16/.config/systemd/user/logout.service:1:error [Security.NoUser] - Neither User nor DynamicUser is set
$ systemdlint /usr/lib/systemd/user/dbus.service
/usr/lib/systemd/user/dbus.service:1:error [Security.NoUser] - Neither User nor DynamicUser is set
$ systemdlint /etc/systemd/user/privaxy.service
/etc/systemd/user/privaxy.service:1:error [Security.NoUser] - Neither User nor DynamicUser is set

Is there a way to drop this notice for user units? Or at least downgrade it to a warning?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions