lemurs icon indicating copy to clipboard operation
lemurs copied to clipboard

Problems with `pam` on Ubuntu 22.10

Open kmephistoh opened this issue 2 years ago • 13 comments

➜ lightdm cd /etc/lemurs ➜ lemurs ls config.toml wayland wms xsetup.sh ➜ lemurs tree . ├── config.toml ├── wayland │   ├── sway │   └── ubuntu ├── wms └── xsetup.sh

2 directories, 4 files ➜ lemurs cat wayland/ubuntu #! /bin/sh exec gnome-session --session=gnome-wayland ➜ lemurs ls -al wayland/ubuntu -rwxr-xr-x 1 root root 54 Dec 1 15:50 wayland/ubuntu ➜ lemurs cat /var/log/lemurs.log [2022-12-01][15:19:41][lemurs][INFO] Lemurs logger is running [2022-12-01][15:19:41][lemurs][INFO] Switching to tty 2 [2022-12-01][15:19:41][lemurs][INFO] UI booted up [2022-12-01][15:19:41][lemurs::info_caching][INFO] Attempting to get a cached information from '/var/cache/lemurs' [2022-12-01][15:19:41][lemurs::info_caching][INFO] Read cache file and found environment 'mephisto' and username 'None' [2022-12-01][15:19:41][lemurs::ui][INFO] Loading environment 'mephisto' from cache [2022-12-01][15:19:41][lemurs::ui::switcher][WARN] Failed to find selection with title: 'mephisto' [2022-12-01][15:19:52][lemurs::auth][INFO] Login attempt for 'mephisto' [2022-12-01][15:19:52][lemurs::auth::pam][INFO] Started opening session [2022-12-01][15:19:52][lemurs::auth::pam][INFO] Gotten Authenticator [2022-12-01][15:19:52][lemurs::auth::pam][INFO] Got handler [2022-12-01][15:19:52][lemurs::auth::pam][INFO] Validated account [2022-12-01][15:19:52][lemurs::auth::pam][INFO] Opened session [2022-12-01][15:19:52][lemurs::ui][INFO] Setting cached information [2022-12-01][15:19:52][lemurs::info_caching][INFO] Attempting to set cache [2022-12-01][15:19:52][lemurs::info_caching][INFO] Successfully set username in cache file [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'HOME' to '/home/mephisto' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Successfully changed working directory to /home/mephisto! [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'SHELL' to '/usr/bin/zsh' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'USER' to 'mephisto' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'LOGNAME' to 'mephisto' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'PATH' to '/usr/local/sbin:/usr/local/bin:/usr/bin' [2022-12-01][15:19:52][lemurs::post_login][INFO] Set environment variables. [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_CONFIG_DIR' to '/home/mephisto/.config' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_CACHE_HOME' to '/home/mephisto/.cache' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_DATA_HOME' to '/home/mephisto/.local/share' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_STATE_HOME' to '/home/mephisto/.local/state' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_DATA_DIRS' to '/usr/local/share:/usr/share' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_CONFIG_DIRS' to '/etc/xdg' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_RUNTIME_DIR' to '/run/user/1000' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_SESSION_DIR' to 'user' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_SESSION_ID' to '1' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_SEAT' to 'seat0' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_VTNR' to '2' [2022-12-01][15:19:52][lemurs::post_login][INFO] Set XDG environment variables [2022-12-01][15:19:52][lemurs::post_login][INFO] Starting Wayland Session [2022-12-01][15:19:52][lemurs::post_login][INFO] Entered Wayland compositor [2022-12-01][15:19:52][lemurs::auth::utmpx][INFO] Adding UTMPX record [2022-12-01][15:19:52][lemurs::auth::utmpx][INFO] Added UTMPX record [2022-12-01][15:19:53][lemurs::auth::utmpx][INFO] Removing UTMPX record

When input username and password, it didn't enter gnome desktop, just stay on greeter page. By the way, this repo is impressive.

kmephistoh avatar Dec 02 '22 07:12 kmephistoh

Hi,

