gnome-remote-desktop.service: Failed to determine user credentials: No such process

Bug #2063333 reported by Heinrich Schuchardt
82
This bug affects 15 people
Affects Status Importance Assigned to Milestone
gnome-remote-desktop (Debian)
New
Unknown
gnome-remote-desktop (Ubuntu)
Triaged
High
Unassigned
Noble
Fix Released
High
Jeremy Bícha

Bug Description

Impact
------
GNOME Remote Desktop won't work for systems that were upgraded from earlier Ubuntu releases.

Test Case
---------
Install Ubuntu Desktop 23.10
Upgrade to 24.04 LTS
Successfully complete both the Basic RDP and Basic Remote Login test cases from https://wiki.ubuntu.com/DesktopTeam/TestPlans/RemoteDesktop

What Could Go Wrong
-------------------
The small debian/rules change ensures that systemd-sysusers is run and that it is run after systemd-tmpfiles.

Both systemd-* commands are limited to only run the gnome-remote-desktop conf files.

The conffiles simply create the gnome-remote-desktop user with an appropriate user directory and ensure the existence of /etc/gnome-remote-desktop/

This is the minimal change needed to fix this bug.

GNOME Remote Desktop only works with GNOME Shell so this change only affects Ubuntu Desktop and Edubuntu. This change has no effect on new Ubuntu 24.04 LTS installs because the user and user directory are already created by the installer. It enables remote desktop to work for systems that upgrade to Ubuntu 24.04 LTS. Remote desktop can be a critical feature for some users who may not have local access to the system they are trying to use. However, this feature is a bit less useful before Ubuntu 24.04 LTS which is the first version to support headless remote desktop using RDP.

Other Info
----------
The added lines to postinst are marked with a leading +:

 # Automatically added by dh_installtmpfiles/13.15.3
 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
  if [ -x "$(command -v systemd-tmpfiles)" ]; then
   systemd-tmpfiles ${DPKG_ROOT:+--root="$DPKG_ROOT"} --create
 gnome-remote-desktop-tmpfiles.conf || true
  fi
 fi
 # End automatically added section
+# Automatically added by dh_installsysusers/13.15.3
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-+deconfigure" ] || [ "$1" = "abort-remove" ] ; then
+ systemd-sysusers ${DPKG_ROOT:+--root="$DPKG_ROOT"} gnome-remote-desktop-sysusers.conf
+fi
+
+# End automatically added section
+# Automatically added by dh_installtmpfiles/13.15.3
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
+  if [ -x "$(command -v systemd-tmpfiles)" ]; then
+  systemd-tmpfiles ${DPKG_ROOT:+--root="$DPKG_ROOT"} --create
+gnome-remote-desktop-tmpfiles.conf || true
+ fi
+fi
+# End automatically added section

 # Automatically added by dh_installsystemduser/13.15.3
 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort- deconfigure" ] || [ "$1" = "abort-remove" ] ; then
 if [ -z "${DPKG_ROOT:-}" ]; then
   if deb-systemd-helper --user debian-installed 'gnome-remote-desktop-handover.service' ; then
    # The following line should be removed in trixie or
 trixie+1
    deb-systemd-helper --user unmask 'gnome-remote-desktop-handover.service' >/dev/null || true

Workaround
----------
If you are affected by this issue, you can safely run the same 3 commands that this upgrade would run:

sudo systemd-tmpfiles --create /usr/lib/tmpfiles.d/gnome-remote-desktop-tmpfiles.conf

sudo systemd-sysusers /usr/lib/sysusers.d/gnome-remote-desktop-sysusers.conf

sudo systemd-tmpfiles --create /usr/lib/tmpfiles.d/gnome-remote-desktop-tmpfiles.conf

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: gnome-remote-desktop 46.1-1
ProcVersionSignature: Ubuntu 6.8.0-31.31.1-generic 6.8.1
Uname: Linux 6.8.0-31-generic riscv64
ApportVersion: 2.28.1-0ubuntu2
Architecture: riscv64
CasperMD5json:
 {
   "result": "skip"
 }
Date: Wed Apr 24 12:34:26 2024
InstallationDate: Installed on 2024-04-24 (0 days ago)
InstallationMedia: Ubuntu-Server 24.04 LTS "Noble Numbat" - Release riscv64 (20240423)
SourcePackage: gnome-remote-desktop
UpgradeStatus: No upgrade log present (probably fresh install)

CVE References

Revision history for this message
Heinrich Schuchardt (xypron) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-remote-desktop (Ubuntu):
status: New → Confirmed
Revision history for this message
Alexander Carlsson (hedgehogform) wrote (last edit ):

I'm having this issue on Raspberry Pi 4 Ubuntu server 24.04.

Linux ubuntu 6.8.0-1004-raspi #4-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 02:29:55 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

