From: gunther DOT ebert AT ixos-leipzig DOT de (Gunther Ebert) Subject: Re: Manipulating Users and Groups 29 Jan 1997 04:33:09 -0800 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <32EF0660.6D15.cygnus.gnu-win32@ixos-leipzig.de> References: 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" Original-Cc: "'GNU-Win32'" Original-Sender: owner-gnu-win32 AT cygnus DOT com 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 "gnu-win32-request AT cygnus DOT com" with one line of text: "help".