Re: Getting the SID for the Administrators group

From: Anthony Hunter (anthony.hunter_at__NOSPAM_.invensys.com)
Date: 02/28/05


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
> >
> >
>
>



Relevant Pages

  • Re: NY Times review of Anthony (by a journalist) Re: new book on the spread of IE
    ... How Bronze-Age Riders From the Eurasian Steppes Shaped the Modern ... we share with our family and the language we speak. ... Language," David W. Anthony argues that we speak English not just ... because our parents taught it to us but because wild horses used to ...
    (sci.lang)
  • Re: C# and C++ share memory
    ... "Anthony" wrote in ... > Is there any sample codes or documents about how to send and receive the ... I would probably implement both "ends" in one language, ... use an MC++ wrapper from C#, but you can probably do the same using ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: spell check
    ... This tutorial will help show you how to fix this error. ... Anthony Haddad;813037 Wrote: ... "This language is no longer available for spell checking. ... *Please post feedback to help others.* ...
    (microsoft.public.windows.vista.mail)