RDP connections fail when using authentication.

Discussions related to using VirtualBox on Windows hosts.
Post Reply
WhiteAngel
Posts: 9
Joined: 24. May 2011, 19:24
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: MS Windows Vista

RDP connections fail when using authentication.

Post by WhiteAngel »

Hi all,
I'm a very new user of VirtualBox.
Also, I can't speak english very well, so I hope you will forgive me for any lack in details and any unintelligible sentence I write.

The situation:
I installed VirtualBox (last version, 4.0.8) on my host, which runs Windows 7 Pro SP1 64-bit.
I created a new virtual machine for test purposes, and it runs Windows Vista Home Premium 64-bit (no Service Packs or updates installed).
I want to use another PC (with Windows XP SP3 32-bit) to estabilish an RDP connection with the guest (i.e. Windows Vista).

I set up VirtualBox to use the "Null" authentication method, and this way the RDP session works well (so it seems that there are no network problems).
But when I set up VirtualBox to use every other authentication method, the RDP client refuses to connect, and it gives me an error message which, translating it from italian to english, would be something like this:

"Remote desktop session ended.
The connection could be interrupted by the network administrator. Please retry to connect again or contact the technical support to request assistance."

Confirming this message causes another one to show up:
"The Remote Desktop session is going to be closed.
The virtual memory of the local computer could be insufficient. Close the other open programs and retry to connect to the remote computer."

Answering OK to this message closes my RDP client, which is the Microsoft's RDP client (latest version: 6.0.6001).
This problem comes up using both Guest and External authentication (the former should be not yet implemented, the latter does not work nor with VBoxAuth neither with VBoxAuthSimple authentication libraries).

So the question is: how to connect to the guest using my RDP client, providing at least a minimal level of security?
I cannot understand the meaning of the second message error, virtual memory is ok on both the host and the guest, and this is confirmed by the fact that I can estabilish the connection if I use no authentication.
Thanks in advance to all of you!

P.S.: using the VBoxAuthSimple.dll, I read the on-line help and they say how to put an authorized user into the "extradata" section of a virtual machine (setextradata command of VBoxManage.exe).
But now how can I remove the user I put there from the list??
Leak
Posts: 242
Joined: 31. Mar 2009, 13:00
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Debian Testing, Windows XP, Windows Server 2003/2008 R2

Re: RDP connections fail when using authentication.

Post by Leak »

If this is the error I'm thinking of, and you're trying to connect to the VM without supplying credentials (i.e. username and password) from the client before clicking on "Connect", then it's because VirtualBox doesn't have a remote UI to enter a username and password like Windows does when you don't authenticate when connecting via RDP.

So make sure you enter the username and password in the RDP client's options, and it should work. Of course, I think only newer clients allow for that, but I also think there's an update for Windows XP...

And yeah, the error message for this (something about "not enough memory") is extremely non-helpful in English as well...

np: Bracken - The Fifty (31 Songs For Japan)
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: RDP connections fail when using authentication.

Post by Sasquatch »

See this bug report: http://www.virtualbox.org/ticket/4406
I've made a comment on it a little down. This is the direct link to it. Those are my findings with a link to another topic describing this problem. It's still not fixed, since it was reported for 3.0.0.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: RDP connections fail when using authentication.

Post by Sasquatch »

As for the user you entered, it's 'forgotten' when the VM has been shut down. It's described in the manual ;).
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
WhiteAngel
Posts: 9
Joined: 24. May 2011, 19:24
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: MS Windows Vista

Re: RDP connections fail when using authentication.

Post by WhiteAngel »

Hi again,
thanks for all of your replies!

@Leak:
I think you guessed the problem. When I use the RDP client to connect to a physical computer, it asks me for the credentials just AFTER the connection has been estabilished, i.e. it's the physical computer who authenticates me (or, to say this better, it's the RDP server on the physical computer). This is not the case when connecting to the VRDP VirtualBox server: the authentication is not performed by the guest, and so VirtualBox wants the credentials just BEFORE connecting.
Unfortunately I cannot provide username and password to the RDP client: I can only specify the server to connect to, and the username, the password must be supplied after the connection.
I have not yet checked this better, but my Windows XP installation is fully updated with all the critical and optional patches Microsoft released since the origins of the WinXP OS. So if there had been an updated RDP client, I think I would have already installed it. Actually my RDP client's version is 6.0.6001, whereas Windows 7 RDP client's version is 6.1.7601 (but still this does not permit to enter the password before connecting).

