Server

ActiveX/VBSScript registry editor  ActiveX NT User account manager  Export MDB/DBF from ASP
Url replacer, IIS url rewrite Active LogFile  Email export  ActiveX/ASP Scripting Dictionary object
 IISTracer, real-time IIS monitor
 Huge ASP upload - upload files with progress.
          Class 
          Member of  UserManager Use Server object 

Description

Properties of servers, enumerating users, logon/logoff to the user administrator account.

Object model

Server - Properties of servers, enumerating users, logon/logoff to the user administrator account. (Item property, Returns one server from the collection.)
 
Groups - Contains methods and properties for enumerating groups. (Groups property, Collection of global groups)
 
 
Group - Object for managing local or global group. (Item property, Returns specified group from collection.)
 
   
GroupMembers - Contains methods for enumerating and selecting user accounts from the group. (Members property, Members that belongs to the group.)
 
     
User - Properties of the user account, and methods for creating, deleting and selecting users. (Item property, Returns one group member.)
 
     
 
RasUser - RAS privileges and call-back phone number for the user. (Ras property, Enables setting of the RAS privileges and call-back phone number for the user.)
 
     
 
Groups - Contains methods and properties for enumerating groups. (Groups property, Get a list of groups that an NT user belongs to .)
 
     
 
Groups - Contains methods and properties for enumerating groups. (LocalGroups property, List of local groups to which a specified user belongs.)
 
     
Group - Object for managing local or global group. (Item property, Returns one group member.)
 
Groups - Contains methods and properties for enumerating groups. (LocalGroups property, Collection of local groups objects)
 
Users - Collection of user accounts (Domain/Server accounts), (Users property, Collection of User objects from the server.)

Methods

GetAnyDCName Gets the name of any domain controller for a domain that is directly trusted by the server name.
GetDCName Returns the name of the Primary Domain Controller (PDC) for the specified domain
ChangePassword Changes password for the currently logged on user.
LogonUser Attempts to perform a user logon operation and impersonates a user. You specify the user with a user name and domain, and authenticate the user with a clear-text password.
RevertToSelf Terminates the impersonation of a client application (ASP script).
Select Selects the server.

Properties

CommentComment describing the server.
String, RW
DomainThe domain to which the computer belongs.
Domain, RO
GroupsCollection of global groups
Groups, RO
LocalGroupsCollection of local groups objects
Groups, RO
LoggedOnUserName of the logged-on user
String, RO
NameName of the server
String, RO
ServersCollection of servers in the primary domain of server.
Servers, RO
TypeType of the server.
ServerTypes, RO
UsersCollection of User objects from the server.
Users, RO

Examples

 ASP sample  
<CENTER><H1>Add a New user account.</H1></CENTER>
<FORM>
UserName : <INPUT NAME=UserName> UserPassword : <INPUT Name=UserPassword><INPUT TYPE=SUBMIT>
</FORM>
<%
UN = Request("UserName")
If UN <> "" Then
	'Create Server object for Logon
	Set xServer = Server.CreateObject("UserManager.Server")

	'www service is usually running under account without Account operator rights.
	'Server object is used to logon to the account with the right.
	xServer.LogonUser "Administrator", ""

	'The next statements are executed under Administrator account. 
	'Add a new user
	Set User = xServer.Users.Add( UN, Request("UserPassword"))

	'Some comment for the user
	User.Comment = "User from ASP page, " & Now()

	Response.Write "User <B>" & UN & "</B> Added.<BR>"

	Response.Write "List of users :<BR>"

	'List all of server users.
	For Each User In xServer.Users
		Response.Write "<B>" & User.Name & "</B>, " & User.Comment & "<BR>"
	Next 

	'LogOff the Administrator
	xServer.RevertToSelf
End If
%>

Used in

  Other links for Server class

ActiveX UserManager classes

UserManager

Easy to use classes to create, delete and manage local and remote user accounts, groups, servers and domains in the Windows NT (2000/XP) environment. Simple work with user accounts and groups from VBA, VBS/JS, ASP and T-SQL.

© 1996 – 2006 Antonin Foller, Motobit Software, help{at}pstruh.cz, help v. 2.03.68