CPF22E4: Password for user profile has expired
CPF22E4 means a program or server checked a user profile through the IBM i security APIs and the profile's password has expired. The text reads "Password for user profile <name> has expired."
Other names for this code
Also written as MSGCPF22E4, CPF22E4 password expired, password for user profile has expired, QSYGETPH CPF22E4, iSeries CPF22E4, IBM i password expired API.
What it means
IBM i passwords can expire. The system value QPWDEXPITV sets a system-wide interval in days, and each profile's PWDEXPITV can override it. An administrator can also mark a password as expired straight away with PWDEXP(*YES), which is common after a reset.
On the sign-on display an expired password isn't a dead end. The system tells the user and asks for a new password. Programs and servers can't do that. When they call the Get Profile Handle API (QSYGETPH) or a related API with an expired password, the API ends with CPF22E4 and the work doesn't run. Called with *NOPWD, the API also refuses a profile whose password has expired. With *NOPWDSTS or *NOPWDCHK, a caller with *ALLOBJ and *SECADM can still get a handle.
That's why CPF22E4 often shows up for service accounts. A profile used only by a file transfer, a data source or an application connection never signs on interactively, so nobody gets the prompt to change the password.
Common causes
- The profile's password is older than the expiration interval set by QPWDEXPITV or the profile's PWDEXPITV.
- An administrator reset the password with PWDEXP(*YES), and the user hasn't signed on interactively to choose a new one.
- A service or application profile has an expiring password and nobody owns changing it.
How to find the problem
- Look in the failing job's log with
DSPJOBLOGfor CPF22E4 and the profile name. - Run
DSPUSRPRF USRPRF(name). Check Date password last changed, Password expiration interval and Set password to expired. - Check the system-wide interval with
WRKSYSVAL QPWDEXPITV. - For many profiles at once, query the QSYS2.USER_
INFO view for the password expiration date and interval.
How to fix it
- Have the owner sign on interactively once and change the password when prompted, or run
CHGPWD. - An administrator can set a new password with
CHGUSRPRF USRPRF(name) PASSWORD(newpw) PWDEXP(*NO). Then update every client or script that uses it. - For service profiles, agree a process for rotating the password before it expires. Setting
PWDEXPITV(*NOMAX)stops expiry but may break your security policy, so check first. - After the fix, test the failing connection once. Repeated failures can disable the profile.
IBM documentation
IBM Display Message Descriptions (DSPMSGD). Use the documentation for your installed release.
This link opens the relevant IBM reference library or lookup instructions. Match the complete code and your installed product release; it is not a code-specific review.
Read the installed message description:
DSPMSGD MSGID(CPF22E4) MSGF(QSYS/QCPFMSG)
Also inspect the full job log and second-level message text, including substitution values.
Related codes
Questions
Why do I get CPF22E4 when I can still sign on to a 5250 session?
The sign-on display lets you change an expired password on the spot. A program or server can't, so it fails with CPF22E4 until the password is changed.
Does CPF22E4 lock the profile?
No. The profile stays enabled. It just can't be used through the APIs until the password is changed.
Where is the password expiration interval set?
In the QPWDEXPITV system value for the whole system, and in each profile's PWDEXPITV parameter, which can use the system value or override it.