출처 : http://koti.mbnet.fi/akini/delphi/ntlmlogin/
Test NTLM login from application
This Delphi-demo application will make a login to NT Domain.
Username/Password/Domain is authenticated and success status is returned. If login was successful, then a list of NTgroups is populated.
Most of the code in SSPIValidatePassword.pas is done by Colin Wilson. I've added the following methods:
ReadGroups
LookupAccountBySid
QueryTokenInformation
GetCurrentUser (not used)
If you see here a fundamental error flaws, please send me a comment and a possible fix solution. thx (mailmur@yahoo.com)
Question to you
How to do the same tasks in Win2k/XP ActiveDirectory environment? I believe this code won't work in AD environment.....
Purpose of the application:
Authenticate the given username on NTDomain and populate a list of groups belonging to.
TestNTLMLogin.zip
self-exe program to test tweaked login. This package contains an impersonation test, and iterate NTGroups code. TestNTLogin.zip