LsaLogonUser and KERB_SMART_CARD_LOGON (Solution)




Hi,

I have managed to get LsaLogonUser working with KERB_SMART_CARD_LOGON in
order to authenticate a user using a smart card.
The advantage of this approach over using KERB_SMARTCARD_CSP_INFO is that it
is working for all Windows versions starting from Windows 2000 to Windows
7...so it's very portable!
As for my previous posting concerning the usage of KERB_SMARTCARD_CSP_INFO,
the main difficulty was the lack of documentation from Microsoft about its
usage, so I had to guess the correct format (especially for the CspData
filed) through extensive debugging.

You can get the source code of a working sample from the following link :

http://www.idrix.fr/Root/Samples/LsaSmartCardLogon2.cpp

I hope this will be useful.

Cheers,
--
Mounir IDRASSI
IDRIX
http://www.idrix.fr

To reach me: mounir_idrix_fr (replace the underscores with the at and dot
characters respectively)
.