Page 1 of 1

[Solved] Login issues on Windows guest

PostPosted: 29. Nov 2018, 17:16
by LordKaoS
Host: Windows 10 (64)
Guest: Windows 7 (64)
Version: 5.2.22
Guest Additions: 5.2.22

In my python script, the lines
Code: Select all   Expand viewCollapse view
runner = session.console.guest.createSession("Analyser", "project", None, None)
runner.waitFor(virtualBoxManager.constants.GuestSessionWaitForFlag_Start, 30 * 1000)

raise
File "<pyshell#2>", line 1, in <module>
runner.waitFor(virtualBoxManager.constants.GuestSessionWaitForFlag_Start, 30 * 1000)
File "C:\Users\kaos\AppData\Local\Temp\gen_py\2.7\D7569351-1750-46F0-936E-BD127D5BC264x0x1x3.py", line 4039, in WaitFor
, aTimeoutMS)
com_error: (-2147352567, 'Exception occurred.', (0, u'GuestSessionWrap', u'The specified user was not able to logon on guest', None, 0, -2135228411), None)

which seems to suggest problems with the specified credentials.

However, I've tried to do something similar with VBoxManage as
Code: Select all   Expand viewCollapse view
VBoxManage.exe guestcontrol "AMA" --username "Analyser" --password "project" stat "C:\Project"
which seems to run fine with the output as
Element "C:\Project" found: Is a directory


The VM state is the same when running both, the script and the command: the VM is started, the OS booted up and I've signed in manually through the GUI, with the same credentials as above.

What could be the issue?

Re: Login issues on Windows guest

PostPosted: 18. Dec 2018, 21:26
by noteirak
I suggest to start looking in the event log of the guest to see what was the actual auth error.

Re: Login issues on Windows guest

PostPosted: 27. Dec 2018, 12:59
by LordKaoS
The third paramenter of createSession(), domain, seems to be causing the problem. Passing it as None attempts to logon as "Analyser@None" (None interpreted as string instead of NoneType). While the SDKref states that the parameter is optional, the interpreter requires 4 parameters to call the function. A possible fix is to pass an empty string as the domain, which correctly logs on as "Analyser".

Re: [Solved] Login issues on Windows guest

PostPosted: 27. Dec 2018, 16:36
by noteirak
Domain login is not supported as per SDKref indeed. You need to give it null (or possibly empty string) indeed.

Re: [Solved] Login issues on Windows guest

PostPosted: 27. Dec 2018, 19:05
by LordKaoS
noteirak wrote:You need to give it null

My problem started with None (Python's null equivalent) not being handled as it should. This seems to be a bug in the python API, and I request you to look into it.