Subject: Re: Manipulating Users and Groups
From: [email-masked] (Gunther Ebert)

29 Jan 1997 04:33:09 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
References: <c=US%a=_%p=INTERGRAPH%l=[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.0Gold (WinNT; I)
Original-To: "Bailey, Mark E" <[email-masked]>
Original-Cc: "'GNU-Win32'" <[email-masked]>
Original-Sender: [email-masked]

Bailey, Mark E wrote:
> 
> Which Win32 API calls should I use to manipulate users and groups?  At
> this time, I am just interested in users and groups on the local
> machine.  I need to get the current user's information and then verify
> that he/she is in the correct groups before allowing certain actions.
> 

Look in the MS documentation for the following functions:

GetUserName
NetUserAdd      (even for the local machine, I haven't found any other
way)
NetUserGetInfo
NetUserEnum
NetGetDCName
LookupAccountName
LookupAccountSid
InitializeSid
GetSidSubAuthority

If you want to know how to obtain a security descriptor of a
'well-known' group
(that means a group that is created by Windows NT during installation
like
'Administrators') without specifying the account or group name (these
names are
language dependend) look for the article 'Creating a World SID' in the
Win32 SDK
knowledge base

Gunther
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".