Adding a new user to a usergroup using ARSXML

Previous topic - Next topic

kit

Hello experts,

Just wondering if there a way we can add a new user to an existing usergroup in CMOD using ARSXML utility. I have tried the command below using the following sample input xml file but failed due to the group object name was exist.

           E:\Apps\IBM\OnDemand for Windows\V9.0\bin>arsxml add -h localhost -u userid -p password -i newuser1.xml
           ARS6822I Attempting login for userid 'yaht' on server 'localhost' ...
           ARS1609W Specifying passwords on the command line is insecure due to the text being visible. See the Installation and Configuration 
              Guide for your platform for information about the arsstash command or using Unified Login.
           ARS7743E A group object named 'APPS_ARMS_DEVL_SYSADMIN' already exists.
-----------------------------------------------
NEWUSER1.XML
-----------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>

<onDemand xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="E:\Apps\IBM\OnDemand for Windows\V9.0\xml\ondemand.xsd">

<user name="Bill" newName="Bill" password="password" description="ARMS System Admin" userType="User Admin"/>
<group name="APPS_ARMS_DEVL_SYSADMIN"/>

</onDemand>
------------------------------------------------

I appreciate your help.

Thanks,

Kit


Greg Ira


kit

I have tried using the update but it failed because it couldn't find the user since it's new user that i'm trying to add.

Greg Ira

So it sounds like you'll need to do it in two steps.  ARSXML add the user then ARSXML update the group with the user.

rick

Try add command and use error handling to update if already exists.

Ed_Arnold

Note that there are sample files addusers.xml and addusers.ebcdic.xml on my system anyway in /usr/lpp/ars/V8R5M0/bin/xml/samples/

Ed
#zOS #ODF

kit

Thanks a lot for all your help guys. I got it working now.
I used error handling(-e u) option and modify my xml input file. Please see below.

------COMMAND----------------------
arsxml add -h localhost -u <userid> -p <passw> -i NEWUSER1.XML -e u
---------------------------------------

----NEWUSER1.XML-------------------
<?xml version="1.0" encoding="UTF-8"?>
<onDemand xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="E:\Apps\IBM\OnDemand for Windows\V9.0\xml\ondemand.xsd">

<user name="Bill" newName="Bill" password="password" description="ARMS System Admin" userType="System Admin"/>
<group name="APPS_ARMS_DEVL_SYSADMIN">
   <user task="add" name="Bill"/>
</group>
</onDemand>
-----------------------------------------