Am 08.06.21 um 16:19 schrieb Michael Biebl:

After enabling "linger" for that user, the systemd --user session was not stopped anymore after logging out and the container continued running.

# systemd-cgls
Control group /:
-.slice
├─user.slice │ ├─user-0.slice │ │ ├─session-1.scope │ │ │ ├─ 438 /bin/login -p --
│ │ │ ├─ 553 -bash
│ │ │ └─1440 systemd-cgls
│ │ └─user@0.service …
│ │ └─init.scope │ │ ├─534 /lib/systemd/systemd --user
│ │     └─535 (sd-pam)
│ └─user-1000.slice │ └─user@1000.service … │ ├─app.slice │ │ └─run-rc9609178954b49f684f37595d92e5171.scope │ │ ├─lxc.monitor.mycontainer │ │ │ └─1242 [lxc monitor] /home/michael/.local/share/lxc mycontainer │ │ └─lxc.payload.mycontainer │ │ ├─init.scope │ │ │ └─1248 /sbin/init │ │ └─system.slice │ │ ├─networking.service │ │ │ └─1350 /sbin/dhclient -4 -v -i -pf /run/dhclient.eth0.pid -lf /… │ │ ├─systemd-journald.service │ │ │ └─1326 /lib/systemd/systemd-journald │ │ ├─console-getty.service │ │ │ └─1394 /sbin/agetty -o -p -- \u --noclear --keep-baud console 1… │ │ ├─system-container\x2dgetty.slice │ │ │ ├─container-getty@0.service │ │ │ │ └─1395 /sbin/agetty -o -p -- \u --noclear --keep-baud pts/0 1… │ │ │ ├─container-getty@2.service │ │ │ │ └─1397 /sbin/agetty -o -p -- \u --noclear --keep-baud pts/2 1… │ │ │ ├─container-getty@1.service │ │ │ │ └─1396 /sbin/agetty -o -p -- \u --noclear --keep-baud pts/1 1… │ │ │ └─container-getty@3.service │ │ │ └─1398 /sbin/agetty -o -p -- \u --noclear --keep-baud pts/3 1… │ │ ├─dbus.service │ │ │ └─1370 /usr/bin/dbus-daemon --system --address=systemd: --nofor… │ │ └─systemd-logind.service │ │ └─1372 /lib/systemd/systemd-logind │ └─init.scope │ ├─1182 /lib/systemd/systemd --user
│       └─1184 (sd-pam)
├─init.scope │ └─1 /sbin/init └─system.slice ├─lxc-net.service │ └─492 dnsmasq --conf-file=/dev/null -u dnsmasq --strict-order --bind-interf… ├─systemd-udevd.service │ └─232 /lib/systemd/systemd-udevd ├─cron.service │ └─402 /usr/sbin/cron -f ├─systemd-journald.service │ └─214 /lib/systemd/systemd-journald ├─ssh.service │ └─457 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups ├─ifup@enp1s0.service │ └─449 /sbin/dhclient -4 -v -i -pf /run/dhclient.enp1s0.pid -lf /var/lib/dhc… ├─rsyslog.service │ └─411 /usr/sbin/rsyslogd -n -iNONE
  ├─lxcfs.service …
  │ └─407 /usr/bin/lxcfs /var/lib/lxcfs
├─dbus.service │ └─403 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile… ├─systemd-timesyncd.service │ └─261 /lib/systemd/systemd-timesyncd ├─system-getty.slice │ ├─getty@tty6.service │ │ └─896 /sbin/agetty -o -p -- \u --noclear tty6 linux │ └─getty@tty2.service │ └─1377 /sbin/agetty -o -p -- \u --noclear tty2 linux └─systemd-logind.service └─417 /lib/systemd/systemd-logind

# loginctl show-user michael
UID=1000
GID=1000
Name=michael
Timestamp=Tue 2021-06-08 16:08:20 CEST
TimestampMonotonic=280083967
RuntimePath=/run/user/1000
Service=user@1000.service
Slice=user-1000.slice
State=lingering
Sessions=
IdleHint=yes
IdleSinceHint=0
IdleSinceHintMonotonic=0
Linger=yes


Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to