RxNet: Difference between revisions
Appearance
Created page with "This function allows you to make certain NetApi calls from Rexx. This enables you to do such things as changing passwords, adding and deleting userids, validating a userid/pw,..." |
mNo edit summary |
||
| Line 1: | Line 1: | ||
This function allows you to make certain NetApi calls from Rexx. This enables you to do such things as changing passwords, adding and deleting userids, validating a userid/pw, listing users and logons. | This function allows you to make certain NetApi calls from Rexx. This enables you to do such things as changing passwords, adding and deleting userids, validating a userid/pw, listing users and logons. | ||
==Syntax== | ==Syntax== | ||
| Line 5: | Line 5: | ||
==Parameters== | ==Parameters== | ||
;func | |||
; func | 'UserPwSet' /* Change a user's password */ | ||
'UserAdd' /* Add a user to UPM */ | |||
'UserDel' /* Delete a user from UPM */ | |||
'UserVal' /* Validate a userid/password without logging on */ | |||
'UserEnum' /* List users in UPM */ | |||
'UserGetInfo' /* Get user information */ | |||
'LogonEnum' /* List active logons */ | |||
'FileEnum' /* File usage on the LAN */ | |||
'UseAdd' /* Do a "Net Use dev \\srv\alias" */ | |||
'UseDel' /* Do a "Net Use dev /d" */ | |||
'UseEnum' /* Do a "Net Use" */ | |||
;server: name of server, or '00'x for local | |||
; server | |||
: name of server, or '00'x for local | |||
==Return== | ==Return== | ||
; netrc | ;netrc: return code from NetApi call. If netrc < 2100, then it's probably a base OS/2 return code, otherwise, it's defined in NETCONS.H | ||
: return code from NetApi call. If netrc < 2100, then it's probably a base OS/2 return code, otherwise, it's defined in NETCONS.H | |||
/* Specific calls */ | /* Specific calls */ | ||
Latest revision as of 14:08, 8 June 2019
This function allows you to make certain NetApi calls from Rexx. This enables you to do such things as changing passwords, adding and deleting userids, validating a userid/pw, listing users and logons.
Syntax
netrc = RxNet(func, server, arg3, arg4, arg5, arg6)
Parameters
- func
'UserPwSet' /* Change a user's password */ 'UserAdd' /* Add a user to UPM */ 'UserDel' /* Delete a user from UPM */ 'UserVal' /* Validate a userid/password without logging on */ 'UserEnum' /* List users in UPM */ 'UserGetInfo' /* Get user information */ 'LogonEnum' /* List active logons */ 'FileEnum' /* File usage on the LAN */ 'UseAdd' /* Do a "Net Use dev \\srv\alias" */ 'UseDel' /* Do a "Net Use dev /d" */ 'UseEnum' /* Do a "Net Use" */
- server
- name of server, or '00'x for local
Return
- netrc
- return code from NetApi call. If netrc < 2100, then it's probably a base OS/2 return code, otherwise, it's defined in NETCONS.H
/* Specific calls */
netrc = RxNet('UserPwSet', server, userid, oldpw, newpw)
netrc = RxNet('UserAdd', server, userid, password, type, comment)
type = 'User', 'Guest', or 'Admin'
netrc = RxNet('UserDel', server, userid)
netrc = RxNet('UserVal', server, userid, password)
netrc = RxNet('UserEnum',server, rexxstem [,uidfilter][,infotype])
uidfilter = userid prefix filter (i.e. only return info on
those userids whose leading characters match
this prefix).
infotype = "FULL" or "USERNAME" which indicates what type
of information to return
rexxstem = Rexx stem name, under which results are mapped as:
stem.0 = if "uidfilter" not supplied:
- number of entries returned in stem
if "uidfilter" was supplied, two blank
delimited integers:
- number of entries returned in stem
- total number of entries
stem.n.1 = userid
If infotype = "FULL", the following also:
stem.n.2 = privilege level (Guest, User, Admin, ?)
stem.n.3 = password age (in seconds)
stem.n.4 = comment
stem.n.5 = script path
stem.n.6 = full name
stem.n.7 = user comment
stem.n.8 = parms
stem.n.9 = logon server
netrc = RxNet('UserGetInfo',server, rexxstem ,username)
username = username to get information for
rexxstem = Rexx stem name, under which results are mapped as:
stem.1 = userid
stem.2 = privilege level (Guest, User, Admin, ?)
stem.3 = password age (in seconds)
stem.4 = comment
stem.5 = script path
stem.6 = full name
stem.7 = user comment
stem.8 = parms
stem.9 = logon server
netrc = RxNet('LogonEnum',server, rexxstem)
rexxstem = Rexx stem name, under which results are mapped as:
stem.0 = number of users
stem.n.1 = userid
netrc = RxNet('FileEnum',server, basepath, username, rexxstem)
basepath = file path/name qualifier
username = username qualifier
rexxstem = Rexx stem name, under which results are mapped as:
stem.0 = number of entries
stem.n.1 = file-id
stem.n.2 = permissions
stem.n.3 = numlocks
stem.n.4 = pathname
stem.n.5 = username
netrc = RxNet('UseAdd', server, device, name, password)
device = Local name for resource, such as a drive letter
name = server\alias (must be like "\\servname\alias")
password = optional password to use resource
netrc = RxNet('UseDel', server, device, forcemode)
device = Local name for resource, such as a drive letter
forcemode = 'F'orce
'N'o force
'M'ax force
netrc = RxNet('UseEnum',server, rexxstem)
rexxstem = Rexx stem name, under which results are mapped as:
stem.0 = number of entries
stem.n.1 = device name
stem.n.2 = name
stem.n.3 = status, values are:
Ok
Paused
Disconnected/SessionLost
NetError
Connecting
Reconnecting
?
stem.n.4 = asg_type, values are:
WildCard
DiskDevice
SpooledPrinter
SerialDevice
IPC (InterProcessCommunication)