How To
Summary
This document describes a supported method for reporting on newly created user profiles on IBM i using Audit Journal Services. By querying the system audit journal with SQL, administrators can identify when user profiles were created and which attributes were explicitly set at creation time. This approach is suitable for security auditing, compliance reporting, and forensic analysis.
Environment
- System security auditing must be enabled (QAUDCTL not *NONE).
- Auditing for user profile activity (*SECURITY audit value) must be active.
- Auditing for Creation (*CREATE audit value) must be active
- IBM i 7.4 or later with Audit Journal SQL Services available.
- Authority to query SYSTOOLS audit journal services.
Steps
Background
IBM i writes audit journal entries to QAUDJRN when user profiles are created or changed. Two audit journal entry types are relevant for reporting on new user profiles:
- CO (Create Object) – Records object creation, including *USRPRF objects.
- CP (User Profile Changes) – Records creation-time and change-time user profile attributes.
Audit Journal Services Used
- AUDIT_JOURNAL_CO is used to identify the creation of user profile objects (*USRPRF).
- AUDIT_JOURNAL_CP is used to retrieve the attributes that were explicitly specified during profile creation.
- Each attribute in CP entries is represented by its own column and populated only when that attribute is set.
SQL Report Definition
The following SQL statement reports newly created user profiles along with key attributes assigned at creation time. The query correlates CO and CP audit entries using the profile name and timestamp sequencing.
Using the Run SQL Scripts tool, run the following SQL Statement:
WITH Profile_Creation AS (
SELECT
co.OBJECT_NAME AS USER_PROFILE,
co.ENTRY_TIMESTAMP AS PROFILE_CREATE_TIMESTAMP,
cp.STATUS,
cp.GROUP_PROFILE_NAME AS GROUP_PROFILE,
cp.USER_CLASS_NAME AS USER_CLASS,
cp.SPECIAL_AUTHORITIES,
cp.INITIAL_PROGRAM,
cp.INITIAL_MENU,
cp.JOB_DESCRIPTION,
cp.LIMIT_CAPABILITIES,
cp.PASSWORD_EXPIRED,
cp.PASSWORD_CHANGED,
cp.MAXIMUM_ALLOWED_STORAGE,
cp.ENTRY_TIMESTAMP AS CP_ENTRY_TIMESTAMP,
ROW_NUMBER() OVER (
PARTITION BY co.OBJECT_NAME
ORDER BY cp.ENTRY_TIMESTAMP
) AS RN
FROM
TABLE(
SYSTOOLS.AUDIT_JOURNAL_CO(
STARTING_TIMESTAMP => TIMESTAMP('2026-03-30-00.00.00'),
ENDING_TIMESTAMP => CURRENT_TIMESTAMP
)
) AS co
INNER JOIN
TABLE(
SYSTOOLS.AUDIT_JOURNAL_CP(
STARTING_TIMESTAMP => TIMESTAMP('2026-03-30-00.08.00'),
ENDING_TIMESTAMP => CURRENT_TIMESTAMP
)
) AS cp
ON cp.USER_PROFILE = co.OBJECT_NAME
AND cp.COMMAND_TYPE = 'CRT'
AND cp.ENTRY_TIMESTAMP >= co.ENTRY_TIMESTAMP
WHERE
co.OBJECT_TYPE = '*USRPRF'
AND cp.COMMAND_TYPE = 'CRT'
)
SELECT
USER_PROFILE,
PROFILE_CREATE_TIMESTAMP,
STATUS,
GROUP_PROFILE,
USER_CLASS,
SPECIAL_AUTHORITIES,
INITIAL_PROGRAM,
INITIAL_MENU,
JOB_DESCRIPTION,
LIMIT_CAPABILITIES,
PASSWORD_EXPIRED,
PASSWORD_CHANGED,
MAXIMUM_ALLOWED_STORAGE,
CP_ENTRY_TIMESTAMP
FROM
Profile_Creation
WHERE
RN = 1
ORDER BY
USER_PROFILE;
NOTES:
- Adjust the Time Frame on the SQL
- Execution time for this SQL statement may vary depending on the size of the audit journal and the time range specified.
- If a user profile is modified after its initial creation, only the CP entry corresponding to the profile’s creation is included in the report.
Sample Report
| USER_PROFILE | PROFILE_CREATE_TIMESTAMP | STATUS | GROUP_PROFILE | USER_CLASS | SPECIAL_AUTHORITIES | INITIAL_PROGRAM | INITIAL_MENU | JOB_DESCRIPTION | LIMIT_CAPABILITIES | PASSWORD_EXPIRED | PASSWORD_CHANGED | MAXIMUM_ALLOWED_STORAGE |
| DCMUSER | 3/31/2026 10:34 | *ENABLED | *USER | *NONE | MAIN | QDFTJOBD | *NO | *NO | YES | -1 | ||
| DUMDUM | 3/31/2026 10:34 | *ENABLED | *USER | *NONE | MAIN | QDFTJOBD | *NO | *NO | YES | -1 | ||
| GHUIWM1BCH | 3/31/2026 10:39 | *ENABLED | LEVEL2 | *PGMR | MAP | MAIN | QDFTJOBD | *NO | *YES | YES | -1 | |
| GRP1 | 3/31/2026 10:39 | *ENABLED | *USER | *NONE | MAIN | QDFTJOBD | *NO | *NO | YES | -1 | ||
| KSCHROEFR | 3/31/2026 10:45 | *ENABLED | *USER | *NONE | MAIN | QDFTJOBD | *NO | *NO | YES | -1 | ||
| MKOU2 | 3/31/2026 10:39 | *ENABLED | QWQADMGRP | *SECOFR | *SECADM | *NONE | MAIN | QDFTJOBD | *NO | *NO | YES | -1 |
| QSVCCS | 3/31/2026 10:45 | *ENABLED | *SYSOPR | *JOBCTL | *NONE | MAIN | QDFTJOBD | *NO | *NO | YES | -1 | |
| QSVMSS | 3/31/2026 11:00 | *DISABLED | *SYSOPR | *JOBCTL | *NONE | MAIN | QDFTJOBD | *NO | *NO | YES | -1 | |
| QSVSM | 3/12/2026 10:13 | *DISABLED | *SYSOPR | *JOBCTL | *NONE | MAIN | QDFTJOBD | *NO | *NO | YES | -1 | |
| SILSFTP | 4/1/2026 6:19 | *ENABLED | *USER | *NONE | MAIN | QDFTJOBD | *NO | *NO | YES | -1 | ||
| SMTPUSR | 3/18/2026 1:32 | *ENABLED | *USER | *NONE | MAIN | QDFTJOBD | *NO | *NO | YES | -1 | ||
| SUP1 | 3/9/2026 22:59 | *ENABLED | *USER | *NONE | MAIN | QDFTJOBD | *NO | *NO | YES | -1 | ||
| TESTTHAI1 | 3/13/2026 14:45 | *ENABLED | *USER | *NONE | MAIN | QDFTJOBD | *NO | *NO | YES | -1 | ||
| US388152 | 3/13/2026 14:45 | *ENABLED | *SECOFR | *ALLOBJ *JOBCTL *SAVSYS *SECADM *SPLCTL *SERVICE *AUDIT *IOSYSCFG | *NONE | MAIN | QDFTJOBD | *NO | *NO | YES | -1 |
Interpreting the Results
- Each row represents a user profile creation event.
- Non-NULL attribute columns indicate values explicitly specified on CRTUSRPRF.
- NULL values indicate that system defaults were applied.
Use Cases
- Security and compliance audits
- Verification of user provisioning standards
- Detection of privileged access assignments at creation time
- Incident response and forensic investigations
Conclusion
Using Audit Journal Services provides a reliable, supported mechanism to report on new user profiles and their attributes. This SQL-based approach requires no exit programs or permanent database objects and aligns with IBM i auditing best practices.
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
03 April 2026
UID
ibm17268524