Microsoft KB Archive/119671

{|
 * width="100%"|

HOWTO: Create and Manage User Accounts Programmatically

 * }

Q119671

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK) for Windows NT

-

SUMMARY
Windows NT and the Windows NT Advanced Server use the same APIs that Microsoft LAN Manager uses to create and maintain user- and group-account information. For example, to create a new global group, use NetGroupAdd. To create a new user, use NetUserAdd. To add the user to the global group, use NetGroupAddUser. Local groups are created by using NetLocalGroupAdd and members are added to local groups by using NetLocalGroupAddMember.

MORE INFORMATION
The APIs NetGroupAdd, NetUserAdd, NetGroupAddUser, NetLocalGroupAdd, and NetLocalGroupAddMember require access at the administrator or accounts-operator level to run successfully. Windows NT includes the following built-in groups:


 * Administrators
 * Power Users
 * Users
 * Guests

Members of the Administrators group can fully administer user accounts; only Administrators can assign user rights and access privileges for resources. Members of the Power Users group can create accounts only in the Power Users, Users, and Guests groups; they can also maintain and delete the accounts they create. However, a Power User can neither change nor delete an account in these groups if the account was created by someone else. A member of the Users group can create, maintain, and delete accounts in local groups that he or she has created. Guests can neither create nor delete accounts.