Sample RACROUTE code to replace a password

Document ID : KB000015834
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

Sample RACROUTE code to replace a users password.

Question:

Sample RACROUTE code to replace a users password.

Answer:

Here is an example of a RACROUTE EXTRACT call to replace a password, this is similar to what you can find in the IBM manual on RACROUTE macros with some updates for a change password request:

RACROUTE REQUEST=EXTRACT, X
TYPE=REPLACE, ENCRYPT DATA X
RELEASE=1.9, RACF RELEASE X
CLASS='USER', CLASS NAME X
ENTITY=USERID, USER ID (ACID) X
FIELDS=FLDLIST, FIELD LIST X
SEGMENT=BASE, SEGMENT X
SEGDATA=SEGDLIST, NEW VALUES X
WORKA=RACWK RACF WORK AREA

USERID DC CL8'username'
BASE DC CL8'BASE'
FLDLIST DC A(1)
DC CL8'PASSWORD'
SEGDLIST DC AL4(8),CL8'password'

You will need to populate the USERID field with the ACID who is the target of the change, and you will need to populate the SEGDLIST value with the new password value that you want to match your phrase value. Do not supply a PASSDATE field value, the expiration date for the password will calculate automatically using the change date plus the expiration days associated with the user. Here is an example of a RACROUTE EXTRACT call to replace a password, this is similar to what you can find in the IBM manual on RACROUTE macros with some updates for a change password request:

RACROUTE REQUEST=EXTRACT, X
TYPE=REPLACE, ENCRYPT DATA X
RELEASE=1.9, RACF RELEASE X
CLASS='USER', CLASS NAME X
ENTITY=USERID, USER ID (ACID) X
FIELDS=FLDLIST, FIELD LIST X
SEGMENT=BASE, SEGMENT X
SEGDATA=SEGDLIST, NEW VALUES X
WORKA=RACWK RACF WORK AREA

USERID DC CL8'username'
BASE DC CL8'BASE'
FLDLIST DC A(1)
DC CL8'PASSWORD'
SEGDLIST DC AL4(8),CL8'password'

You will need to populate the USERID field with the ACID who is the target of the change, and you will need to populate the SEGDLIST value with the new password value that you want to match your phrase value. Do not supply a PASSDATE field value, the expiration date for the password will calculate automatically using the change date plus the expiration days associated with the user.

Please note. This is an example and not supported by CA. It is the responsibility to maintain or change to meet your requirements. For more details, please refer to IBM RACROUTE Macro Guide.