Re: Getting the SID for the Administrators group
From: Anthony Hunter (anthony.hunter_at__NOSPAM_.invensys.com)
Date: 02/28/05
- Next message: Adam Augustyn: "Re: Smart Card Base Components problem on XP"
- Previous message: William Dicks: "Re: Smart Card Base Components problem on XP"
- In reply to: Garfield Lewis: "Re: Getting the SID for the Administrators group"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 28 Feb 2005 09:57:46 -0500
That's what I was looking for. Thanks!
Anthony
"Garfield Lewis" <galewis@SPAM-NO-MOREca.ibm.com> wrote in message
news:ulZIhx5GFHA.580@TK2MSFTNGP15.phx.gbl...
> 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: Adam Augustyn: "Re: Smart Card Base Components problem on XP"
- Previous message: William Dicks: "Re: Smart Card Base Components problem on XP"
- In reply to: Garfield Lewis: "Re: Getting the SID for the Administrators group"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|