Remote Desktop credential switching with replacement GINA
From: Davidk (anonymous_at_discussions.microsoft.com)
Date: Mon, 7 Jun 2004 12:36:11 -0700
I am working with a replacement GINA that works fine with Terminal Services of Windows 2000 Server & Server 2003. However, it does not behave correctly when I use Remote Desktop client to connect to a XP Pro machine. I know that on XP, sessions made remotely is actually connecting to the "console" session (which can have ID = 0). From looking at MSDN documentations, I believe it is necessary for my replacement GINA to implement WlxGetConsoleSwitchCredentials & call WlxQueryConsoleSwitchCredentials.
Here's the testing scenario & problems I've encountered:
- XP Pro machine (#1) boots up, GINA finishes initializing
- From another machine (#2), start Remote Desktop client and connect to the XP Pro box (#1)
- When GINA shows the credential gathering dialog, typed in user's credentials & click OK (screen goes black for a few seconds)
- WlxQueryConsoleSwitchCredentials succeeded & the user logged on
- Logoff from that remote session (for some reason the Remote Session doesn't close & GINA went back to WlxLoggedOutSAS showing credential gathering dialog)
- Go back to the physical machine XP Pro (#1), and try to generate a SAS using CTRL+ALT+DEL
- Typed in user's credentials & click OK (Screen goes black for a few seconds)
- WlxQueryConsoleSwitchCredentials FAILED! WHY would it fail???
- GINA goes back to WlxLoggedOutSAS and displays credential gathering dialog
- Remote Desktop session gets a message "Remote Desktop Disconnected -- The remote session was disconnected because another user has connected to the session".
- At this point, my GINA stopped behaving correctly because internally it thinks it's in "Logged On" state even though the desktop never showed up. Any CTRL + ALT + DEL gets ignored because my WlxLoggedOutSas ignores it if we're already logged on.
I've tried the same thing with msgina.dll, and it seems to close down the remote session window if a logoff was performed on a remote session. Is this something the replacement GINA have control over? Or, do I not have control over it since Winlogon would be calling to my WlxLogoff & perhaps WlxDisconnect?
Also, with msgina.dll, there's no problem transferring the credentials once I went back to the XP Pro machine (#1). This means after typing in credentials & click OK, the screen goes black for a few seconds, then I was logged on and the desktop is being loaded.
Any comments or suggestions on what my problem could be and tips on how to fix it would be greatly appreciated!