IBM OS/2 LAN Server REXX Utility DLL


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


NETUSERGROUPS Set Info


The function sets the groups of which a user account is a member.   
Syntax 

MyRc = NetSetInfo(NETUSERGROUPS, 'GroupNames', SrvName, UserId)

  
Parameters 
The parameters required are: 
'GroupNames'      The REXX variable describing the groups a userid is 
                  belonging to 
   o GroupNames.count 
     The number of the groups 
   o GroupNames.i.groupname 
     The group name entry i 
SrvName           The computer name of the domain controller 
UserId            The name of the user account 
  
Note 
The server computer name can be specified as '' for a local domain 
controller.   
Example   

/* Set userid group membership */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETUSERGROUPS = 330
SrvName  = '\\DOMAIN_CONTRLR'
UserId   = 'WS2222'

groupNames.count = 3
groupNames.1.name = 'GROUPA'
groupNames.2.name = 'GROUPB'
groupNames.3.name = 'GROUPC'

myRc = NetSetInfo(NETUSERGROUPS, 'groupNames', SrvName, UserId)

if myRc <> '0' then do
 say 'Got error from NetSetInfo() ' myRc
 exitRc = 9
end
else do
 say 'Done'
end

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit exitRc

  
Example Output   

Done

  

Inf-HTML End Run - Successful