@Sasquatch:
Yeah, that topic perfectly reflects my problem.
And... mmh... no, the user I added in the extradata section has not been automatically deleted after the VM shutdown: if I type this:
VBoxManage getextradata "WinVista x64" enumerate
the last line of the output shows:
VBoxAuthSimple/users/ijk, Value: ...
where "ijk" was the username I put in the extradata section and "..." was the password hash.
How can I delete these?

Anyway I will do some tries this weekend (I have no time at the moment), and I will read carefully the link you've posted.
I will make you know, thanks again for your support ;)

Bye bye!
Leak
Posts: 242
Joined: 31. Mar 2009, 13:00
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Debian Testing, Windows XP, Windows Server 2003/2008 R2

Re: RDP connections fail when using authentication.

Post by Leak »

WhiteAngel wrote:@Leak:
I think you guessed the problem. When I use the RDP client to connect to a physical computer, it asks me for the credentials just AFTER the connection has been estabilished, i.e. it's the physical computer who authenticates me (or, to say this better, it's the RDP server on the physical computer). This is not the case when connecting to the VRDP VirtualBox server: the authentication is not performed by the guest, and so VirtualBox wants the credentials just BEFORE connecting.
Unfortunately I cannot provide username and password to the RDP client: I can only specify the server to connect to, and the username, the password must be supplied after the connection.
Actually, if you check the "Allow me to save credentials" checkbox you'll get a username/password prompt from your Windows XP machine, not from the server - same as for Windows 7. Of course, if you don't want the password saved you'll then have to uncheck "Remember my password" in that dialog every time, but at least it should work...

EDIT: since the only Windows XP machine around here is a VM, I've just tried connecting from there to another VM that has VRDP turned on, and with "Allow me to save credentials" checked it worked fine...
WhiteAngel
Posts: 9
Joined: 24. May 2011, 19:24
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: MS Windows Vista

Re: RDP connections fail when using authentication.

Post by WhiteAngel »

Leak wrote:Actually, if you check the "Allow me to save credentials" checkbox you'll get a username/password prompt from your Windows XP machine, not from the server - same as for Windows 7.
Just perfect! It works!
I didn't remember that checking that box permits to enter the credentials before connecting.
Thanks man! It works great with both VBoxAuth and VBoxAuthSimple libraries.

Now I have another question, but it's better I start a new thread 'cause the topic is a little different ;)

P.S.: at the end I deleted the user "ijk" from the VBoxAuthSimple authentication list simply by opening the .vbox VM file in notepad and deleting the corresponding line in the 'extradata' section. It worked.
JDB1982
Posts: 1
Joined: 7. Mar 2014, 19:44

Re: RDP connections fail when using authentication.

Post by JDB1982 »

Hi

With all the info in the posts above I couldn't solve my problem.

When I try to connect remotey to my VirtualBox Guest "Windows7ProKloon" using Authentication External (VBoxAuthSimple) I get the error message
A licencing error occured while the client was attempting to connect (licensing timed out). Please try connecting to the remote computer again
”.

With Authentication NULL I can connect without any problem.

I used the following commands to install the authentication:
a. Enable VBoxAuthSimple with the following command:
VBoxManage setproperty vrdeauthlibrary "VBoxAuthSimple"
b. To enable the library for a particular VM, you must then switch authentication to external:
VBoxManage modifyvm <vm> --vrdeauthtype external
Replace <vm> with the VM name or UUID.
c. You will then need to configure users and passwords by writing items into the machine's extradata. Since the XML machine settings file, into whose "extradata" section the password needs to be written, is a plain text file, VirtualBox uses hashes to encrypt passwords. The following command must be used:
VBoxManage setextradata <vm> "VBoxAuthSimple/users/<user>" <hash>
Replace <vm> with the VM name or UUID, <user> with the user name who should be allowed to log in and <hash> with the encrypted password. As an example, to obtain the hash value for the password "secret", you can use the following command:
VBoxManage internalcommands passwordhash "secret"
This will print
2bb80d537b1da3e38bd30361aa855686bde0eacd7162fef6a25fe97bf527a25b
You can then use VBoxManage setextradata to store this value in the machine's "extradata" section.
As example, combined together, to set the password for the user "john" and the machine "My VM" to "secret", use this command:
VBoxManage setextradata "My VM" "VBoxAuthSimple/users/john"
2bb80d537b1da3e38bd30361aa855686bde0eacd7162fef6a25fe97bf527a25b
Settings
settings.jpg
settings.jpg (28.74 KiB) Viewed 9095 times
Connecting to
connecting to.png.jpg
connecting to.png.jpg (75.57 KiB) Viewed 9095 times
Licencing error
licencing error.jpg
licencing error.jpg (72.04 KiB) Viewed 9095 times


I hope you can help me.

Thanks in advance!
Post Reply