Solved

Adding Users in Windows 2000

Posted on 2001-06-11
2
192 Views
Last Modified: 2008-03-17
I have a program which adds users to Windows NT 4.0 Domain and also sets RAS Priviledges. It also creates a new group and makes all users part of that group.

I tried running the program in Windows Advanced Server 2000 without Active directory. None of the users were in 2000. I am using the NetUserAdd API. It does not work in Windows 2000. I am not sure if it works with Active Directory.

Declare Function NetUserAdd3 Lib "NETAPI32.DLL" Alias "NetUserAdd" (servername As Byte, ByVal level As Long, Buffer As USER_INFO_3, ParmError As Long) As Long

I am also using RasAdminUserSetInfo API to setup the RAS priveledges and NetGroupAdd and NetGroupAddUser API to create a group and add the user to the group.

I would appreciate some insight and if there is a code or document which works in 2000, that would be great too.

0
Comment
Question by:rian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 5

Accepted Solution

by:
AndrewDev earned 100 total points
ID: 6178019
Try this method instead

Administer NT/2000 Users, Computers, and Domains Using ADSI/WMI
http://www.freevbcode.com/ShowCode.Asp?ID=1896

Regards
Andrew
0
 
LVL 5

Expert Comment

by:AndrewDev
ID: 6178028
These also might be helpful

Add a User to the Domain in Windows 2000
http://www.freevbcode.com/ShowCode.Asp?ID=796

Change a User's Password in Windows 2000
http://www.freevbcode.com/ShowCode.Asp?ID=665

Determine if a User is a Member of a Given Group (Windows 2000)
http://www.freevbcode.com/ShowCode.Asp?ID=797

Enable or Disable a User Account in Windows 2000
http://www.freevbcode.com/ShowCode.Asp?ID=815

Enumerate all Groups a User Belongs To (NT or 2000)
http://www.freevbcode.com/ShowCode.Asp?ID=1229

Get the Names of the Members of a Windows 2000 Group
http://www.freevbcode.com/ShowCode.Asp?ID=272

Remove a User from a Security Group in Windows 2000
http://www.freevbcode.com/ShowCode.Asp?ID=816

Good Luck
Andrew
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question