[systemd-devel] Service always started as root

2013-10-07 Thread Daniel Spannbauer
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
Group=users
[Install]
WantedBy=multi-user.target


The service starts as expected, but as user root.
The script /usr/bin/autologin starts an X-Server on vt08, the script
has permissions 744.

Any ideas why the service is started as root?

Regards

Daniel



-- 
Daniel Spannbauer Systemadministration
marco Systemanalyse und Entwicklung GmbH  Tel   +49 8333 9233-27 Fax -11
Rechbergstr. 4-6, D 87727 Babenhausen Mobil +49 171 4033220
http://www.marco.de/  Email d...@marco.de
Geschäftsführer Martin Reuter HRB 171775 Amtsgericht München
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Service always started as root

2013-10-07 Thread Mantas Mikulėnas
On Mon, Oct 7, 2013 at 10:40 AM, Daniel Spannbauer d...@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 graw...@gmail.com
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel