[lxc-users] LXC container and Systemd

Fajar A. Nugraha list at fajar.net
Fri Aug 10 12:52:52 UTC 2018


On Fri, Aug 10, 2018 at 5:12 PM, Goran <sendmailtogoran at gmail.com> wrote:

> Your test-asuser.service works as intended. If I change the user and
> group to grafana it shows the same problems.
>
> # id grafana
> uid=207(grafana) gid=207(grafana) groups=207(grafana)
>
> # cat /etc/passwd
> ...
> grafana:x:207:207::/var/lib/grafana:/sbin/nologin
> ...
>
> cat /etc/group
> ...
> grafana:x:207:
> ...
>
>
Hmm ... not sure what happens. Probably /var/lib/grafana doesn't exist?

Unless you got help from somebody more familiar with systemd, I'd just do
one of these:
- start as root in the systemd unit, then use runasuser/su (this already
works), or
- delete (preserving its files), recreate the user (possibly using "useradd
-m" to create a "normal" user with /home directory, just in case), and
chown grafana's files afterwards.

-- 
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20180810/91efdc01/attachment.html>


More information about the lxc-users mailing list