The Rename User Profile command allows an existing user to be renamed
to a different name. Owned objects, authorizations, authorization
lists, spooled files, names within Job Descriptions, names within Job
Schedule entries, IFS objects, IFS authorizations, members of a group
if a group profile, and Directory entries are changed. The name
within user data files are not changed.
You must have both *ALLOBJ and *SECADM special authorities to use
RNMUSRPRF. The user must not have any active interactive or batch
jobs.
Assume that user JONES has changed her name to SMITH. Renaming can
occur by specifying:
RNMUSRPRF OLDUSRPRF(JONES) NEWUSRPRF(SMITH) TEXT('...')
The OLDUSRPRF profile must exist and the NEWUSRPRF profile must not
exist.
The command would do the following:
** A new user profile is created by use of the TAA CPYUSRPRF
command. The new text description is assigned. Most
attributes are copied, but some exceptions exist (see
CPYUSRPRF tool).
** Because the system automatically creates a message queue for
the new user in QUSRSYS, the message queue for the old user is
deleted.
** Any owned objects would be changed to the new owner name. The
system CHGOBJOWN command is used.
** Any existing authorities would be changed to the new name.
For example, if JONES had been authorized to a file, the same
authorizations would exist for SMITH. This occurs by
accessing the existing authorities for the old user, using the
system GRTOBJAUT command for the new user and RVKOBJAUT for
the old user.
** Any authorizations to Authorization lists are also accounted
for.
** Any Job Descriptions that contain the old user name in the
USER parameter would be changed to the new name. The system
CHGJOBD command is used.
** Any Job Schedule entries that contain the old user name in the
USER parameter would be changed to the new name. The system
CHGJOBSCDE command is used.
** Any existing spooled files owned by the old owner would be
changed to the new owner name. An option exists to not change
the ownership (see the SPLF parameter). Changing of the owner
occurs by use of the TAA DUPSPLF command and specifying the
new user name as the owner. The new spooled file will have a
different date and time (file open date and time). The old
spooled file is deleted.
** Any authorities that existed on the old user profile are
duplicated to the new user profile. The user who runs
RNMUSRPRF would become the owner and would have *ALL
authority. The old users authority would be removed when the
old user profile is deleted.
** Any directory entries for the old user would be changed to the
new user. This occurs by reading the directory information
for the old user and using the system CHGDIRE command.
** Members of a group if the named old user is a group profile.
A member of the group may be signed on.
** IFS objects that are owned by the old user are changed by the
sub tool CHGIFSOWN2 which creates a separate listing. The new
user profile is created with a home directory of the new user
profile name. The home directory specified for the old user
is renamed to the home directory of the new user.
** If the old user was authorized to an IFS object, the
authorities are changed to the new user by the sub tool
RNMIFSAUT. A separate listing is output.
** If no errors occur, the old user profile is deleted. Any use
of the old user as a Primary Group Profile (*PGP) is
transferred to the new user.
A spooled file is created which includes all of the changes that have
occurred as well as any errors. For example, if an object is locked,
the change of owner or granting and revoking authorities will fail.
Excess spooled files
--------------------
If the user owns a large number of spooled files, RNMUSRPRF will take
a long time. You can use WRKSPLF to determine this. If a large
number of spooled files exists and are not needed, use DLTOLDSPLF to
delete them.
See the discussion in the SPLF parameter for how the transfer of a
spooled file to the new owner occurs.
Restart capability
------------------
RNMUSRPRF allows a restart capability. If you correct the problems
(or wait until the locks are available), the command can be
re-entered with the RESTART parameter.
RNMUSRPRF OLDUSRPRF(JONES) NEWUSRPRF(SMITH) RESTART(*YES)
Specifying RESTART(*YES) requires that both user profiles exist. The
same functions as described previously are run thru. If a prior use
of RNMUSRPRF has made all the required changes for a specific
function such as all owned objects were changed or the user does not
have any owned objects, the function completes normally. If all of
the functions complete normally, the old user profile is deleted.
A prompt override program exists so that the text for the old user
profile can be seen. If you enter:
RNMUSRPRF OLDUSRPRF(JONES) NEWUSRPRF(SMITH)
and press F4, the text for the old user profile appears in the
command prompt for the TEXT parameter.
RNMUSRPRF escape messages you can monitor for
---------------------------------------------
TAA9892 The user has active jobs.
TAA9893 A failure occurred - See spooled file.
Escape messages from based on functions will be re-sent.
Command parameters *CMD
------------------
OLDUSRPRF The name of the old user profile that is to be
renamed.
NEWUSRPRF The name to be assigned to the new user profile.
RTNOLDPRF A *YES/*NO value for whether to retain the old
profile.
*NO is the default which causes the old profile to
be deleted if the command ends normally.
*YES may be specified to disable the old profile and
retain it on the system.
TEXT The text description assigned to the new user
profile. This parameter is ignored for
RESTART(*YES). If OLDUSRPRF and NEWUSRPRF are
entered and the RNMUSRPRF command is prompted for,
the text for the old user profile will appear as the
default for the TEXT parameter.
SPLF A *YES/*NO parameter for whether spooled files
should be transferred to the new user. *YES is the
default. This causes the spooled file to be
duplicated so the new owner (To user) can be
established. The date and time of the open will be
when the duplication occurred. The old spooled file
is deleted.
*NO may be specified to not transfer the spooled
files. If you need to maintain the information
about when the spooled file was actually created,
use *NO.
RESTART Whether this is a restart of a previous use of
RNMUSRPRF for the same old user. *NO is the default
meaning this is the first time RNMUSRPRF is run for
the old user. The new user profile must not exist.
*YES may be specified to cause a restart. The new
user profile must exist. The same functions are run
to change ownership, re-grant authorities, etc.
Restrictions
------------
The user must not have any active interactive or batch jobs.
The use of CPYUSRPRF has some restrictions (it does not copy every
existing attribute).
The method of removing the old directory entry and and adding a new
entry may cause some loss of existing attributes.
Use of the Old user name within user or TAA objects is not changed.
For example, the Old user name may exist in a user data file.
Authorizations to IFS object types such as *STMF are not
transferred unless the old user is the owner. If the old user
profile is deleted, the IFS authorizations are deleted.
Prerequisites
-------------
The following TAA Tools must be on your system:
CHKACTUSR Check active user
CHKALLOBJ Check *ALLOBJ special authority
CHKOBJ3 Check object 3
CPYUSRPRF Copy user profile
CVTJOBSCDE Convert job schedule entries
CVTWRKSPLF Convert work spooled file
DUPSPLF Duplicate spooled file
FMTLIN Format line
RTVJOBD Retrieve job description
RTVSPCAUT Retrieve special authorities
RTVSYSVAL3 Retrieve system value 3
SNDCOMPMSG Send completion message
SNDESCMSG Send escape message
SNDSTSMSG Send status message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
RNMUSRPRF *CMD TAASEEU QATTCMD
TAASEEUC *PGM CLP TAASEEUC QATTCL
TAASEEUC10 *PGM CLP TAASEEUC10 QATTCL
TAASEEUC11 *PGM CLP TAASEEUC11 QATTCL
TAASEEUC12 *PGM CLP TAASEEUC12 QATTCL
TAASEEUC13 *PGM CLP TAASEEUC13 QATTCL
TAASEEUC14 *PGM CLP TAASEEUC14 QATTCL
TAASEEUC15 *PGM CLP TAASEEUC15 QATTCL
TAASEEUC16 *PGM CLP TAASEEUC16 QATTCL
TAASEEUC17 *PGM CLP TAASEEUC17 QATTCL
TAASEEUC18 *PGM CLP TAASEEUC18 QATTCL
TAASEEUC19 *PGM CLP TAASEEUC19 QATTCL
TAASEEUR *PGM RPG TAASEEUR QATTRPG
Sub CL programs used
--------------------
TAASEEUC is the CPP. It prints the final set of information using
the TAASEEUR RPG program. TAASEEUC10 is a prompt override program to
access the text for the old user profile. The following CL programs
are called and each uses TAASEEUR also:
TAASEEUC11 CL pgm - Changes owned objects
TAASEEUC12 CL pgm - Does GRTOBJAUT and RVKOBJAUT
TAASEEUC13 CL pgm - Changes USER parameter of JOBDs
TAASEEUC14 CL pgm - Changes owner of spooled file using DUPSPLF
TAASEEUC15 CL pgm - Does RMVDIRE and ADDDIRE
TAASEEUC16 CL pgm - Changes job schedule entries if any
TAASEEUC17 CL pgm - Changes members of a group
TAASEEUC18 CL pgm - Changes IFS ownership
TAASEEUC19 CL pgm - Renames IFS authorities
|