Thank you for this report. I spend quite some time on trying to find the solution to this. GDM is doing some special stuff normally to make sure gnome-session works fine.

I have been able to identify some points. These are more reminders for me when I continue working on this.

  1. We really should be setting XDG_SESSION_TYPE=x11/wayland/tty depending on the post_login type.
  2. We should set MOZ_ENABLE_WAYLAND=1 QT_QPA_PLATFORM=wayland for Wayland sessions.
  3. Some of the error logging in the post_login/mod.rs file is not really helping.
  4. You need to install libpam-dev on Ubuntu to use this project.
  5. You can log gnome-session with the --debug flag.
  6. The debug output shows that the display is not properly set. Using DISPLAY=:1 does not resolve the issue. In fact the documentation stated that gnome-session does this itself.
  7. Starting a gnome-session from the tty is quite difficult.

To be honest, I am having many problems with setting up a good testing environment.

I will follow up soon.

coastalwhite avatar Dec 02 '22 20:12 coastalwhite

If you want start a gnome-sesion from available tty, this arch wiki may helpfull arch gnome

XDG_SESSION_TYPE=wayland dbus-run-session gnome-session or gnome-shell --wayland

➜  wayland pwd
/etc/lemurs/wayland
➜  wayland grep -v '^#' ubuntu
exec env GNOME_SHELL_SESSION_MODE=ubuntu XDG_SESSION_TYPE=wayland MOZ_ENABLE_WAYLAND=1 QT_QPA_PLATFORM=wayland dbus-run-session /usr/bin/gnome-session --session=ubuntu
➜  wayland ls
sway  ubuntu

The above config still didn't work, but it works if you execute it from tty. when enable --debug, the log screen disappear too fast, can't find a way to review the debug log

kmephistoh avatar Dec 05 '22 08:12 kmephistoh

I think this is a problem with gnome-session in general. I had someone message me about the same problem for the X11 gnome-session. I didn't test this yet, but according to the arch wiki somewhere. GDM puts the Xauthority file somewhere else than the home directory. This might well be the problem.

There is also a possibility that it has something to do with the rights given to the Xauthority file in the home directory.

coastalwhite avatar Dec 08 '22 09:12 coastalwhite

The problem seems to be exclusively with Ubuntu. I tested it with a fresh arch setup and gnome and everything seems to work fine. I will investigate more later.

coastalwhite avatar Dec 08 '22 23:12 coastalwhite

Okay. I have tracked the issue down. It turns out that the PAM services are very different between Ubuntu and other distributions. Now, I just need to find a fix that seems reasonable.

coastalwhite avatar Dec 09 '22 18:12 coastalwhite

I have the same problem and logs as @kmephistoh, but instead Ubuntu I'm trying to launch labwc in Arch Linux. I have the wayland folder created and the labwc file with the script, I didn't change anything else.

labwc

#! /bin/sh 
exec labwc
Logs
[2022-12-09][20:33:10][lemurs::auth][INFO] Login attempt for 'relwi'
[2022-12-09][20:33:10][lemurs::auth::pam][INFO] Started opening session
[2022-12-09][20:33:10][lemurs::auth::pam][INFO] Gotten Authenticator
[2022-12-09][20:33:10][lemurs::auth::pam][INFO] Got handler
[2022-12-09][20:33:10][lemurs::auth::pam][INFO] Validated account
[2022-12-09][20:33:10][lemurs::auth::pam][INFO] Opened session
[2022-12-09][20:33:10][lemurs::ui][INFO] Setting cached information
[2022-12-09][20:33:10][lemurs::info_caching][INFO] Attempting to set cache
[2022-12-09][20:33:10][lemurs::info_caching][INFO] Successfully set username in cache file
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'HOME' to '/home/relwi'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Successfully changed working directory to /home/relwi!
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'SHELL' to '/bin/nu'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'USER' to 'relwi'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'LOGNAME' to 'relwi'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'PATH' to '/usr/local/sbin:/usr/local/bin:/usr/bin'
[2022-12-09][20:33:10][lemurs::post_login][INFO] Set environment variables.
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_CONFIG_DIR' to '/home/relwi/.config'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_CACHE_HOME' to '/home/relwi/.cache'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_DATA_HOME' to '/home/relwi/.local/share'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_STATE_HOME' to '/home/relwi/.local/state'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_DATA_DIRS' to '/usr/local/share:/usr/share'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_CONFIG_DIRS' to '/etc/xdg'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_RUNTIME_DIR' to '/run/user/1000'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_SESSION_DIR' to 'user'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_SESSION_ID' to '1'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_SEAT' to 'seat0'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_VTNR' to '2'
[2022-12-09][20:33:10][lemurs::post_login][INFO] Set XDG environment variables
[2022-12-09][20:33:10][lemurs::post_login][INFO] Starting Wayland Session
[2022-12-09][20:33:10][lemurs::post_login][INFO] Entered Wayland compositor
[2022-12-09][20:33:10][lemurs::auth::utmpx][INFO] Adding UTMPX record
[2022-12-09][20:33:10][lemurs::auth::utmpx][INFO] Added UTMPX record
[2022-12-09][20:33:10][lemurs::auth::utmpx][INFO] Removing UTMPX record

