?
Solved

Adding Users in Windows 2000

Posted on 2001-06-11
2
Medium Priority
?
194 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 300 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…
Suggested Courses

770 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