Disable Password Prompt in xrdp Session on Ubuntu

Disable Password Prompt in xrdp Session on Ubuntu

Remote Desktop Protocol (RDP) is a convenient way to access the Ubuntu system remotely. The xrdp is a popular open-source implementation of RDP server that allows to connect to the Ubuntu desktop from another device. The frequent password prompts during various tasks in the xrdp session can be quite annoying and frustrating, significantly decreasing the overall user experience and making remote desktop access less convenient. This tutorial shows how to disable password prompt in xrdp session on Ubuntu.

We will use a policy file to configure xrdp to allow sessions without password prompts. You can create or edit this file with a text editor or use the terminal to do it. In this example, we'll use the terminal. Run the following commands:

FILE=/etc/polkit-1/localauthority/90-mandatory.d/99-xrdp.pkla
echo '[xRDP All Actions Allowed]' | sudo tee -a $FILE
echo 'Identity=unix-user:*' | sudo tee -a $FILE
echo 'Action=*' | sudo tee -a $FILE
echo 'ResultAny=yes' | sudo tee -a $FILE
echo 'ResultInactive=yes' | sudo tee -a $FILE
echo 'ResultActive=yes' | sudo tee -a $FILE

These commands create a policy file at the specified location and configure it to allow xrdp sessions without password prompts for any user.

Here's a breakdown of the rules:

  • Identity=unix-user:* - specifies that this policy applies to all users.
  • Action=* - allowing this policy to cover all actions.
  • ResultAny=yes - specifies that the result should be "yes" for any action, meaning that any action allowed by this policy should be permitted without further authentication.
  • ResultInactive=yes - indicating that the policy should still apply even when the user's session is inactive.
  • ResultActive=yes - indicating that the policy should apply even when the user's session is active.

In summary, the series of echo commands appends specific policy rules to the 99-xrdp.pkla file, effectively configuring Polkit to allow xrdp sessions without password prompts for all users, for all actions, and in both active and inactive sessions.

Leave a Comment

Cancel reply

Your email address will not be published.