If I change to another tty and run the command labwc it starts correctly.

Relwi avatar Dec 09 '22 19:12 Relwi

After looking at this problem some more. I am surprised logging in with lemurs works at all on Ubuntu. The current PAM configuration is totally unsuited for Ubuntu. I will see what I can do about this.

coastalwhite avatar Dec 22 '22 16:12 coastalwhite

Is there any chance you can both try again? It works now on my side, but your issues may be different?

coastalwhite avatar Mar 03 '23 20:03 coastalwhite

Unfortunately it still doesn't work for me, here is the logs, btw, is there the possibility that I'm missing some packages? Update: I'm using Nushell as my primary bash

Logs
[INFO  lemurs] Lemurs logger is running
[INFO  lemurs] Switching to tty 2
[INFO  lemurs] UI booted up
[WARN  lemurs::post_login] Failed to read from the X folder '/etc/lemurs/wms'
[INFO  lemurs::info_caching] Attempting to get a cached information from '/var/cache/lemurs'
[INFO  lemurs::info_caching] Read cache file and found environment 'labwc' and username 'relwi'
[INFO  lemurs::ui] Loading username 'relwi' from cache
[INFO  lemurs::ui] Loading environment 'labwc' from cache
[INFO  lemurs] Starting new session for 'relwi' in environment 'Wayland { script_path: "/etc/lemurs/wayland/labwc" }'
[ERROR lemurs::env_container] Could not find the working directory when taking snapshot
[INFO  lemurs::post_login::env_variables] Setting Display
[INFO  lemurs::env_container] Set environment variable 'DISPLAY' to ':1'
[INFO  lemurs::post_login::env_variables] Setting XDG Session Parameters
[INFO  lemurs::env_container] Set environment variable 'XDG_SESSION_CLASS' to 'user'
[INFO  lemurs::env_container] Set environment variable 'XDG_SESSION_TYPE' to 'wayland'
[INFO  lemurs::auth] Login attempt for 'relwi'
[INFO  lemurs::auth::pam] Started opening session
[INFO  lemurs::auth::pam] Gotten Authenticator
[INFO  lemurs::auth::pam] Got handler
[INFO  lemurs::auth::pam] Validated account
[INFO  lemurs::auth::pam] Opened session
[INFO  lemurs::ui] Setting cached information
[INFO  lemurs::info_caching] Attempting to set cache
[INFO  lemurs::info_caching] Successfully set username in cache file
[INFO  lemurs::post_login::env_variables] Setting XDG Seat Variables
[INFO  lemurs::env_container] Skipped setting environment variable 'XDG_SEAT'. It was already set to 'seat0'
[INFO  lemurs::env_container] Skipped setting environment variable 'XDG_VTNR'. It was already set to '2'
[INFO  lemurs::post_login::env_variables] Setting XDG Session Variables
[INFO  lemurs::env_container] Skipped setting environment variable 'XDG_RUNTIME_DIR'. It was already set to '/run/user/1000'
[INFO  lemurs::env_container] Skipped setting environment variable 'XDG_SESSION_ID'. It was already set to 'c1'
[INFO  lemurs::post_login::env_variables] Setting Basic Environment Variables
[INFO  lemurs::env_container] Successfully changed working directory to /home/relwi!
[INFO  lemurs::env_container] Set environment variable 'HOME' to '/home/relwi'
[INFO  lemurs::env_container] Set environment variable 'SHELL' to '/bin/nu'
[INFO  lemurs::env_container] Set environment variable 'USER' to 'relwi'
[INFO  lemurs::env_container] Set environment variable 'LOGNAME' to 'relwi'
[INFO  lemurs::env_container] Set environment variable 'PATH' to '/usr/local/sbin:/usr/local/bin:/usr/bin'
[INFO  lemurs::post_login::env_variables] Setting XDG Common Paths
[INFO  lemurs::env_container] Set environment variable 'XDG_CONFIG_DIR' to '/home/relwi/.config'
[INFO  lemurs::env_container] Set environment variable 'XDG_CACHE_HOME' to '/home/relwi/.cache'
[INFO  lemurs::env_container] Set environment variable 'XDG_DATA_HOME' to '/home/relwi/.local/share'
[INFO  lemurs::env_container] Set environment variable 'XDG_STATE_HOME' to '/home/relwi/.local/state'
[INFO  lemurs::env_container] Set environment variable 'XDG_DATA_DIRS' to '/usr/local/share:/usr/share'
[INFO  lemurs::env_container] Set environment variable 'XDG_CONFIG_DIRS' to '/etc/xdg'
[INFO  lemurs::post_login] Starting Wayland session
[INFO  lemurs::auth::utmpx] Adding UTMPX record
[INFO  lemurs::auth::utmpx] Added UTMPX record
[INFO  lemurs::env_container] Removing session environment variables
[INFO  lemurs::env_container] Reverting to environment before session
[ERROR lemurs::env_container] Failed to change the working directory back to
[INFO  lemurs] Waiting for environment to terminate
[WARN  lemurs::post_login] Environment came back with non-zero exit code.
[WARN  lemurs::post_login] Environment's stderr: """
    00:00:00.053 [ERROR] [backend/x11/backend.c:408] Failed to open xcb connection
    00:00:00.053 [ERROR] [../labwc-0.6.1/src/server.c:214] unable to create backend
    """
[INFO  lemurs] Environment terminated. Returning to Lemurs...
[INFO  lemurs::auth::utmpx] Removing UTMPX record

Relwi avatar Mar 04 '23 09:03 Relwi

log info:
➜  ~ lemurs -V
0.3.1

➜  ~ cat /var/log/lemurs.log
[INFO  lemurs] Lemurs logger is running
[INFO  lemurs] Switching to tty 2
[INFO  lemurs] UI booted up
[INFO  lemurs::info_caching] Attempting to get a cached information from '/var/cache/lemurs'
[INFO  lemurs::info_caching] Read cache file and found environment 'xinitrc\nmephisto' and username 'None'
[INFO  lemurs::ui] Loading environment 'xinitrc\nmephisto' from cache
[WARN  lemurs::ui::switcher] Failed to find selection with title: 'xinitrc\nmephisto'
[INFO  lemurs] Starting new session for 'mephisto' in environment 'Wayland { script_path: "/etc/lemurs/wayland/ubuntu" }'
[ERROR lemurs::env_container] Could not find the working directory when taking snapshot
[INFO  lemurs::post_login::env_variables] Setting Display
[INFO  lemurs::env_container] Set environment variable 'DISPLAY' to ':1'
[INFO  lemurs::post_login::env_variables] Setting XDG Session Parameters
[INFO  lemurs::env_container] Set environment variable 'XDG_SESSION_CLASS' to 'user'
[INFO  lemurs::env_container] Set environment variable 'XDG_SESSION_TYPE' to 'wayland'
[INFO  lemurs::auth] Login attempt for 'mephisto'
[INFO  lemurs::auth::pam] Started opening session
[INFO  lemurs::auth::pam] Gotten Authenticator
[INFO  lemurs::auth::pam] Got handler
[INFO  lemurs::auth::pam] Validated account
[INFO  lemurs::auth] Authentication failed for 'mephisto'. Reason: Failed to open a PAM session
[INFO  lemurs::env_container] Removing session environment variables
[INFO  lemurs::env_container] Reverting to environment before session
[ERROR lemurs::env_container] Failed to change the working directory back to


➜  ~ cat /var/log/auth.log
Mar  7 13:50:12 workpc systemd-logind[3982]: New seat seat0.
Mar  7 13:50:12 workpc systemd-logind[3982]: Watching system buttons on /dev/input/event2 (Power Button)
Mar  7 13:50:12 workpc systemd-logind[3982]: Watching system buttons on /dev/input/event1 (Lid Switch)
Mar  7 13:50:12 workpc systemd-logind[3982]: Watching system buttons on /dev/input/event0 (Sleep Button)
Mar  7 13:50:12 workpc systemd-logind[3982]: Watching system buttons on /dev/input/event5 (CHERRY Mechanical Keyboard)
Mar  7 13:50:12 workpc systemd-logind[3982]: Watching system buttons on /dev/input/event6 (CHERRY Mechanical Keyboard)
Mar  7 13:50:12 workpc systemd-logind[3982]: Watching system buttons on /dev/input/event3 (AT Translated Set 2 keyboard)
Mar  7 13:50:26 workpc lemurs: pam_loginuid(lemurs:session): Error writing /proc/self/loginuid: Operation not permitted
Mar  7 13:50:26 workpc lemurs: pam_loginuid(lemurs:session): set_loginuid failed
Mar  7 13:50:26 workpc lemurs: pam_unix(lemurs:session): session opened for user mephisto(uid=1000) by (uid=0)
Mar  7 13:50:26 workpc systemd-logind[3982]: New session c1 of user mephisto.
Mar  7 13:50:26 workpc systemd: pam_unix(systemd-user:session): session opened for user mephisto(uid=1000) by (uid=0)
Mar  7 13:50:30 workpc systemd: pam_unix(login:session): session opened for user mephisto(uid=1000) by (uid=0)
Mar  7 13:50:30 workpc systemd: pam_unix(login:session): session closed for user mephisto
Mar  7 13:50:30 workpc dbus-daemon[3944]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.507" (uid=1000 pid=6165 comm="(sd-pam)" label="unconfined") interface="org.freedesktop.login1.Manager" member="ReleaseSession" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=3982 comm="/lib/systemd/systemd-logind" label="unconfined")
Mar  7 13:50:30 workpc systemd: pam_systemd(login:session): Failed to release session: Access denied
Mar  7 13:50:32 workpc systemd: pam_unix(login:session): session opened for user mephisto(uid=1000) by (uid=0)
Mar  7 13:50:32 workpc systemd: pam_unix(login:session): session closed for user mephisto
Mar  7 13:50:32 workpc dbus-daemon[3944]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.540" (uid=1000 pid=6252 comm="(sd-pam)" label="unconfined") interface="org.freedesktop.login1.Manager" member="ReleaseSession" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=3982 comm="/lib/systemd/systemd-logind" label="unconfined")
Mar  7 13:50:32 workpc systemd: pam_systemd(login:session): Failed to release session: Access denied
Mar  7 13:50:36 workpc login[6218]: pam_unix(login:session): session opened for user mephisto(uid=1000) by LOGIN(uid=0)
Mar  7 13:50:36 workpc systemd-logind[3982]: New session 4 of user mephisto.
Mar  7 13:51:23 workpc sudo: mephisto : TTY=tty3 ; PWD=/home/mephisto ; USER=root ; COMMAND=/usr/local/bin/vim /var/log/lemurs.log
Mar  7 13:51:23 workpc sudo: pam_unix(sudo:session): session opened for user root(uid=0) by mephisto(uid=1000)
Mar  7 13:51:30 workpc sudo: pam_unix(sudo:session): session closed for user root
Mar  7 13:51:37 workpc sudo: mephisto : TTY=tty3 ; PWD=/home/mephisto ; USER=root ; COMMAND=/usr/local/bin/vim /var/log/auth.log
Mar  7 13:51:37 workpc sudo: pam_unix(sudo:session): session opened for user root(uid=0) by mephisto(uid=1000)
---------------lemurs:above---------------------------gdm3:below-----------------------------------------------------------------
Mar  7 13:57:22 workpc systemd-logind[4040]: New seat seat0.
Mar  7 13:57:22 workpc systemd-logind[4040]: Watching system buttons on /dev/input/event2 (Power Button)
Mar  7 13:57:22 workpc systemd-logind[4040]: Watching system buttons on /dev/input/event1 (Lid Switch)
Mar  7 13:57:22 workpc systemd-logind[4040]: Watching system buttons on /dev/input/event0 (Sleep Button)
Mar  7 13:57:22 workpc systemd-logind[4040]: Watching system buttons on /dev/input/event5 (CHERRY Mechanical Keyboard)
Mar  7 13:57:22 workpc systemd-logind[4040]: Watching system buttons on /dev/input/event6 (CHERRY Mechanical Keyboard)
Mar  7 13:57:22 workpc systemd-logind[4040]: Watching system buttons on /dev/input/event3 (AT Translated Set 2 keyboard)
Mar  7 13:57:23 workpc gdm-launch-environment]: pam_env(gdm-launch-environment:session): deprecated reading of user environment enabled
Mar  7 13:57:23 workpc gdm-launch-environment]: pam_unix(gdm-launch-environment:session): session opened for user gdm(uid=127) by (uid=0)
Mar  7 13:57:23 workpc systemd-logind[4040]: New session c1 of user gdm.
Mar  7 13:57:23 workpc systemd: pam_unix(systemd-user:session): session opened for user gdm(uid=127) by (uid=0)
Mar  7 13:57:28 workpc polkitd(authority=local): Registered Authentication Agent for unix-session:c1 (system bus name :1.83 [/usr/bin/gnome-shell], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Mar  7 13:57:45 workpc gdm-password]: gkr-pam: unable to locate daemon control file
Mar  7 13:57:45 workpc gdm-password]: gkr-pam: stashed password to try later in open session
Mar  7 13:57:45 workpc gdm-password]: pam_env(gdm-password:session): deprecated reading of user environment enabled
Mar  7 13:57:45 workpc gdm-password]: pam_unix(gdm-password:session): session opened for user mephisto(uid=1000) by (uid=0)
Mar  7 13:57:45 workpc systemd-logind[4040]: New session 2 of user mephisto.
Mar  7 13:57:45 workpc systemd: pam_unix(systemd-user:session): session opened for user mephisto(uid=1000) by (uid=0)
Mar  7 13:57:45 workpc gdm-password]: gkr-pam: unlocked login keyring
Mar  7 13:57:46 workpc systemd: pam_unix(login:session): session opened for user mephisto(uid=1000) by (uid=0)
Mar  7 13:57:46 workpc gnome-keyring-daemon[6167]: The PKCS#11 component was already initialized
Mar  7 13:57:46 workpc gnome-keyring-daemon[6384]: discover_other_daemon: 1
Mar  7 13:57:46 workpc systemd: pam_unix(login:session): session closed for user mephisto
Mar  7 13:57:46 workpc dbus-daemon[4003]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.432" (uid=1000 pid=6372 comm="(sd-pam)" label="unconfined") interface="org.freedesktop.login1.Manager" member="ReleaseSession" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=4040 comm="/lib/systemd/systemd-logind" label="unconfined")
Mar  7 13:57:46 workpc systemd: pam_systemd(login:session): Failed to release session: Access denied
Mar  7 13:57:46 workpc gnome-keyring-daemon[6167]: The Secret Service was already initialized
Mar  7 13:57:46 workpc gnome-keyring-daemon[6387]: discover_other_daemon: 1
Mar  7 13:57:46 workpc gnome-keyring-daemon[6389]: discover_other_daemon: 1
Mar  7 13:57:48 workpc polkitd(authority=local): Registered Authentication Agent for unix-session:2 (system bus name :1.434 [/usr/bin/gnome-shell], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Mar  7 13:57:52 workpc gdm-launch-environment]: pam_unix(gdm-launch-environment:session): session closed for user gdm
Mar  7 13:57:52 workpc systemd-logind[4040]: Session c1 logged out. Waiting for processes to exit.
Mar  7 13:57:52 workpc systemd-logind[4040]: Removed session c1.
Mar  7 13:58:01 workpc polkitd(authority=local): Unregistered Authentication Agent for unix-session:c1 (system bus name :1.83, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Mar  7 13:58:01 workpc PackageKit: uid 1000 is trying to obtain org.freedesktop.packagekit.system-sources-refresh auth (only_trusted:0)
Mar  7 13:58:01 workpc PackageKit: uid 1000 obtained auth for org.freedesktop.packagekit.system-sources-refresh
Mar  7 13:58:01 workpc gnome-keyring-daemon[6167]: asked to register item /org/freedesktop/secrets/collection/login/2, but it's already registered
Mar  7 13:59:45 workpc dbus-daemon[6161]: [session uid=1000 pid=6161] Failed to activate service 'org.freedesktop.Tracker3.Miner.Files': timed out (service_start_timeout=120000ms)
Mar  7 14:00:48 workpc sudo: mephisto : TTY=pts/5 ; PWD=/home/mephisto ; USER=root ; COMMAND=/usr/local/bin/vim /var/log/auth.log
Mar  7 14:00:48 workpc sudo: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
Mar  7 14:01:45 workpc dbus-daemon[6161]: [session uid=1000 pid=6161] Failed to activate service 'org.freedesktop.Tracker3.Miner.Files': timed out (service_start_timeout=120000ms)
Mar  7 14:03:14 workpc sudo: pam_unix(sudo:session): session closed for user root
Mar  7 14:03:15 workpc sudo: mephisto : TTY=pts/5 ; PWD=/home/mephisto ; USER=root ; COMMAND=/usr/local/bin/vim /var/log/auth.log
Mar  7 14:03:15 workpc sudo: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)

➜  lemurs git:(main) ✗ git log | head -n 5
commit d84deacb2b5da69663e5f6c825b43629957c0a4f
Author: Gijs Burghoorn <[email protected]>
Date:   Fri Mar 3 23:03:31 2023 +0100
    Add `shell_login_flag` option in config (#129)

Hi, I pull the latest main branch(no dev branch exist), at lemurs.log: [INFO lemurs::auth] Authentication failed for 'mephisto'. Reason: Failed to open a PAM session at auth.log: Mar 7 13:50:26 workpc lemurs: pam_loginuid(lemurs:session): Error writing /proc/self/loginuid: Operation not permitted Mar 7 13:50:26 workpc lemurs: pam_loginuid(lemurs:session): set_loginuid failed By the way

  1. if lemurs.log would add timestamp info at the beginning of each line, that may helpful for multi times test.
  2. libpam-dev has updated to libpam0g-dev at Ubuntu 22.10.
➜  ~ sudo apt install libpam-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libpam0g-dev' instead of 'libpam-dev'
libpam0g-dev is already the newest version (1.5.2-2ubuntu1.3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
➜  ~ cat /etc/issue
Ubuntu 22.10 \n \l

kmephistoh avatar Mar 07 '23 06:03 kmephistoh

Hey @Relwi, you were probably experiencing the same issue as #131. After resolving that issue, I can now run LabWC just fine. (Where it didn't before for me).

Thank you a lot for this debugging. I am talking to the maintainer of the pam crate because there seem to be some problems on that side. I will come back to this.

coastalwhite avatar Mar 09 '23 19:03 coastalwhite

Yep, I recently updated the package and is working now, thanks!

Relwi avatar Mar 09 '23 20:03 Relwi

Speaking of pam, I think you should include libpam0g-dev for building at Ubuntu 22.04

kqvanity avatar May 15 '24 23:05 kqvanity