Command reference / sec
DLTUSRPRF
Delete User Profile
Deletes a user profile from the system. The caller needs *SECADM special authority, which can be obtained through program adoption, plus *OBJEXIST and *USE authority to the profile. The profile's message queue is deleted automatically if the profile owns it. A damaged profile can be deleted and re-created with CRTUSRPRF, after which owned and primary-group objects can be transferred back and authorities must be granted again with GRTOBJAUT.
Allowed environments: *ALL.
Positional parameters: 1.
Restrictions
- Requires *USE and *OBJEXIST authority to the user profile.
- Requires *OBJEXIST, *USE, and *DLT authority to delete a message queue that is associated with and owned by the profile.
- The profile cannot be deleted while a user is running under it, or while it owns objects and OWNOBJOPT(*NODLT) is specified. Owned objects must be transferred with CHGOBJOWN or deleted, or OWNOBJOPT(*DLT) or OWNOBJOPT(*CHGOWN user-profile-name) can be used. Granted authority is revoked automatically when the profile is deleted.
- Requires *OBJEXIST authority to any object being deleted.
- The profile cannot be deleted while it is the primary group for any object. Transfer those objects with CHGOBJPGP, or specify PGPOPT(*CHGPGP user-profile-name).
- The command calls system distribution directory support to remove the user from the directory and from distribution lists. Commitment control must be inactive; if it is active, the journal must be QUSRSYS/QAOSDIAJRN.
- Adopted authority is not used when deleting, changing the owner of, or changing the primary group of file system objects (*DIR, *STMF, *SOCKET, *SYMLNK, *BLKSF, *CHRSF, *FIFO). Without *ALLOBJ special authority, OWNOBJOPT(*DLT) requires *OBJEXIST authority to the object and *WX authority to its directory, and PGPOPT(*CHGPGP) requires owning the object.
Parameters
USRPRF
User profile
Names the user profile to delete. This parameter is required. IBM-supplied profiles such as QSECOFR, QSYS, and QSYSOPR cannot be specified.
OWNOBJOPT
Owned object option
Controls what happens to the objects the profile owns.
Suggested / special values:
*NODLT, *DLT
*NODLT- Owned objects are not changed, and the profile is not deleted if it owns any objects.
*DLT- Owned objects are deleted. The profile is deleted only if deletion of all owned objects succeeds.
*CHGOWN- Owned objects are transferred to the user profile named in the second element. The profile is deleted only if the transfer of all owned objects succeeds.
Elements in order
Owned object value
Owned object value
Allowed values:
*CHGOWN
User profile name if *CHGOWN
User profile name if *CHGOWN
PGPOPT
Primary group option
Controls what happens to the objects for which the profile is the primary group.
Suggested / special values:
*NOCHG
*NOCHG- Those objects are not changed, and the profile is not deleted if it is the primary group for any object.
*CHGPGP- Those objects are transferred to the named new primary group. The profile is deleted only if all transfers succeed.
*NONE- The objects are left without a primary group.
*OLDPGP- The new primary group gets the same authority to each object that the old primary group had.
*PRIVATE- If the new primary group has private authority to an object, it becomes that object's primary group with that authority. Otherwise it becomes the primary group with no authority.
*ALL- The new primary group gets *ALL authority to each object.
*CHANGE- The new primary group gets *CHANGE authority to each object.
*USE- The new primary group gets *USE authority to each object.
*EXCLUDE- The new primary group gets *EXCLUDE authority to each object.
Elements in order
Primary group value
Primary group value
Allowed values:
*CHGPGP
New primary group
New primary group
Suggested / special values:
*NONE
New primary group authority
New primary group authority
Allowed values:
*OLDPGP, *PRIVATE, *ALL, *CHANGE, *USE, *EXCLUDE
EIMASSOC
EIM association
Controls whether Enterprise Identity Mapping (EIM) associations for this user are deleted from the local registry. All association types are covered: target, source, admin, and policy.
Allowed values:
*DLT, *NODLT
*DLT- EIM associations are deleted.
*NODLT- EIM associations are kept. A profile later created with the same name would use them.
Examples
DLTUSRPRF USRPRF(JJADAMS)
Deletes profile JJADAMS only if it owns no objects, no user is running under it, and it is not the primary group of any object.
Generated from os/cl/catalog/DLTUSRPRF.json and os/cl/help/DLTUSRPRF.json.