RDP file with embedded password asks for password
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:
Related videos on Youtube
Ganesh Satpute
Computer Software professional. Enthusiast in programming, Java and Hadoop
Updated on September 18, 2022Comments
-
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 over 6 yearsHave tried that but still asks me for my password.
-
Angel Porlan over 6 yearsCheck the message that it gives to you. Maybe a GPO is blocking you to login withouth giving creds
-
Ganesh Satpute over 6 yearsI've disabled the value as per your suggestion but it still asks for my password.
-
Ganesh Satpute over 6 yearsIt's not giving any message saying GPO is blocking the login.
-
Ganesh Satpute over 6 yearsThis 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 about 5 yearsI found that Powershell's
ConvertFrom-SecureString
also works instead of needing thatcryptRDP5.exe
-
BrainSlugs83 about 5 yearsFor reference, the full powershell command to encrypt a password using the above would be
("MySuperSecretPassword!" | ConvertTo-SecureString -AsPlainText -Force) | ConvertFrom-SecureString;
-
Artem almost 5 yearsThanks, worked for me in combination with
username:s:myuser
andpassword 51:b:myEncryptedPassword
. -
Jason Lee almost 5 yearsIs there a linux/osx equivalent of
cryptRDP5.exe
? -
NetMage over 3 yearsThat appears to be for MacOS, not Windows.
-
DracoBlue over 3 yearsI 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 over 3 yearsWindows doesn't have app preferences.
-
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 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 fromConvertFrom-SecureString
doesn't. Why is that? -
lenz over 2 yearsthis worked for me on macos thank you