【求助】自定义登陆界面,用什么函数验证域用户是否合法?
为了达到个人帐户的统一,在登陆应用系统之前,要求输入合法的域用户名和口令,只有验证通过之后,才可以登陆应用程序,获取相应的权限。
我查找有Logonuser似乎可以实现,但是却没有SE_TCB_NAME privilege,看下面的注释:
Remarks:
The process that calls LogonUser must have the SE_TCB_NAME privilege. The privilege does not need to be enabled. The LogonUser function enables the privilege as necessary. The function fails if the calling process does not have the SE_TCB_NAME privilege, and GetLastError returns the error code ERROR_PRIVILEGE_NOT_HELD. For more information about privileges, see Privileges.
两个问题:
1、如果采用LogonUser,怎么配置SE_TCB_NAME权限;
2、是否有更好的方式实现域用户的验证?
高分求教,多谢!