IBM Support

Auditing User Profile Creation on IBM i Using Audit Journal Services

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_PROFILEPROFILE_CREATE_TIMESTAMPSTATUSGROUP_PROFILEUSER_CLASSSPECIAL_AUTHORITIESINITIAL_PROGRAMINITIAL_MENUJOB_DESCRIPTIONLIMIT_CAPABILITIESPASSWORD_EXPIREDPASSWORD_CHANGEDMAXIMUM_ALLOWED_STORAGE
DCMUSER3/31/2026 10:34*ENABLED *USER *NONEMAINQDFTJOBD*NO*NOYES-1
DUMDUM3/31/2026 10:34*ENABLED *USER *NONEMAINQDFTJOBD*NO*NOYES-1
GHUIWM1BCH3/31/2026 10:39*ENABLEDLEVEL2*PGMR MAPMAINQDFTJOBD*NO*YESYES-1
GRP13/31/2026 10:39*ENABLED *USER *NONEMAINQDFTJOBD*NO*NOYES-1
KSCHROEFR3/31/2026 10:45*ENABLED *USER *NONEMAINQDFTJOBD*NO*NOYES-1
MKOU23/31/2026 10:39*ENABLEDQWQADMGRP*SECOFR*SECADM*NONEMAINQDFTJOBD*NO*NOYES-1
QSVCCS3/31/2026 10:45*ENABLED *SYSOPR*JOBCTL*NONEMAINQDFTJOBD*NO*NOYES-1
QSVMSS3/31/2026 11:00*DISABLED *SYSOPR*JOBCTL*NONEMAINQDFTJOBD*NO*NOYES-1
QSVSM3/12/2026 10:13*DISABLED *SYSOPR*JOBCTL*NONEMAINQDFTJOBD*NO*NOYES-1
SILSFTP4/1/2026 6:19*ENABLED *USER *NONEMAINQDFTJOBD*NO*NOYES-1
SMTPUSR3/18/2026 1:32*ENABLED *USER *NONEMAINQDFTJOBD*NO*NOYES-1
SUP13/9/2026 22:59*ENABLED *USER *NONEMAINQDFTJOBD*NO*NOYES-1
TESTTHAI13/13/2026 14:45*ENABLED *USER *NONEMAINQDFTJOBD*NO*NOYES-1
US3881523/13/2026 14:45*ENABLED *SECOFR*ALLOBJ *JOBCTL *SAVSYS *SECADM *SPLCTL *SERVICE *AUDIT *IOSYSCFG*NONEMAINQDFTJOBD*NO*NOYES-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

[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CHyAAM","label":"Security"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"and future releases;7.4.0;7.5.0;7.6.0"}]

Document Information

Modified date:
03 April 2026

UID

ibm17268524