Ask the Expert

iSeries user ID's

I need to establish iSeries user ID's quickly. Each will have identical authority and will be named concurrently. Is there a way to batch this, or will I need to create/copy each one manually?

I'm not clear on exactly what's wanted. Here's a sample script that will create 400 identical users named T001 through T400:

 
pgm

   dcl        &ucnt      *dec  (  3 0 )
   dcl        &ucnt_c    *char    3
   dcl        &NewPrf    *char   10

   chgvar     &ucnt    ( 1 )

Nxt_Prf:

   chgvar     &ucnt_c    &ucnt
   chgvar     &NewPrf  ( 'T' *cat &ucnt_c )

   crtusrprf  &NewPrf

   chgvar     &ucnt    ( &ucnt + 1 )

   if       ( &ucnt *le 400 )                 +
                 goto Nxt_Prf

   return
endpgm 

Although this creates the user profiles as you requested, they are simply identical.

Unfortunately, this opens up any number of follow on questions: Should they duplicate some existing profile? If a template profile exists, should the same private authorities be replicated? Or is there simply a known set of authorities that should be granted to each?

Profile creation is easily scripted; replicating authorities requires more info that would be specific to your site and needs.

This code should be used for example purposes only and as a starting point for you to develop the custom scripts that will fulfill your company's needs.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Search400's targeted search engine: Get relevant information on security.

Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.

Check out this Search400.com Featured Topic: Top ten security tips


This was first published in October 2003

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: