0.9b (c) 1995 Peter Childs
The function modifies one of the userid definition parameter values. See also the additional userid account modification functions below:
o NETUSERPASSWORD Set Info o NETEXPIREPASSWORD Expire password o NETHOMEDIR Set Info
Syntax
MyRc = NetSetInfo(NETUSER, 'PARAMETER', parmValue, SrvName, UserId)
Parameters
The parameters required are:
'PARAMETER' The parameter name of the application value to be modified. The parameter values that causes a change of the userid definitions are specified below. Only one parameter value can be changed at a time. If the parameter is invalid or the parameter value is unknown or in error, no changes will occur.
o name
The user account name
o password
The user account password
o priv
The user account privilege level. The following values are allowed:
Account type Value ------------ ----- Guest 'Guest' User 'User' Administrator 'Admin'
o home_dir
If home_dir is set to a none value, the home directory is removed
If a drive assignment is required, the home_dir value must include:
x:\machineID\Y$\pathname ! ! ! ! ! ! ! The path to the home directory ! ! The drive on the server holding the home directory ! The computer name of the server The drive to be assigned
For example, the userid home directory has to be located on the server FILESRV on drive D and directory \FILES\USERID. The userid will have the home directory assigned as the Y drive. This requires the following definition of the home directory:
Y:\FILESRV\D$\FILES\USERID
Another method is, when a drive assignment is not required, the home_dir value must include:
\\machineID\Y$\pathname ! ! ! ! ! The path to the home directory ! The drive on the server holding the home directory The computer name of the server
For example, the userid home directory has to be located on the server THESRV on drive F and directory \FILES\USERS\SHARED. The userid will have the home directory assigned as the first free drive. This requires the following definition of the home directory:
\\THESRV\F$\FILES\USERS\SHARED
o comment
The user account comment string. Up to 48 characters can be specified
o flags
User account flags. See below for the numeric values allowed:
Value Meaning ----- ------- S Must be set. Logon script enabled D User account disabled U User account cannot be deleted H Home directory required N Password not required C User cannot change password
You can combine flags by adding the values into a string of values
o script_path
The name of the logon script together with the path specification relative to the NETLOGON SCRIPT parameter
o auth_flags
Grants operator privilege (accounts, print, comm, and server) to users. See below for the character values allowed:
Value Meaning ----- ------- P Print operator privilege is enabled C Comm operator privilege is enabled S Server operator privilege is enabled A Accounts operator privilege is enabled
You can combine operator privileges by adding the values into a string
o full_name
The full name of the user. Up to 48 characters can be specified
o usr_comment
The account comment which is a user-settable comment. Up to 48 characters can be specified
o workstations
A string containing a list of requesters from which a userid is permitted to log on. A null string means all requesters are allowed. (To disallow logon, the account disabled flag must be set.) Up to 8 requesters can be specified, where the names are separated by spaces
o max_storage
The maximum storage allotted for the home directory in kilobytes. Use the value -1 to specify no limit
o logon_server
The computer to handle logon requests for a user account
parmValue The value of the parameter that is being modified
SrvName The server computer name. In this case the computer name of the domain controller
UserId The user account must be specified
Note
The server computer name can be specified as '' for a local domain controller.
Example
/* Modify the max_storage parameter for a userid */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs NETUSER = 280 SrvName = '\\ILIDC' UserId = 'THEONE' usrInfo.max_storage = 1024 myRc = NetSetInfo(NETUSER, 'max_storage', usrInfo.max_storage, SrvName, UserId) if myRc <> '0' then do say 'Got error from NetSetInfo() ' myRc call DropLsRxutFuncs exit 9 end else do say say "Set home directory max storage parameter successfully" end call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit 0
Example Output
Set home directory max storage parameter successfully
Inf-HTML End Run - Successful