[systemd-devel] Service always started as root

Mantas Mikulėnas grawity at gmail.com
Mon Oct 7 00:50:07 PDT 2013


On Mon, Oct 7, 2013 at 10:40 AM, Daniel Spannbauer <ds at marco.de> wrote:
> Hello,
>
> I've configured a service which should start as a specific user. But the
> service is always started as root.
>
> Here is my service-file:
>
> [Unit]
> Description=Autologin
> After=getty.target
>
> [Service]
> ExecStart=/usr/bin/autologin
> PAMName=login
> Name=daniel

There is no such directive as Service.Name -- if you want to specify
the username, you need Service.User instead:

    [Service]
    User=daniel
    Group=users

See the systemd.exec and systemd.directives manual pages.

-- 
Mantas Mikulėnas <grawity at gmail.com>


More information about the systemd-devel mailing list