On my Ubuntu 18.04.1 system the User Manager of systemd fails to start. I suppose this to be the root cause of other problems that I currently encounter. Any ideas how to get rid of this?
systemd version
$ systemd --version
systemd 237
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid
Ubuntu 18.04.1 LTS Version
$ uname -a
Linux example.com 4.15.0 #1 SMP Wed Jul 25 19:09:31 MSK 2018 x86_64 x86_64 x86_64 GNU/Linux
systemctl unit status
$ sudo systemctl status [email protected]
● [email protected] - User Manager for UID 1001
Loaded: loaded (/lib/systemd/system/[email protected]; static; vendor preset: enabled)
Drop-In: /lib/systemd/system/[email protected]
└─timeout.conf
Active: failed (Result: protocol) since Tue 2019-01-08 10:33:08 CET; 1min 42s ago
Process: 315 ExecStart=/lib/systemd/systemd --user (code=exited, status=1/FAILURE)
Main PID: 315 (code=exited, status=1/FAILURE)
Jan 08 10:33:08 example.com systemd[1]: Starting User Manager for UID 1001...
Jan 08 10:33:08 example.com systemd[315]: pam_unix(systemd-user:session): session opened for user mischa by (uid=0)
Jan 08 10:33:08 example.com systemd[1]: [email protected]: Failed with result 'protocol'.
Jan 08 10:33:08 example.com systemd[1]: Failed to start User Manager for UID 1001.
The syslog says
Jan 8 10:33:08 example.com systemd[1]: Starting User Manager for UID 1001...
Jan 8 10:33:08 example.com systemd[315]: Failed to create /user.slice/user-1001.slice/[email protected]/init.scope control group: Permission denied
Jan 8 10:33:08 example.com systemd[315]: Failed to allocate manager object: Permission denied
Jan 8 10:33:08 example.com systemd[1]: [email protected]: Failed with result 'protocol'.
Jan 8 10:33:08 example.com systemd[1]: Failed to start User Manager for UID 1001.
My user service unit file
$ cat /lib/systemd/system/[email protected]
# SPDX-License-Identifier: LGPL-2.1+
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=User Manager for UID %i
After=systemd-user-sessions.service
[Service]
User=%i
PAMName=systemd-user
Type=notify
ExecStart=-/lib/systemd/systemd --user
Slice=user-%i.slice
KillMode=mixed
Delegate=pids cpu
TasksMax=infinity
TimeoutStopSec=120s