Adding Users in Windows 2000
Posted on 2001-06-11
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.