PRETTY_NAME="Ubuntu 24.04 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04 LTS (Noble Numbat)"
VERSION_CODENAME=noble

ubuntu@ubuntu:~$ sudo systemctl status gnome-remote-desktop
× gnome-remote-desktop.service - GNOME Remote Desktop
     Loaded: loaded (/usr/lib/systemd/system/gnome-remote-desktop.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Tue 2024-04-30 21:58:11 UTC; 11min ago
    Process: 1741 ExecStart=/usr/libexec/gnome-remote-desktop-daemon --system (code=exited, status=217/USER)
   Main PID: 1741 (code=exited, status=217/USER)
        CPU: 10ms

Apr 30 21:58:11 ubuntu systemd[1]: gnome-remote-desktop.service: Scheduled restart job, restart counter is at 5.
Apr 30 21:58:11 ubuntu systemd[1]: gnome-remote-desktop.service: Start request repeated too quickly.
Apr 30 21:58:11 ubuntu systemd[1]: gnome-remote-desktop.service: Failed with result 'exit-code'.
Apr 30 21:58:11 ubuntu systemd[1]: Failed to start gnome-remote-desktop.service - GNOME Remote Desktop.

Revision history for this message
Robert Fletcher (robrotheram) wrote :

Also seeing the same issue on a headless server (Linode) 24.04 Ubuntu server
Installed ubuntu-desktop

cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo

journalctl -xeu gnome-remote-desktop.service
Apr 30 10:16:39 localhost systemd[1]: Starting gnome-remote-desktop.service - GNOME Remote Desktop...
░░ Subject: A start job for unit gnome-remote-desktop.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit gnome-remote-desktop.service has begun execution.
░░
░░ The job identifier is 2929.
Apr 30 10:16:39 localhost (p-daemon)[1613]: gnome-remote-desktop.service: Failed to determine user credentials: No such process
Apr 30 10:16:39 localhost systemd[1]: gnome-remote-desktop.service: Main process exited, code=exited, status=217/USER
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ An ExecStart= process belonging to unit gnome-remote-desktop.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 217.

Revision history for this message
Sebastien Bacher (seb128) wrote :

/usr/lib/systemd/system/gnome-remote-desktop.service has
User=gnome-remote-desktop

But it seems that user isn't created by the package? I wonder if that would part of the issue but then it should be happening also on other systems...

Could you try to manually start
$ /usr/libexec/gnome-remote-desktop-daemon --system
and see if that prints a more explicit error maybe?

Changed in gnome-remote-desktop (Ubuntu):
importance: Undecided → High
Revision history for this message
Robert Fletcher (robrotheram) wrote :

Nothing really reported from running the above command

/usr/libexec/gnome-remote-desktop-daemon --system

** (gnome-remote-desktop-daemon:36048): WARNING **: 11:01:25.879: Init TPM credentials failed because No TPM device found, using GKeyFile as fallback

But no ports are open

netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 29997/cupsd
tcp 0 0 127.0.0.54:53 0.0.0.0:* LISTEN 16105/systemd-resol
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 16105/systemd-resol
tcp6 0 0 ::1:631 :::* LISTEN 29997/cupsd
tcp6 0 0 :::22 :::* LISTEN 1/systemd

I restarted GDM3

ps -aux | grep gnome
gdm 35757 0.0 0.6 233060 6144 tty1 Ssl+ 11:01 0:00 /usr/libexec/gdm-wayland-session dbus-run-session -- gnome-session --autostart /usr/share/gdm/greeter/autostart
gdm 35761 0.0 0.2 6500 2432 tty1 S+ 11:01 0:00 dbus-run-session -- gnome-session --autostart /usr/share/gdm/greeter/autostart
gdm 35763 0.0 1.8 518252 18304 tty1 Sl+ 11:01 0:00 /usr/libexec/gnome-session-binary --autostart /usr/share/gdm/greeter/autostart
gdm 35772 1.0 22.0 3251940 217456 tty1 Sl+ 11:01 0:01 /usr/bin/gnome-shell
gdm 35799 0.0 0.7 236060 7552 tty1 Sl+ 11:01 0:00 /usr/libexec/at-spi2-registryd --use-gnome-session
gdm 35822 0.0 2.7 2590472 26852 tty1 Sl+ 11:01 0:00 /usr/bin/gjs -m /usr/share/gnome-shell/org.gnome.Shell.Notifications
gdm 36027 0.0 2.7 2590464 26860 tty1 Sl+ 11:01 0:00 /usr/bin/gjs -m /usr/share/gnome-shell/org.gnome.ScreenSaver
root 36090 0.0 1.7 439656 16896 ttyS0 Sl+ 11:02 0:00 /usr/libexec/gnome-remote-desktop-daemon --system

Revision history for this message
Sebastien Bacher (seb128) wrote :

Does it work if you create the user by running

$ sudo systemd-sysusers

?

Revision history for this message
Robert Fletcher (robrotheram) wrote (last edit ):

That command did create some users
Restarting gnome remote desktop now gives me

░░ Subject: A start job for unit gnome-remote-desktop.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit gnome-remote-desktop.service has begun execution.
░░
░░ The job identifier is 52156.
May 02 14:27:47 localhost gnome-remote-de[36906]: Init TPM credentials failed because No TPM device found, using GKeyFile as fallback
May 02 14:27:47 localhost gnome-remote-de[36906]: Init file credentials failed: Error creating directory /var/lib/gnome-remote-desktop: Permission denied
May 02 14:27:47 localhost gnome-remote-desktop-daemon[36906]: **
May 02 14:27:47 localhost gnome-remote-desktop-daemon[36906]: ERROR:../src/grd-settings.c:345:grd_settings_constructed: assertion failed: (priv->credentials)
May 02 14:27:47 localhost gnome-remote-desktop-daemon[36906]: Bail out! ERROR:../src/grd-settings.c:345:grd_settings_constructed: assertion failed: (priv->credentials)
May 02 14:27:47 localhost systemd[1]: gnome-remote-desktop.service: Main process exited, code=dumped, status=6/ABRT
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ An ExecStart= process belonging to unit gnome-remote-desktop.service has exited.
░░
░░ The process' exit code is 'dumped' and its exit status is 6.

Running: /usr/libexec/gnome-remote-desktop-daemon --system

** (gnome-remote-desktop-daemon:36919): WARNING **: 14:30:22.681: Init TPM credentials failed because No TPM device found, using GKeyFile as fallback
Failed to register: Unable to acquire bus name 'org.gnome.RemoteDesktop'

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Robert, do things work if you log out and log back in without trying to invoke gnome-remote-desktop manually?

Changed in gnome-remote-desktop (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Jeremy Bícha (jbicha) wrote :

There is some initial configuration you should do in the GNOME Settings app (gnome-control-center) > System > Remote Desktop > Remote Login before you can later use your computer headless via RDP.

Revision history for this message
Robert Fletcher (robrotheram) wrote :

I using it in a cloud provider using ssh, I want to be able to configure it completely headless. I can not log into the UI.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Robert, could you open a new bug for your issue? This bug is specifically about systemd-sysusers not having been run automatically for upgrades and we are going to work on a fix for that.

Your user might actually be more of a documentation/support issue about which specific commands to run to configure gnome-remote-desktop if you can't or don't want to use gnome-control-center. But it is a problem that we do not have enough documentation for that use case so I think a bug report would be helpful.

Revision history for this message
Robert Fletcher (robrotheram) wrote :

Will do,

Revision history for this message
Alex Stanhope (alexstanhope) wrote :

(TL;DR Now works for me). I too encountered this issue (same error message as OP) on a Raspberry Pi 5.

cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo

I followed the suggestions made in this post:
gnome-control-center
sudo systemd-sysusers

I rebooted the device to restart all daemons. The gnome-remote-desktop.service came up:
sudo systemctl status gnome-remote-desktop.service
● gnome-remote-desktop.service - GNOME Remote Desktop
     Loaded: loaded (/usr/lib/systemd/system/gnome-remote-desktop.service; enabled; preset: enabled)
     Active: active (running) since Fri 2024-05-03 09:03:09 BST; 12min ago
   Main PID: 1165 (gnome-remote-de)
      Tasks: 4 (limit: 9066)
     Memory: 13.4M (peak: 13.9M)
        CPU: 80ms
     CGroup: /system.slice/gnome-remote-desktop.service
             └─1165 /usr/libexec/gnome-remote-desktop-daemon --system

May 03 09:03:09 iodic systemd[1]: Starting gnome-remote-desktop.service - GNOME Remote Desktop...
May 03 09:03:09 iodic gnome-remote-de[1165]: Init TPM credentials failed because No TPM device found, using GKeyFile as fallback
May 03 09:03:09 iodic systemd[1]: Started gnome-remote-desktop.service - GNOME Remote Desktop.

The minor TPM warning seems to be inconsequential because my device doesn't have a TPM. I was able to connect to the remote desktop on port 3389.

Revision history for this message
IgorP (igorep) wrote :

I had the same problem reported in this bug, on my notebook.

After executing the command:
$ sudo systemd-sysusers

The user has been created
gnome-remote-desktop:x:989:989:GNOME Remote Desktop:/var/lib/gnome-remote-desktop:/usr/sbin/nologin

I restarted the notebook and the service started working:
● gnome-remote-desktop.service - GNOME Remote Desktop
     Loaded: loaded (/usr/lib/systemd/system/gnome-remote-desktop.service; enabled; preset: enabled)
     Active: active (running) since Fri 2024-05-03 08:02:27 -03; 7min ago
   Main PID: 1082 (gnome-remote-de)
      Tasks: 4 (limit: 47715)
     Memory: 14.2M (peak: 18.2M)
        CPU: 1.286s
     CGroup: /system.slice/gnome-remote-desktop.service
             └─1082 /usr/libexec/gnome-remote-desktop-daemon --system

Strangely, on another notebook I have, I performed the update and the user was created automatically. I believe it is because the notebook that automatically installed has only 1 user, while the one that returned the error described in the bug has 2 users.

Revision history for this message
Universitaet Augsburg (ubuntu-admin-v) wrote :

We had the same problem (on amd64).

It turned out that gnome-remote-desktop wasn't the cause of the login
screen not showing up. The cause was that we created /etc/nologin during
installation and that file isn't removed anymore by 'shutdown' (it used
to in previous releases, at least up to 22.04). We now use /run/nologin.

Changed in gnome-remote-desktop (Debian):
status: Unknown → New
Jeremy Bícha (jbicha)
Changed in gnome-remote-desktop (Ubuntu Noble):
status: New → Triaged
importance: Undecided → High
Changed in gnome-remote-desktop (Ubuntu):
status: Triaged → Fix Committed
Jeremy Bícha (jbicha)
tags: added: block-proposed
Jeremy Bícha (jbicha)
description: updated
Changed in gnome-remote-desktop (Ubuntu Noble):
assignee: nobody → Jeremy Bícha (jbicha)
description: updated
Changed in gnome-remote-desktop (Debian):
status: New → Fix Released
Jeremy Bícha (jbicha)
description: updated
Jeremy Bícha (jbicha)
Changed in gnome-remote-desktop (Ubuntu):
status: Fix Committed → Triaged
Revision history for this message
Jeremy Bícha (jbicha) wrote :

Fixing this issue is a bit more complicated so we're still working through how to do it correctly: https://bugs.debian.org/1070473

Revision history for this message
TheOne (theone) wrote :

> GNOME Remote Desktop won't work for systems that were upgraded from earlier Ubuntu releases.

I did not upgrade from an earlier release and still experienced that issue.

What I did was install ubuntu-24.04-live-server-arm64, then called "sudo apt install ubuntu-desktop".

Revision history for this message
Michael Ashley (mcba) wrote :

Yes, same here. I did a fresh installation of ubuntu-24.04-live-server-amd64 (not arm64) on two separate machines, and both experienced this bug on every reboot after "sudo apt install ubuntu-desktop".

Changed in gnome-remote-desktop (Debian):
status: Fix Released → New
Jeremy Bícha (jbicha)
tags: removed: block-proposed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-remote-desktop - 46.1-3

---------------
gnome-remote-desktop (46.1-3) experimental; urgency=medium

  * Ensure that dh_installtmpfiles is run before dh_installsysusers
  * Temporarily ignore build test failures on Debian

 -- Jeremy Bícha <email address hidden> Sun, 05 May 2024 19:37:58 -0400

Changed in gnome-remote-desktop (Ubuntu):
status: Triaged → Fix Released
Jeremy Bícha (jbicha)
Changed in gnome-remote-desktop (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-remote-desktop - 46.2-1~ubuntu24.04.2

---------------
gnome-remote-desktop (46.2-1~ubuntu24.04.2) noble-security; urgency=medium

  * debian/rules: ignore failing tests on armhf and riscv64.

gnome-remote-desktop (46.2-1~ubuntu24.04.1) noble; urgency=medium

  * No-change backport to noble

gnome-remote-desktop (46.2-1) experimental; urgency=medium

  * SECURITY UPDATE: New upstream release (LP: #2066306)
    - CVE-2024-5148 Limit login screen->user session handover access
      to appropriate user. This issue only affected the 46 series.
    - Various security hardening improvements
    - Potential crasher fix
    - Improved disconnection messages
    - Broader client compatibility support

gnome-remote-desktop (46.1-4) experimental; urgency=medium

  * Run dh_installtmpfiles, then dh_installsysfiles, then dh_installtmpfiles
    (LP: #2063333)

gnome-remote-desktop (46.1-3) experimental; urgency=medium

  * Ensure that dh_installtmpfiles is run before dh_installsysusers
    (LP: #2063333)
  * Temporarily ignore build test failures on Debian

gnome-remote-desktop (46.1-2) experimental; urgency=medium

  * Opt into Salsa CI
  * Simplify running dh_auto_test
  * Run dh_installsysusers & dh_installtmpfiles (Closes: #1070119)
    (LP: #2063333)

 -- Marc Deslauriers <email address hidden> Thu, 23 May 2024 07:50:49 -0400

Changed in gnome-remote-desktop (Ubuntu Noble):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.