MOTOBIT.COM - ASP upload, IIS utility User Class, Member of UserManager

Member of  UserManager Use User object | Changes | Purchase | Download

Description

Properties of the user account, and methods for creating, deleting and selecting users.

Object model

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.)

Methods

AddToGroup Gives the user account membership in an existing global group.
AddToLocalGroup Adds the user to an existing local group.
Delete Deletes the user account.
RemoveFromGroup Removes the user from a particular global group in the security database.
RemoveFromLocalGroup  Removes the user from an existing local group.
UserAdd Adds a user account and assigns a password and privilege level.

Properties

AuthFlagsThe user's operator privileges.
OperatorPrivileges, RW
CodePageThe code page for the user's language of choice.
Long, RW
CommentComment for the user.
String, RW
CountryCodeThe country code for the user's language of choice.
Long, RW
DisabledThe user's account is disabled.
Boolean, RW
ExpiresSpecifies when the account will expire.
Date, RW
FlagsContains values that determine several features. This member can be any of the UserFlags values.
UserFlags, RW
FullNameThe full name is the user's complete name.
String, RW
HomeDirContains the path of the home directory of the user.
String, RW
HomeDirDriveSpecifies the drive letter assigned to the userís home directory for logon purposes.
String, RW
LockOutThe account is currently locked out. This value can be cleared to unlock a previously locked account. This value cannot be used to lock a previously unlocked account.
Boolean, RW
LogonHoursSpecifies the times during which the user can log on.
Boolean, RW
MaxStorageSpecifies the maximum amount of disk space the user can use. Use the value specified in umMAXSTORAGE_UNLIMITED to use all available disk space.
Long, RW
NameSpecifies the name of the user account.
String, RW
PasswordCannotChangeThe user cannot change the password.
Boolean, RW
PasswordExpiredDetermines whether the password of the user has expired.
Boolean, RW
PasswordNeverExpiresRepresents the password, which should never expire on the account. This value is valid only for Windows NT.
Boolean, RW
PasswordNotRequiredNo password is required.
Boolean, RW
PrimaryGroupIDSpecifies the relative ID (RID) of the Primary Global Group for this user.
Long, RW
ProfileSpecifies a path to the userís profile. This value can be a null string, a local absolute path, or a UNC path.
String, RW
ScriptPathSpecifying the path of the user's logon script, .CMD, .EXE, or .BAT file.
String, RW
UserCommentContains a user comment for the account.
String, RW
Workstations Workstations from which the user can log on. As many as eight workstations can be specified; the names must be separated by commas (,). A null string indicates that there is no restriction.
String, RW
BadPasswordCountThe number of times the user tried to log on to the account using an incorrect password.
Long, RO
GroupsGet a list of groups that an NT user belongs to .
Groups, RO
IDID of the user.
Long, RO
LastLogOffSpecifies when the last logoff occurred.
Date, RO
LastLogonSpecifies when the last logon occurred.
Date, RO
LocalGroupsList of local groups to which a specified user belongs.
Groups, RO
NumOfLogonsThe number of successful times the user tried to log on to this account.
Long, RO
PasswordAgeSpecifies the time have elapsed since the password was last changed.
Date, RO
PrivilegeOne of three values specifying the level of privilege.
UserPrivileges, RO
RasEnables setting of the RAS privileges and call-back phone number for the user.
RasUser, RO
ServerThe remote server within the user account.
Server, RO
PasswordSpecifies the password of the user account
String, WO

Examples

Unlock account

Dim Server

Set Server = CreateObject("UserManager.Server")
'Unlock one user account
Server.Users("Coll").LockOut = False

'Unlock all user accounts 
For Each User In Server.Users
    User.LockOut = False
Next

Change comment

Dim Server

Set Server = CreateObject("UserManager.Server")
Server.Users("Coll").Comment = "Power user"

Used in

Users.Item, Users.Add, oFormField.Value

Other links for User class

ActiveX UserManager classes

User, Users, Group, Server, Groups, GroupMembers, RasUser, Servers, Domain

ActiveX UserManager enums

UsersFilter, GroupAttributes, UserFlags, UserPrivileges, ServerTypes, LogonTypes, LogonProviders, OperatorPrivileges, RasPrivileges, SIDNameUse

UserManager

ActiveX UserManager is easy to use COM component with classes to create, delete and manage local and remote user accounts, groups, servers and domains in the Windows NT (2000/XP) environment. You can simple work with user accounts and groups from VBA, VBS/JS, ASP and T-SQL programming environment.

© 1996 - 2009 Antonin Foller, Motobit Software | About, Contacts | e-mail: info@pstruh.cz