views:

188

answers:

1

I think it should be a windows service. when given certain conditions it should perform a login into the machine.

The machine will be in the "login screen" checking a webservice to know who is the user and password it should use to login.

Can this be done?, I don't want "automatic login" windows feature.

Thanks!

+2  A: 

AFAIK this cannot be done as the login/authentication is done by the GINA layer (Graphical Interface and Authentication), you're effectively trying to replace that layer with your own, which would not be feasible from the managed side of code. In short, the only way to develop a replacement for the GINA layer would have to be done from the C/C++ side, not for reasons of speed, but because of the complexity involved in programming, a new GINA subsystem which would have to take into account of

  • Handling the authentication by interacting with WinLogon
  • Setting up a desktop
  • Loading Explorer as the shell

Doing it from .NET would not be a viable way of doing it. But nonetheless, if you are interested in replacing GINA with your own in pure C/C++ way, have a look here in the MSDN Magazine which published an article by Keith Brown, about replacing GINA with your own, in the May 2005 issue.

Edit: Thanks to Ruddy for pointing out this that I was not aware of, GINA has been replaced in Vista/Windows 7. Now, my view and of course this answer has changed to account for this accordingly, in short, to fulfill your goal and of course, to make this authentication backward if so wish for earlier version of Windows, ie XP (This may not be in your case, but worth mentioning). In Vista/Windows 7, GINA is replaced by a 'Content Provider', which I do not know about. But however, I have found this link to the MSDN about this here. Salvador - sorry if I cannot answer more about it as that's a new one to me! :(

Hope this helps, Best regards, Tom.

tommieb75
Thank you very much Tom. Your information has been very helpful.
Salvador Sarpi
GINA is not applicable to Vista or Win7 anymore see "http://en.wikipedia.org/wiki/Graphical_identification_and_authentication"
Ruddy
you had a quote at the end of the URL ... http://en.wikipedia.org/wiki/Graphical_identification_and_authentication
Matthew Whited
@Matthew: Funny... I checked the url and it is ok...can you edit my answer to verify the link as I checked it and it appears ok! :(
tommieb75
Guess I should of note pointed out that I was saying that to @Ruddy. He put quotes around this URL and the ending quote stuck to the link (Then again I am forced to use IE6 here at work... and maybe that is why I see the problem even if others don't)
Matthew Whited
Then the question is how can I create a Credential Providers Plugin or similar?
Salvador Sarpi
I will edit my answer to include the mentioned link! Thanks Ruddy... :)
tommieb75
Thank you all very much. Tom, this helped me a lot!.
Salvador Sarpi
@Salvador: No problem :)
tommieb75
Salvador Sarpi
Sorry about the quotes ... normally i would put the title of the referenced page in the quotes and make it a hyperlink to the proper page in an answer... but i haven't quite figured out how to do that in a comment yet...
Ruddy