RDP file with embedded password asks for password

78,660

Solution 1

I had the issue on Windows 10 with perma asking password when I try to connect to a new machine.

First, the password line in the RDP must be named:

password 51:b:myEncryptedPassword

And the pass must by encrypted. You can use cryptRDP5 to convert it: https://github.com/jps-networks-modifiedOSS/openvpn-als-applications/tree/master/adito-application-rdp-xplatform-embedded/src/windows

cryptRDP5.exe yourpassword

Note that the generated password is only valid for the machine that did it.

Solution 2

Open the Group Policy editor (Start > Run > gpedit.msc) and navigate to Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Connection Client

For value Do not allow passwords to be saved, check that is set to Disabled.

When connecting to a machine in Remote Desktop Connector, expand the Options panel and confirm that Allow me to save credentials is checked.

Solution 3

Try adding

prompt for credentials:i:0

Solution 4

I didn't managed to do this by modifying the .rdp. But a workaround is, to change the settings of the remote desktop connection application. In Preferences -> User Accounts you can add your account + password:

enter image description here

Share:
78,660

Related videos on Youtube

Ganesh Satpute
Author by

Ganesh Satpute

Computer Software professional. Enthusiast in programming, Java and Hadoop

Updated on September 18, 2022

Comments

  • Ganesh Satpute
    Ganesh Satpute over 1 year

    I've created one RDP file

    full address:s:10.20.30.40
    username:s:myuser
    password:s:mypassword
    domain:s:mydomain
    

    When I open this file it still asks me for the password. What can I do to tell RDP client to use password mentioned in the file instead of asking user?

  • Ganesh Satpute
    Ganesh Satpute over 6 years
    Have tried that but still asks me for my password.
  • Angel Porlan
    Angel Porlan over 6 years
    Check the message that it gives to you. Maybe a GPO is blocking you to login withouth giving creds
  • Ganesh Satpute
    Ganesh Satpute over 6 years
    I've disabled the value as per your suggestion but it still asks for my password.
  • Ganesh Satpute
    Ganesh Satpute over 6 years
    It's not giving any message saying GPO is blocking the login.
  • Ganesh Satpute
    Ganesh Satpute over 6 years
    This works only in case the password is encrypted/hashed. For plaintext password, it does not work. Is there any other policy which I've to check for this?
  • jtb
    jtb about 5 years
    I found that Powershell's ConvertFrom-SecureString also works instead of needing that cryptRDP5.exe
  • BrainSlugs83
    BrainSlugs83 about 5 years
    For reference, the full powershell command to encrypt a password using the above would be ("MySuperSecretPassword!" | ConvertTo-SecureString -AsPlainText -Force) | ConvertFrom-SecureString;
  • Artem
    Artem almost 5 years
    Thanks, worked for me in combination with username:s:myuser and password 51:b:myEncryptedPassword.
  • Jason Lee
    Jason Lee almost 5 years
    Is there a linux/osx equivalent of cryptRDP5.exe?
  • NetMage
    NetMage over 3 years
    That appears to be for MacOS, not Windows.
  • DracoBlue
    DracoBlue over 3 years
    I asume that a similiar option might be in windows version of this Microsoft product available, too. The main trick is not to modify the rdp file, but to put it in the Remote Desktop app preferences.
  • NetMage
    NetMage over 3 years
    Windows doesn't have app preferences.
  • NetMage
    NetMage over 3 years
    @BrainSlugs83 Note that it doesn't fully match rdp encryption which pads the password with zero bytes to be 512 bytes before encryption.
  • Saturnix
    Saturnix over 3 years
    cryptRDP5.exe MySuperSecretPassword gives a different result from the example in the second comment. In particular, the result from cryptRDP5.exe works, and the one from ConvertFrom-SecureString doesn't. Why is that?
  • lenz
    lenz over 2 years
    this worked for me on macos thank you