Jump to content

Oleg

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Oleg

  1. Hi, Could anyone help me sort out how to obtain the list of users groups? I've permanently got the "System.Security.SecurityException: The name provided is not a properly formed account name." when I'm trying use UPN. All work fine for local user (user name is empty). The Validate_Username_and_Password.vi works fine for domain login and local account. I've also tried to get the UserToken via LogonUser() but unsuccessful (see test_logon.vi). It also doesn't work from C++ and the last printf() always returns two zeros. #include "stdafx.h" #include <Windows.h> #include <WinBase.h> #include <stdio.h> int _tmain(int argc, _TCHAR* argv[]) { HANDLE token = NULL; BOOL ret = LogonUserA("myname","mydomain","mypasswd",LOGON32_LOGON_INTERACTIVE,LOGON32_PROVIDER_DEFAULT,&token); printf("%d %ul\n", ret, token); } I'm using WIN10 64 bit and my computer not belongs to domain. I'm using local account. Thanks in advance test_logon.vi
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.