Trying to get LsaEnumerateAccountsWithUserRight() to work

  • Thread starter Thread starter Anthony Hunter
  • Start date Start date
A

Anthony Hunter

I'm trying to get LsaEnumerateAccountsWithUserRight() to work, but it
keeps returning the following error: "A specified privilege does not exist."
The privilege I'm looking for is SeTcbPrivilege and I know that it exists.
Below is a snipit of my code, can someone let me know if I'm doing something
wrong?

// ========================================
wchar_t wPolicy[128] = L"SeTcbPrivilege";
LSA_UNICODE_STRING lsaPolicy;
InitLsaString( lsaPolicy, wPolicy );
VOID *accounts;
ULONG count = 0;
returnValue = LsaEnumerateAccountsWithUserRight( policyHandle, &lsaPolicy,
&accounts, &count );
// ========================================



Thanks,
Anthony
 
SeTCB is Act as Part of the Operating System. As far as the actual code,
you'd have better luck if you reposted this in one of the sdk groups.

--
--
Brian Desmond
Windows Server MVP
(e-mail address removed)12.il.us

Http://www.briandesmond.com
 
Back
Top