Xrdp stopped working on 16.04 3B+

I having been using xrdp on Mate 16.04 and 18.04 installed on my 3B+ for weeks. I have been accessing the Pi using a RDP connection on Remmina on my Linux Mint laptop and with remote desktop on my win 10 laptop without issue. I just restored my 16.04 image to the Pi and for no good reason, xrdp no longer connects. Instead I get the error message below. The Pi’s ip address and all other settings have not changed. Any ideas would be appreciated.

error

The error message explains it all. The password you entered to connect to your Pi is incorrect. Try changing the password, and then trying the new password to connect.

Thanks for replying. The strange thing about this is that the password is correct. I even changed my Mate user password and also changed it for my Remmina rdp connection to match, rebooted and got the same error. I then changed it back to the original password in Mate and in Remmina and got the same error.

There is something else going on and it has nothing to do with the password in spite of what the error is reporting. Very weird…

I can only think of a few things:

  • The keyboard layout - perhaps the wrong characters are being typed within the XRDP session. For instance, a " on a :gb: keyboard ends up typing a @ (:us: layout).

  • XRDP needs restarting after a password change:

    sudo service xrdp restart
    

    https://www.raspberrypi.org/forums/viewtopic.php?t=31814

  • Somehow, somewhere, there’s a file that’s got the wrong permissions and/or isn’t reading the password correctly. You could try re-installing XRDP and purging its configuration:

    sudo apt remove --purge xrdp
    sudo apt install xrdp
    

Since (presumably) the backup and restore were done using image files (.img), it is odd why it’s not restored 1:1.

I finally found out why my xrdp connection started to fail on my 3B+ Mate 16.04 installation for no obvious reason. The short answer is that there was a xrdp upgrade on 1/10/19 that took the version from 0.6.1-2 up to 0.6.1-2ubuntu0.1. Downgrading xrdp back to 0.6.1-2 resolves the password failed error and fixes the problem.

Instead of downgrading xrdp, perhaps a better option is to add the following 2 lines to the [Xvnc] section of etc/xrdp/sesman.ini:
param8=-SecurityTypes
param9=None

This is the solution I chose based on post #3 on the bugs.launchpad.net page linked below which discusses this issue.
https://bugs.launchpad.net/ubuntu/+source/xrdp/+bug/1811122