Re: Getting the SID for the Administrators group
From: Garfield Lewis (galewis_at_SPAM-NO-MOREca.ibm.com)
Date: 02/26/05
- Next message: Pavel Lebedinsky: "Re: IIS user (IUSR_XXX) - CryptoAPI"
- Previous message: WT: "Debugging CSP"
- In reply to: Anthony Hunter: "Getting the SID for the Administrators group"
- Next in thread: Anthony Hunter: "Re: Getting the SID for the Administrators group"
- Reply: Anthony Hunter: "Re: Getting the SID for the Administrators group"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 25 Feb 2005 19:44:41 -0500
Use the following piece of code:
...
PSID m_pAdminGroupSid=NULL;
SID_IDENTIFIER_AUTHORITY m_SidIdentAuth=SECURITY_NT_AUTHORITY;
...
m_Success=AllocateAndInitializeSid( &m_SidIdentAuth,
2,
SECURITY_BUILTIN_DOMAIN_RID,
DOMAIN_ALIAS_RID_ADMINS,
0,
0,
0,
0,
0,
0,
&m_pAdminGroupSid );
...
-- Garfield A. Lewis DB2 UDB Development, IBM Canada Laboratory "Anthony Hunter" <anthony.hunter@_NOSPAM_.invensys.com> wrote in message news:%23H3LmS1GFHA.3092@tk2msftngp13.phx.gbl... > Is there a way to get the SID for the Administrators group without using > LookupAccountName()? Since this requires a string for the account name, and > the Administrators name is translated on the different language OS's, the > lookup won't always work. > Is there a more generic way to do this that will work on all language > versions? > > > > Thanks, > Anthony > -- > Product Availability Developer > Invensys Avantis - www.avantis.net > >
- Next message: Pavel Lebedinsky: "Re: IIS user (IUSR_XXX) - CryptoAPI"
- Previous message: WT: "Debugging CSP"
- In reply to: Anthony Hunter: "Getting the SID for the Administrators group"
- Next in thread: Anthony Hunter: "Re: Getting the SID for the Administrators group"
- Reply: Anthony Hunter: "Re: Getting the SID for the Administrators group"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|