Solved

Adding Users in Windows 2000

Posted on 2001-06-11
2
183 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
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

762 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

13 Experts available now in Live!

Get 1:1 Help Now