Skip to content

No user session created with xrdp and pam_systemd_home account module #1684

@usul0184

Description

@usul0184

Thanks for a great program! Newbie here, apologies for any inaccuracies. A recent change to the PAM configuration files in Arch repositories seems to be causing problems with xrdp. The current version of /etc/pam.d/system-auth contains the following account section:

-account   [success=1 default=ignore]  pam_systemd_home.so
account    required                    pam_unix.so
account    optional                    pam_permit.so
account    required                    pam_time.so

The first line, -account [success=1 default=ignore] pam_systemd_home.so, results in no user session being created in xrdp. The output of loginctl session-status is Could not get properties: Unknown object '/org/freedesktop/login1/session/auto'. This causes problems like being unable to start a polkit authentication agent.

For debug purposes, I’ve changed the malfunctioning pam_systemd_home.so line to account [default=ignore] pam_systemd_home.so debug. journalctl shows the following in what I think relevant part when connecting to xrdp:

Sep 08 18:13:45 bigone xrdp-sesman[642]: pam_systemd_home(xrdp-sesman:account): pam-systemd-homed account management
Sep 08 18:13:45 bigone dbus-daemon[618]: [system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-org.freedesktop.home1.service' requested by ':1.1543' (uid=0 pid=642 comm="/usr/bin/xrdp-sesman --nodaemon ")
Sep 08 18:13:45 bigone dbus-daemon[618]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.home1.service': Unit dbus-org.freedesktop.home1.service not found.
Sep 08 18:13:45 bigone xrdp-sesman[642]: pam_systemd_home(xrdp-sesman:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Sep 08 18:13:45 bigone xrdp-sesman[642]: (642)(140313509857088)[INFO ] ++ created session (access granted): username esyu, ip 192.168.84.210:64145 - socket: 12
Sep 08 18:13:45 bigone xrdp-sesman[642]: (642)(140313509857088)[INFO ] starting Xvnc session...
Sep 08 18:13:45 bigone xrdp-sesman[642]: (642)(140313509857088)[DEBUG] Closed socket 38 (AF_INET 0.0.0.0:5910)
Sep 08 18:13:45 bigone xrdp-sesman[23600]: (23600)(140313509857088)[INFO ] calling auth_start_session from pid 23600
Sep 08 18:13:45 bigone xrdp[645]: (645)(140514163267136)[INFO ] xrdp_wm_log_msg: login successful for display 10
Sep 08 18:13:45 bigone xrdp-sesman[23600]: pam_systemd(xrdp-sesman:session): Failed to create session: No child processes
Sep 08 18:13:47 bigone xrdp-sesman[23731]: Failed to connect to session manager: Failed to connect to the session manager: Could not open network socket
Sep 08 18:13:52 bigone xrdp-sesman[23731]: xfsettingsd: No window manager registered on screen 0.
Sep 08 18:13:52 bigone xfsettingsd[23731]: Failed to get the _NET_NUMBER_OF_DESKTOPS property.

If the pam_systemd_home.so line is removed, everything works fine. Note that I do not have systemd-homed running. Xorg vs Xvnc makes no difference, nor does having a startwm.sh with just exec xterm in it.

Not sure if this is an xrdp problem or something else; for what it’s worth, local login and ssh work fine.

Additional info:

  • OS and version: Manjaro 18.0 XFCE Edition
  • xrdp version: 0.9.14
  • xorgxrdp version: 0.2.14
  • Client OS / Client software: Windows 10 Remote Desktop Connection
  • Desktop: Xfce (but likely irrelevant; even xterm fails)
  • Backend: Both Xorg and Xvnc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions