User Category

The functions in the User category control a user’s account in the user account database.

Function

Description

NetUserAdd

Adds a security database for the specified user.

NetUserAdd32

This function is the same as NetUserAdd except that it uses 32-bit data structures, is RPC-based, and supports additional information levels.

NetUserDel

Removes a user’s account from a server, thereby preventing the user from accessing the server’s resources.

NetUserDel32

This function is the same as NetUserDel except that it is RPC-based.

NetUserEnum

Returns information about all user accounts on a server.

NetUserEnum32

This function is the same as NetUserEnum except that it uses 32-bit data structures, is RPC-based, supports additional information levels, and is resumable.

NetUserGetGroups

Lists all global groups on a server to which a specified user belongs.

NetUserGetGroups32

This function is the same as NetUserGetGroups except that it uses 32-bit data structures, is RPC-based, and supports additional information levels.

NetUserGetInfo

Retrieves information about a specified user account on a server.

NetUserGetInfo32

This function is the same as NetUserGetInfo except that it uses 32-bit data structures, is RPC-based, and supports additional information levels.

NetUserGetLocalGroups

Retrieves a list of the local groups to which a specified user belongs.

NetUserModalsGet

Examines the modals settings for accounts in the user account database.

NetUserModalsGet32

This function is the same as NetUserModalsGet except that it uses 32-bit data structures, is RPC-based, and supports additional information levels.

NetUserModalsSet

Modifies the modals settings for accounts in the user account database.

NetUserModalsSet32

This function is the same as NetUserModalsSet except that it uses 32-bit data structures, is RPC-based, and supports additional information levels.

NetUserPasswordSet

Changes the password in a user’s account on a server.

NetUserSetGroups

Sets the global groups to which a user belongs.

NetUserSetGroups32

This function is the same as NetUserSetGroups except that it uses 32-bit data structures, is RPC-based, and supports additional information levels.

NetUserSetInfo

Modifies permission information about a specified username on a server.

NetUserSetInfo32

This function is the same as NetUserSetInfo except that it uses 32-bit data structures, is RPC-based, and supports additional information levels.

NetUserValidate2

Verifies that there is an account with a specified username and password on a server.

Each user or application that accesses resources must have an account in the security database. This user account verifies that the user or application has permission to connect to a resource. To set up a user account, call NetUserAdd or NetUserAdd32.

When a user or an application requests access to a shared resource on a server, Advanced Server checks for an appropriate account. NetUserValidate2 checks for a valid account with a particular user name and password combination. NetUserGetInfo and NetUserGetInfo32 retrieve full account details.

NetUserEnum and NetUserEnum32 can be used to list all user accounts on a server.

When a user account is no longer needed, use NetUserDel or NetUserDel32 to delete the account from the server. Once the account is removed, the user can no longer access the server, except by using the guest account.

Because the user’s password is confidential, it is not returned by NetUserEnum, NetUserEnum32, NetUserGetInfo, or NetUserGetInfo32; instead, a string of space characters (blanks) or a NULL pointer is substituted for any password requested. The password is initially assigned when NetUserAdd or NetUserAdd32 are called. NetUserSetInfo and NetUserSetInfo32 set the password and other elements of a user account. Users or applications can use NetUserPasswordSet to change a password (they must supply the current password).

NetUserModalsGet, NetUserModalsGet32, NetUserModalsSet32, and NetUserModalsSet examine and modify the modal settings for accounts in the security database (modal settings are global parameters that affect every account in the database, for example, the minimum allowable password length). All modal settings can be altered by calling NetUserModalsSet or NetUserModalsSet32. Most of the modals can also be altered by using the net accounts command.

Note

The Advanced Server user account subsystem is more powerful than LAN Manager-style user account systems. Some of these APIs are LAN Manager-style. Advanced Server performs the best possible exchange to and from LAN Manager-style data structures, when needed.

User Category Data Structures

The data structures described here represent the levels of detail available for the functions that define or return individual user accounts.

User Account Information (level 0)

The user_info_0 data structure that can be returned by NetUserEnum, NetUserGetInfo, or NetUserSetInfo has the following format.

Within this structure, usri0_name specifies the name of the user whose account will be accessed.

The USER_INFO_0 data structure that can be used by NetUserEnum32, NetUserGetInfo32 or NetUserSetInfo32 has the following format:

Within this structure, all of the parameters are defined in the same way as in the user_info_0 data structure.

User Account Information (level 1)

The user_info_1 data structure that can be returned by NetUserEnum, NetUserGetInfo, NetUserSetInfo, or NetUserAdd has the following format:

Within this structure, the following parameters have been defined:

usri1_name specifies the name of the user whose account will be accessed.

usri1_password is usri1_name’s password. usri1_password length cannot exceed PWLEN bytes, as defined in the netcons.h file.

Note that PWLEN is less than the field length ENCRYPTED_PWLEN to allow the user password to be encrypted.

The NetUserEnum and NetUserGetInfo functions return a string of spaces to maintain password security.

usri1_password_age tells how many seconds have passed since usri1_password last changed.

usri1_priv is one of three values specifying the level of privilege assigned usri1_name .

usri1_home_dir points to an ASCIIZ string containing the path name of user_name’s home directory. If a relative path is specified, it will be considered relative to the value of the UserPath keyword in the Advanced Server Registry. The string can be NULL.

usri1_comment points to an ASCIIZ string describing the user’s privileges and other account information. The string can be NULL.

usri1_flags contains bits that determine several features. It is defined in the access.h file, as follows:

Manifest

Bit Mask

Meaning

UF_SCRIPT

0

If 1, logon script executed.

UF_ACCOUNTDISABLE

1

If 1, user’s account disabled.

UF_DELETE_PROHIBITED

2

If 1, deleting is prohibited.

UF_HOMEDIR_REQUIRED

3

If 1, the home directory is required.


4

Reserved; must be 0.

UF_PASSWD_NOTREQD

5

If 1, no password is required.

UF_PASSWD_CANT_CHANGE

6

If 1, the user cannot change the password.


7-15

Reserved; must be 0.

usri1_script_path points to an ASCIIZ string specifying the path name of the user’s logon script (.cmd, .exe, .bat, or .pro file). The string can be NULL.

The USER_INFO_1 data structure that can be used by NetUserEnum32, NetUserGetInfo32, NetUserSetInfo32, or NetUserAdd32 has the following format:

Within this structure, all parameters are defined in the same way as in user_info_1 data structure.

User Account Information (level 2)

The user_info_2 data structure that can be returned by NetUserEnum, NetUserGetInfo, NetUserSetInfo, or NetUserAdd has the following format:

Within this structure, the following parameters are defined:

usri2_name through usri2_script_path are the same as the corresponding elements of the user_info_1 data structure. For a complete description, see Share Information (level 1).

usri2_full_name points to an ASCIIZ string that contains the full name of the user. This value can be a null string, or it can have as many as LM20_MAXCOMMENTSZ characters before the terminating NULL. The constant LM20_MAXCOMMENTSZ is defined in the netcons.h header file.

usri2_usr_comment points to an ASCIIZ string that contains a user comment. This value can be a null string, or it can have as many as LM20_MAXCOMMENTSZ characters before the terminating NULL. The constant LM20_MAXCOMMENTSZ is defined in the netcons.h header file.

usri2_parms points to an ASCIIZ string that is set aside for use by applications. It can have as many as LM20_MAXCOMMENTSZ characters before the terminating NULL. The constant LM20_MAXCOMMENTSZ is defined in the netcons.h header file. Advanced Server does not use this element.

usri2_workstations points to an ASCIIZ string that contains the names of 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. To disable logons from all workstations to this account, set the UF_ACCOUNTDISABLE bit in the usriX_flags element.

usri2_last_logon specifies when the last logon occurred. This value is stored as the number of seconds elapsed since 00:00:00, January 1, 1970. This element is ignored in NetUserAdd and NetUserSetInfo calls.

usri2_last_logoff specifies when the last logoff occurred. This value is stored as the number of seconds elapsed since 00:00:00, January 1, 1970. A value of 0 means that the last logoff time is unknown. This element is ignored in NetUserAdd and NetUserSetInfo calls.

usri2_acct_expires specifies when the account will expire. This value is stored as the number of seconds elapsed since 00:00:00, January 1, 1970. A value of TIMEQ_FOREVER,as defined in the access.h header file, indicates that the account never expires.

usri2_max_storage specifies the maximum amount of disk space the user can use. A value of USER_MAXSTORAGE_UNLIMITED, as defined in the access.h header file, indicates that there is no restriction.

usri2_units_per_week specifies the number of equal-length time units into which the week is divided in order to compute the length of the bit string in usri2_logon_hours. This value must be UNITS_PER_WEEK for Advanced Server. This element is ignored in NetUserAdd and NetUserSetInfo calls.

usri2_logon_hours points to a 21-byte (168 bits) bit string that specifies the times during which the user can log on. Each bit represents a unique hour in the week. The first bit (bit 0, word 0) is Sunday, 0:00 to 0:59; the second bit (bit 1, word 0) is Sunday, 1:00 to 1:59; and so on. A null pointer in this element for NetUserAdd calls means that there is no time restriction. A null pointer in this element for NetUserSetInfo calls means that no change is to be made.

usri2_bad_pw_count specifies the number of attempts to log on to this account using an incorrect password. A value of 0xFFFFFFFF indicates that the value is unknown. This element is ignored in NetUserAdd and NetUserSetInfo calls.

usri2_num_logons counts the number of successful attempts to log on to this account. A value of 0xFFFFFFFF indicates that the value is unknown. This element is ignored in NetUserAdd and NetUserSetInfo calls.

usri2_logon_server points to an ASCIIZ string that contains the name of the server to which logon requests are sent. Server names should be preceded by two backslashes ( ). A server name of an asterisk ( *) indicates that the logon request can be handled by any logon server. A null string indicates that requests are sent to the domain controller.

usri2_country_code specifies the country code for the user’s language of choice.

usri2_code_page specifies the code page for the user’s language of choice.

The USER_INFO_2 data structure that can be used by NetUserEnum32, NetUserGetInfo32, NetUserSetInfo32, or NetUserAdd32 has the following format:

Within this structure, all of the parameters are defined in the same way as in the user_info_2 data structure.

User Account Information (level 3)

The USER_INFO_3 data structure that can be used by NetUserEnum32, NetUserGetInfo32, NetUserSetInfo32 or NetUserAdd32 has the following format:

Within this structure, the following parameters are defined:

usri3_name through usri3_code_page are the same as the corresponding elements of the USER_INFO_2 data structure described in User Account Information (level 2).

usri3_user_id specifies the relative id of the user in the security database.

usri3_primary_group_id specifies the relative id of the user’s primary group in the security database.

usri3_profile specifies the path of the user’s profile.

usri3_home_dir_drive specifies the drive on which the user’s home directory is located.

usri3_password_expired specifies whether user’s password has expired.

User Account Information (level 10)

The user_info_10 data structure that can be used by NetUserEnum or NetUserGetInfo has the following format:

Within this structure, the following parameters are defined:

usri10_name through usri10_full_name are the same as the corresponding elements of the user_info_2 data structure. For a complete description, see User Account Information (level 2).

The USER_INFO_10 data structure that can be used by NetUserEnum32 or NetUserGetInfo32 has the following format:

Within this structure, all of the parameters are defined the same way as in the user_info_10 data structure.

User Account Information (level 11)

The user_info_11 data structure that can be used by NetUserEnum or NetUserGetInfo has the following format:

Within this structure, the following parameters are 0 defined:

usri11_name through usri11_code_page are the same as the corresponding elements of the user_info_2 and user_info_10 data structures.

For a complete description, see User Account Information (level 2).

The USER_INFO_11 data structure that can be used by NetUserEnum32 or NetUserGetInfo32 has the following format:

Within this structure, all of the parameters are defined in the same way as in the user_info_11 data structure.

User Information (level 20)

The USER_INFO_20 data structure that can be used by NetUserEnum32, NetUserGetInfo32, or NetUserSetInfo32 has the following format:

Within this structure, all of the parameters are the same as the corresponding parameters in the USER_INFO_3 data structure.

User Information (level 21)

The USER_INFO_21 data structure that can be used by NetUserSetInfo32 has the following format:

Within this structure, usri21_password specifies user password encrypted with LM one-way function.

User Information (level 22)

The USER_INFO_22 data structure that can be used by NetUserSetInfo32 or NetUserAdd32 has the following format:

Within this structure, the following parameters are defined:

usri22_password specifies user password encrypted with LM one-way function.

All other elements of the structure are the same as the corresponding elements in USER_INFO_2 data structure.

The following info levels are valid only for NetUserSetInfo32 and replace the older way of passing in a Parmnum to set a specific field.

The following data structures also are supported on down-level systems such as LAN Manager 2.x:

User Information (level 1003)

The USER_INFO_1003 data structure has the following format:

Within this structure, usri1003_password specifies the password for the user account.

User Information (level 1005)

The USER_INFO_1005 data structure has the following format:

Within this structure, usri1005_priv specifies the level of privilege assigned to the user.

User Information (level 1006)

The USER_INFO_1006 data structure has the following format:

Within this structure, usri1006_home_dir specifies the path name of user’s home directory.

User Information (level 1007)

The USER_INFO_1007 data structure has the following format:

Within this structure, usri1007_comment specifies the comment describing the user privileges and other account information.

User Information (level 1008)

The USER_INFO_1008 data structure has the following format:

Within this structure, usri1008_flags specifies the user account features. Its values can be found in the description for usri1_flags in the user_info_1 data structure.

User Information (level 1009)

The USER_INFO_1009 data structure has the following format:

Within this structure, usro1009_script_path specifies the path name of the user’s logon script.

User Information (level 1010)

The USER_INFO_1010 data structure has the following format:

Within this structure, usri1010_auth_flags specifies the authorization flags for the user.

User Information (level 1011)

The USER_INFO_1011 data structure has the following format:

Within this structure, usri1011_full_name specifies the full name of the user.

User Information (level 1012)

The USER_INFO_1012 data structure has the following format:

Within this structure, usri1012_usr_comment specifies a user comment.

User Information (level 1013)

The USER_INFO_1013 data structure has the following format:

Within this structure, usri1013_parms is used for application-specific parameters.

User Information (level 1014)

The USER_INFO_1014 data structure has the following format:

Within this structure, usri1014_workstations contains a list of names of workstations from which a user can log on.

User Information (level 1017)

The USER_INFO_1017 data structure has the following format:

Within this structure, usri1017_acct_expires specifies when the user account will expire.

User Information (level 1018)

The USER_INFO_1018 data structure has the following format:

Within this structure, usri1018_max_storage specifies the maximum amount of disk space the user can use.

User Information (level 1020)

The USER_INFO_1020 data structure has the following format

Within this structure, all of the parameters are the same as the corresponding parameters in user_info_2 data structure.

User Information (level 1023)

The USER_INFO_1023 data structure has the following format:

Within this structure, usri1023_logon_server parameter is the same as the corresponding parameter in user_info_2 data structure.

User Information (level 1024)

The USER_INFO_1024 data structure has the following format:

Within this structure, usri1024_country_code specifies the country code for the user’s language of choice.

User Information (level 1025)

The USER_INFO_1025 data structure has the following format:

Within this structure, usri1025_code_page specifies the code page for the user’s language of choice.

User Information (level 1051)

The USER_INFO_1051 data structure has the following format:

Within this structure, usri1051_primary_group_id specifies the relative ID of the user’s primary group in the security database.

User Information (level 1052)

The USER_INFO_1052 data structure has the following format:

Within this structure, usri1052_profile specifies the path of the user’s profile.

User Information (level 1053)

The USER_INFO_1053 data structure has the following format:

Within this structure, usri1053_home_dir_drive specifies the drive on which the user’s home directory is located.

User Modals Information (level 0)

The user_modals_info_0 data structure that can be used by NetUserModalsGet and NetUserModalsSet has the following format:

Within this structure, the following parameters are defined:

usrmod0_min_passwd_len specifies the minimum allowable password length. Valid values for this element are 0 through LM20_PWLEN, as defined in the netcons.h header file.

usrmod0_max_passwd_age specifies the maximum allowable password age (in seconds). A value of TIMEQ_FOREVER, as defined in the access.h header file, indicates that the password never expires. The minimum valid value for this element is ONE_DAY, as defined in the access.h header file. The value specified must be greater than or equal to the value for usrmod0_min_passwd_age.

usrmod0_min_passwd_age specifies the minimum elapsed time (in seconds) between when the password was last changed and when it can be changed again. A value of 0 indicates that no delay is required between password updates. The value specified must be less than or equal to the value for usrmod0_max_passwd_age.

usrmod0_force_logoff specifies the amount of time (in seconds) between the end of the valid logon time and the time when the user is forced off the network. A value of TIMEQ_FOREVER, as defined in the access.h header file, indicates that the user is never forced off. A value of 0 indicates that the user will be forced off immediately when the valid logon time expires.

usrmod0_password_hist_len specifies the length of password history maintained. A new password cannot match any of the previous usrmod0_password_hist_len passwords. Valid values for this element are 0 through DEF_MAX_PWHIST, as defined in the access.h header file.

usrmod0_reserved1 reserved; must be 0.

The USER_MODALS_INFO_0 structure that can be used by UserModalsGet32 or UserModalsSet32 has the following format:

Within this structure, all of the parameters are defined in the same way as in the user_modals_0 data structure.

User Modals Information (level 1)

The user_modals_info_1 data structure that can be used by NetUserModalsGet and NetUserModalsSet has the following format:

Within this structure, the following parameters are defined:

usrmod1_role specifies the role of the logon server. The access.h header file defines these possible values:

Code

Value

Meaning

UAS_ROLE_BACKUP

2

Logon server is a backup.

UAS_ROLE_PRIMARY

3

Logon server is a domain controller.

usrmod1_primary specifies the name of the domain controller where the primary copy of the security database file is stored.

The USER_MODALS_INFO_1 structure that can be used by UserModalsGet32 or UserModalsSet32 has the following format:

Within this structure, all of the parameters are defined in the same way as in the user_modals_1 data structure.

User Modals Information (level 2)

The USER_MODALS_INFO_2 structure that can be used by UserModalsGet32 or UserModalsSet32 has the following format:

Within this structure, usrmod2_domain_name specifies the domain name of a security database.

usrmod2_domain_id specifies the Security Identifier of the domain in usrmod2_domain_name.

User Modals Information (level 3)

The USER_MODALS_INFO_3 structure that can be used by UserModalsGet32 or UserModalsSet32 has the following format:

Within this structure, usrmod3_lockout_duration specifies a number of minutes for locked accounts to remain locked before automatically becoming unlocked. The range is from 1 to 99999. The value of TIMEQ_FOREVER specifies that the locked accounts remain locked until an administrator unlocks them.

usrmod3_lockout_observation_window specifies the maximum number of minutes that can occur between any two failed logon attempts for lockout to occur. The range is from 1 to 99999.

usrmod3_lockout_threshold specifies the number of failed logon attempts that will cause an account to be locked. The range is from 1 to 999.

The following info levels are valid only for NetUserModalsSet32 and replace the older way of passing in a Parmnum to set a specific field.

User Modals Information (level 1001)

The USER_MODALS_INFO_1001 data structure has the following format:

Within this structure, the parameter usrmod1001_min_passwd_len is defined in the same way as the corresponding parameter in the user_modals_info_0 data structure.

User Modals Information (level 1002)

The USER_MODALS_INFO_1002 data structure has the following format:

Within this structure, the parameter usrmod1002_max_passwd_len is defined in the same way as the corresponding parameter in the user_modals_info_0 data structure.

User Modals Information (level 1003)

The USER_MODALS_INFO_1003 data structure has the following format:

Within this structure, the parameter usrmod1003_min_passwd_age is defined in the same way as the corresponding parameter in the user_modals_info_0 data structure.

User Modals Information (level 1004)

The USER_MODALS_INFO_1004 data structure has the following format:

Within this structure, the parameter usrmod1004_force_logoff is defined in the same way as the corresponding parameter in the user_modals_info_0 data structure.

User Modals Information (level 1005)

The USER_MODALS_INFO_1005 data structure has the following format:

Within this structure, the parameter usrmod1005_password_hist_len is defined in the same way as the corresponding parameter in the user_modals_info_0 data structure.

User Modals Information (level 1006)

The USER_MODALS_INFO_1006 data structure has the following format:

Within this structure, the parameter usrmod1006_role is defined in the same way as the corresponding parameter in the user_modals_info_1 data structure.

User Modals Information (level 1007)

The USER_MODALS_INFO_1007 data structure has the following format:

Within this structure, the parameter usrmod1007_primary is defined in the same way as the corresponding parameter in the user_modals_info_1 data structure.

Group Membership Information (level 0)

The group_info_0 data structure that can be used by NetUserGetGroups and NetUserSetGroups has the following format:

Within this structure, grpi0_name specifies the group to which a user belongs. The constant LM20_GNLEN is defined in the netcons.h header file.

The GROUP_USERS_INFO_0 data structure that can be used by NetUserGetGroups32 and NetUserSetGroups32 has the following format:

Within this structure, grpui0_name specifies a group to which a user belongs.

Group Membership Information (level 1)

The GROUP_USERS_INFO_1 data structure that can be used by NetUserGetGroups32 and NetUserSetGroups32 has the following format:

Within this structure, grpui1_name specifies a group to which a user belongs.

grpi1_attributes specifies the set of flags describing the group’s characteristics.

Local Group Membership Information (level 0)

NetUserGetLocalGroups returns the following data structure:

Within this structure, lgrui0_name specifies the local group to which a user belongs.

User Validation Information (level 1)

A pointer to a user_logon_req_1 data structure is passed to NetUserValidate2. The user_logon_req_1 data structure has the following format:

Within this structure, the following parameters are defined:

usrreq1_name specifies the name of the user whose account is queried. The constant UNLEN is defined in the netcons.h header file.

usrreq1_pad_1 aligns the next data structure element on a word boundary.

usrreq1_password specifies the password of the user specified by usrreq1_name. The password can have as many as LM20_PWLEN non-NULL bytes, and must be followed by a terminating NULL character. The array is SESSION_PWLEN bytes long to allow for password encryption. The constants LM20_PWLEN and SESSION_PWLEN are defined in the netcons.h header file.

usrreq1_workstation points to an ASCIIZ string that contains the name of the workstation for which the user is requesting validation. A null string indicates the local workstation; a null pointer indicates to ignore the workstation.

Logon Information (level 1)

NetUserValidate2 returns a user_logon_info_1 structure. The user_logon_info_1 data structure has the following format:

Within this structure, the following parameters are defined:

usrlog1_code specifies the logon code used in conjunction with the code returned by the API function. For a list of the specific values, see the Return Codes section of the NetUserValidate2 description.

usrlog1_eff_name specifies the name of the account to which the user was logged on. The constant LM20_UNLEN is defined in the netcons.h header file.

usrlog1_pad_1 aligns the next data structure element on a word boundary.

usrlog1_num_logons specifies the number of times this user is logged on. A value of 1 means the number of logons is unknown.

usrlog1_bad_pw_count specifies the number of attempts to log on to this account using an incorrect password since the last successful logon.

usrlog1_last_logon specifies the time the user last logged on. This value is stored as the number of seconds elapsed since 00:00:00, January 1, 1970.

usrlog1_last_logoff specifies the time the user last logged off. This value is stored as the number of seconds elapsed since 00:00:00, January 1, 1970. A value of 0 means that the last logoff time is unknown.

usrlog1_logoff_time specifies the time the user should log off. This value is stored as the number of seconds elapsed since 00:00:00, January 1, 1970. A value of USER_NO_LOGOFF means the user never has to log off. The constant USER_NO_LOGOFF is defined in the access.h header file.

usrlog1_kickoff_time specifies the time the user will be logged off by the system. This value is stored as the number of seconds elapsed since 00:00:00, January 1, 1970. A value of USER_NO_LOGOFF means the user will not be logged off by the system. The constant USER_NO_LOGOFF is defined in the access.h file.

usrlog1_password_age specifies how many seconds have elapsed since the user password was last changed.

usrlog1_pw_can_change specifies the time when the user is allowed to change the password. This value is stored as the number of seconds elapsed since 00:00:00, January 1, 1970. A value of TIMEQ_FOREVER means the user can never change the password. The constant TIMEQ_FOREVER is defined in the access.h header file.

usrlog1_pw_must_change specifies the time when the user must change the password. This value is stored as the number of seconds elapsed since 00:00:00, January 1, 1970.

usrlog1_computer specifies which server validated the user’s logon.

usrlog1_domain specifies in which domain the user is logged on.

usrlog1_script_path specifies the relative path to the user logon script.

usrlog1_reserved1 reserved; the value is undefined. This element should not be used.

For NetUserSetInfo32, parmnum values refer to the fields in the USER_INFO structure as follows. These values are used when indicating an error in a specific parameter via parm_err.

parmnum value

Field in user_info struct

USER_NAME_PARMNUM

usri_name

USER_PASSWORD_PARMNUM

usri_password

USER_PASSWORD_AGE_PARMNUM

usri_password_age

USER_PRIV_PARMNUM

usri_priv

USER_HOME_DIR_PARMNUM

usri_home_dir

USER_COMMENT_PARMNUM

usri_comment

USER_FLAGS_PARMNUM

usri_flags

USER_SCRIPT_PATH_PARMNUM

usri_script_path

USER_AUTH_FLAGS_PARMNUM

usri_auth_flags

USER_FULL_NAME_PARMNUM

usri_full_name

USER_USR_COMMENT_PARMNUM

usri_usr_comment

USER_PARMS_PARMNUM

usri_parms

USER_WORKSTATIONS_PARMNUM

usri_workstations

USER_LAST_LOGON_PARMNUM

usri_last_logon

USER_LAST_LOGOFF_PARMNUM

usri_last_logoff

USER_ACCT_EXPIRES_PARMNUM

usri_acct_expires

USER_MAX_STORAGE_PARMNUM

usri_max_storage

USER_UNITS_PER_WEEK_PARMNUM

usri_units_per_week

USER_LOGON_HOURS_PARMNUM

usri_logon_hours

USER_PAD_PW_COUNT_PARMNUM

usri_bad_pw_count

USER_NUM_LOGONS_PARMNUM

usri_num_logons

USER_LOGON_SERVER_PARMNUM

usri_logon_server

USER_COUNTRY_CODE_PARMNUM

usri_country_code

USER_CODE_PAGE_PARMNUM

usri_code_page

USER_PRIMARY_GROUP_PARMNUM

usri_primary_group_id

USER_PROFILE

usri_profile

USER_HOME_DIR_DRIVE_PARMNUM

usri_home_dir_drive

For NetUserModalsSet32, parmnum values refer to the fields in the modals_info structure as follows. These values are used when indicating an error in a specific parameter via parm_err.

parmnum value

Field in modals_info struct

MODALS_MIN_PASSWD_LEN_PARMNUM

usrmod_min_passwd_len

MODALS_MAX_PASSWD_AGE_PARMNUM

usrmod_max_passwd_age

MODALS_MIN_PASSWD_AGE_PARMNUM

usrmod_min_passwd_age

MODALS_FORCE_LOGOFF_PARMNUM

usrmod_force_logoff

MODALS_PASSWD_HIST_LIST_PARMNUM

usrmod_passwd_hist_list

MODALS_ROLE_PARMNUM

usrmod_role

MODALS_PRIMARY_PARMNUM

usrmod_primary

MODALS_DOMAIN_NAME_PARMNUM

usrmod_domain_name

MODALS_DOMAIN_ID_PARMNUM

usrmod_domain_id

MODALS_LOCKOUT_DURATION_PARMNUM

usrmod_lockout_duration

MODALS_LOCKOUT_OBSERVATION _WINDOW_PARMNUM

usrmod_lockout_observation_window

MODALS_LOCKOUT_THRESHOLD _PARMNUM

usrmod_lockout_threshold

Previous Page Page Top Index Next Page See Page