I'm trying to setup a service account using systemd units to manage the actual service + supporting code. However, it looks like the systemd user daemon isn't working properly.
$ systemctl --user
Failed to get D-Bus connection: Permission denied
EDIT: I've made some progress by ensuring I have an interactive shell (using su – instead of su to switch to the service account). This has helped, but it looks like my D-Bus woes aren't over:
$ systemctl --user
Failed to get D-Bus connection: No such file or directory
I'm trying to suss out what I need to do to make sure this user does have dbus access. Adding them to the dbus group has had little benefit.
$ groups
printing lp rpc dbus users chrony ipausers
I'm running Fedora Core 23
Best Answer
If I understand correctly, you are mixing up two different concepts:
System services do not get a user instance as they are managed by the system instance. In your case, I think you should write your unit as system units and have them managed directly by systemd PID 1.