Solved

Adding Users in Windows 2000

Posted on 2001-06-11
2
186 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…

943 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now