Author Topic: Bringing Up A New Instance, How Do You "Seed" The Userids?  (Read 3746 times)

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 1202
    • View Profile
Bringing Up A New Instance, How Do You "Seed" The Userids?
« on: January 02, 2015, 11:11:56 AM »
Problem:  brought up a new test instance and we want to copy over all of the userids.

Solution: use ARSXML, but it's not quite that straightforward

Note:  This assumes that you used the wizard to set up the new instance and you have a user admin pw sysadmin set up in the new instance.


This is one way to do it on z.

1. Create the following USS file:

********************************* Top of Data *****************************
<?xml version="1.0" encoding="IBM-1047"?>                                 
<onDemand xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"           
xsi:noNamespaceSchemaLocation="/usr/lpp/ars/V9R5M0/bin/xml/ondemand.xsd"> 
                                                                           
                                                                           
<!--  This will export all of the users  -->                               
                                                                           
<user name="_ALL"/>                                                       
                                                                           
</onDemand>                                                               
******************************** Bottom of Data ***************************


2. Run the following JCL to export all users to the file allusers.ebcdic.xml

//STEP1    EXEC PGM=BPXBATCH,REGION=0M                 
//SYSPRINT DD SYSOUT=*                                 
//SYSOUT   DD SYSOUT=*                                 
//STDPARM  DD *                                         
PGM /usr/lpp/ars/V8R5M0/bin/arsxml                     
export                                                 
-h ARCH850 -u arnie  -p password -v                   
-d /u/odv733/xml/                                       
-i                                                     
exportallusers.xml                                     
-o                                                     
/u/odv733/xml/allusers.ebcdic.xml                       
-w IBM-1047                                             
/*                                                     
//ARSBIN     DD PATH='/usr/lpp/ars/V8R5M0/bin'         
//SYSOUT     DD SYSOUT=*                               
//STDERR     DD SYSOUT=*                               
//STDOUT     DD SYSOUT=*                               
//SYSUDUMP   DD SYSOUT=*       


3. Ensure that the ars.ini for the new instance has

SRVR_FLAGS_SECURITY_EXIT=0                         

4. If you try to import that file it will fail because there are no passwords in there so you can do a change all to add a dummy password field to allusers.ebcdic.xml:

<user name="BRIAN" password="password" updateDate=...
</user>                                             
<user name="ED" password="password" updateDate=...
</user>                                             
<user name="LARRY" password="password" updateDate=...
</user>                                             
<user name="LAMIES" password="password" updateDate=...
...


5. Now you can import the users with this JCL

//STEP1    EXEC PGM=BPXBATCH,REGION=0M             
//SYSPRINT DD SYSOUT=*                             
//SYSOUT   DD SYSOUT=*                             
//STDPARM  DD *                                     
PGM /usr/lpp/ars/V9R5M0/bin/arsxml                 
add                                                 
-h ARCH950 -u admin   -p sysadmin -v -e c           
-d /u/odv733/xml/                                   
-i                                                 
allusers.ebcdic.xml                                 
/*                                                 
//ARSBIN     DD PATH='/usr/lpp/ars/V9R5M0/bin'     
//SYSOUT     DD SYSOUT=*                           
//STDERR     DD SYSOUT=*                           
//STDOUT     DD SYSOUT=*                           
//SYSUDUMP   DD SYSOUT=*             
               

6. Change ars.ini to
SRVR_FLAGS_SECURITY_EXIT=1

7. Restart ARSSOCKD and voila!  All userids are now in the new instance and their passwords will be verified against your external security manager.

Ed
« Last Edit: January 12, 2015, 02:41:48 PM by Ed_Arnold »
#zOS #ODF