[Bug 1182835] New: systemctl --user not working
http://bugzilla.opensuse.org/show_bug.cgi?id=1182835 Bug ID: 1182835 Summary: systemctl --user not working Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Major Priority: P5 - None Component: Kubic Assignee: kubic-bugs@opensuse.org Reporter: dev.dorrejo@gmail.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Hello, i did a clean install of microOS 20210223 which is the last version, in the mode Container Host because of podman. after the installation i proceed to create the user and the subu(g)ids. when i do systemctl --user i got: Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host --user to connect to bus of other user) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1182835 http://bugzilla.opensuse.org/show_bug.cgi?id=1182835#c2 --- Comment #2 from Walddys Emmanuel Dorrejo C�spedes <dev.dorrejo@gmail.com> --- the logs show nothing. (In reply to Fabian Vogt from comment #1)
How did you log into the system? Apparently pam_systemd either didn't run or failed for some reason.
Please attach the full journal of an affected boot with "journalctl -b".
mar 01 18:08:46 microos-labs systemd[2385]: Queued start job for default target Main User Target. mar 01 18:08:46 microos-labs systemd[2385]: Reached target Paths. mar 01 18:08:46 microos-labs systemd[2385]: Reached target Timers. mar 01 18:08:46 microos-labs sshd[2392]: Starting session: shell on pts/0 for wdorrejo from 192.168.122.1 port 37928 id 0 mar 01 18:08:46 microos-labs systemd[2385]: Starting D-Bus User Message Bus Socket. mar 01 18:08:46 microos-labs systemd[2385]: Listening on D-Bus User Message Bus Socket. mar 01 18:08:46 microos-labs systemd[2385]: Reached target Sockets. mar 01 18:08:46 microos-labs systemd[2385]: Reached target Basic System. mar 01 18:08:46 microos-labs systemd[2385]: Reached target Main User Target. mar 01 18:08:46 microos-labs systemd[2385]: Startup finished in 69ms. mar 01 18:09:22 microos-labs sudo[2433]: wdorrejo : TTY=pts/0 ; PWD=/home/wdorrejo ; USER=astian ; COMMAND=/bin/bash mar 01 18:09:22 microos-labs sudo[2433]: pam_unix(sudo:session): session opened for user astian(uid=1001) by wdorrejo(uid=1000) mar 01 18:11:08 microos-labs sudo[2433]: pam_unix(sudo:session): session closed for user astian lines 35-94/94 (END) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1182835 http://bugzilla.opensuse.org/show_bug.cgi?id=1182835#c3 --- Comment #3 from Walddys Emmanuel Dorrejo C�spedes <dev.dorrejo@gmail.com> --- only appear the first user created after the installation. systemctl status us usb-gadget.target user-1000.slice user.slice usr.mount user@1000.service user-runtime-dir@1000.service usr-local.mount usr-share.mount wdorrejo@microos-labs:~> systemctl status use -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1182835 http://bugzilla.opensuse.org/show_bug.cgi?id=1182835#c5 --- Comment #5 from Walddys Emmanuel Dorrejo C�spedes <dev.dorrejo@gmail.com> --- (In reply to Fabian Vogt from comment #4)
How did you create the user and log in? How do you run "systemctl --user"?
I have the suspicion that you're running "sudo systemctl --user" or similar, which can't work and would explain those issues.
sudo useradd -c "System Account for GitLab" -md /opt/aservices/app/gitlab gitlab sudo -i gitlab systemctl --user error -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1182835 http://bugzilla.opensuse.org/show_bug.cgi?id=1182835#c6 --- Comment #6 from Walddys Emmanuel Dorrejo C�spedes <dev.dorrejo@gmail.com> --- same happen if i do sudo su - gitlab -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1182835 http://bugzilla.opensuse.org/show_bug.cgi?id=1182835#c7 --- Comment #7 from Walddys Emmanuel Dorrejo C�spedes <dev.dorrejo@gmail.com> --- On opensuse Leap 15.2 sudo -iu gitlab gitlab@venus:~> systemctl --user Failed to connect to bus: No such file or directory sudo su - gitlab gitlab@venus:~> systemctl --user Failed to connect to bus: No such file or directory -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1182835 http://bugzilla.opensuse.org/show_bug.cgi?id=1182835#c8 --- Comment #8 from Walddys Emmanuel Dorrejo C�spedes <dev.dorrejo@gmail.com> --- I found a workaround, but this is a serious bug. sudo systemctl enable --now user@id.service login on the user and execute: cat >>.profile <<EOF export XDG_RUNTIME_DIR=/run/user/`id -u` EOF but after like 30 min the service started will disappear, this happen on TW, Leap and MicroOS. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1182835 http://bugzilla.opensuse.org/show_bug.cgi?id=1182835#c9 --- Comment #9 from Walddys Emmanuel Dorrejo C�spedes <dev.dorrejo@gmail.com> --- (In reply to Walddys Emmanuel Dorrejo C�spedes from comment #8)
I found a workaround, but this is a serious bug.
sudo systemctl enable --now user@id.service
fix: sudo systemctl start user@id.service. now if you restart the server, you need to start the user dbus again manually. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1182835 http://bugzilla.opensuse.org/show_bug.cgi?id=1182835#c11 --- Comment #11 from Walddys Emmanuel Dorrejo C�spedes <dev.dorrejo@gmail.com> --- (In reply to Fabian Vogt from comment #10)
pam_systemd will not create sessions if you're already in a session. You can only use systemctl --user from within sessions such as local logins on the tty or X11, or remote logins using ssh.
See also https://github.com/systemd/systemd/issues/7451#issuecomment-346787237.
thank you for the answer. if is possible and can be answered here: how can one manage podman rootless if exist this limitation? -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com