When you see an error message in your job log, you should move the screen cursor to that message line and press F1 to browse details of the messsage and you should see the following detail :
You should see that the detail suggests you run DSPCMD to see the setting allowed for the command object to run.
Original Message:
Sent: Mon September 18, 2023 04:34 PM
From: Michael Ruth
Subject: CL Reset Password
When I run the command, RESETPWD, I get an error message that it doesn't like this CMD and PARM in this CL program


Michael Ruth
iSeries Support – SiteOps IT North American MQ & RD
CONFIDENTIALITY NOTICE: This email message (including all attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, copying or distribution is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
PRIVACY NOTICE: Your privacy is important to us. To find out more about the information that Elanco may collect, how we use it, how we protect it, and your rights and choices with respect to your Personal Data, go to privacy.elanco.com
Original Message:
Sent: 9/18/2023 3:55:00 PM
From: Robert Berendt
Subject: RE: CL Reset Password
namefmt 1
If that executed successfully you would not have received that message. Definitely.
------------------------------
Robert Berendt IBMChampion
Original Message:
Sent: Mon September 18, 2023 03:46 PM
From: Michael Ruth
Subject: CL Reset Password
Here's what I put in, so what did I miss?
ftp otherlpar
namefmt 1
bin
put /qsys.lib/rob.lib/qclrob.file/mycl.mbr /qsys.lib/rob.lib/qclrob.file/mycl.mbr
quit
Michael Ruth
iSeries Support – SiteOps IT North American MQ & RD
CONFIDENTIALITY NOTICE: This email message (including all attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, copying or distribution is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
PRIVACY NOTICE: Your privacy is important to us. To find out more about the information that Elanco may collect, how we use it, how we protect it, and your rights and choices with respect to your Personal Data, go to privacy.elanco.com
Original Message:
Sent: 9/18/2023 3:35:00 PM
From: Robert Berendt
Subject: RE: CL Reset Password
Michael,
You forgot a command that I had in my example in between the ftp and the put command. If you had put that command in you definitely would not have received that error.
------------------------------
Robert Berendt IBMChampion
Original Message:
Sent: Mon September 18, 2023 03:30 PM
From: Michael Ruth
Subject: CL Reset Password
Robert
The format you provided doesn't work,
put /qsys.lib/rob.lib/qclrob.file/mycl.mbr /qsys.lib/rob.lib/qclrob.file/mycl.mbr
Results:

Michael Ruth
iSeries Support – SiteOps IT North American MQ & RD
CONFIDENTIALITY NOTICE: This email message (including all attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, copying or distribution is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
PRIVACY NOTICE: Your privacy is important to us. To find out more about the information that Elanco may collect, how we use it, how we protect it, and your rights and choices with respect to your Personal Data, go to privacy.elanco.com
Original Message:
Sent: 9/18/2023 1:43:00 PM
From: Robert Berendt
Subject: RE: CL Reset Password
Are you limited to green screen tools or can you use RDi or any other tool? If you can, then just Save As to the other system.
There's also this
ftp otherlpar
namefmt 1
bin
put /qsys.lib/rob.lib/qclrob.file/mycl.mbr /qsys.lib/rob.lib/qclrob.file/mycl.mbr
quit
------------------------------
Robert Berendt IBMChampion
Original Message:
Sent: Mon September 18, 2023 01:00 PM
From: Michael Ruth
Subject: CL Reset Password
Satid,
This shouldn't be rocket science, it's basic Cl programming 101. I have been trying to FTP previous CL programs from one server to another but I am unable to move it into PDM or the QCLSRC file. Help!!
------------------------------
Michael Ruth
Original Message:
Sent: Thu September 07, 2023 07:12 AM
From: Satid Singkorapoom
Subject: CL Reset Password
>>>> When system value QPWDRULES contains *ALLCRTCHG, even CRTUSRPRF and CHGUSRPRF commands will have to comply to the password rules defined in QPWDRULES. <<<<
Just to provide a formal reference for Christian's statement above which is available here : Password Rules (QPWDRULES) at https://www.ibm.com/docs/en/i/7.5?topic=passwords-password-rules-qpwdrules This is a long text. Do a Ctrl+F with "chgusrprf" and it will take you to the relevant information.
------------------------------
Chance favors only the prepared mind.
-- Louis Pasteur
------------------------------
Satid S.
Original Message:
Sent: Thu September 07, 2023 02:42 AM
From: Christian Jorgensen
Subject: CL Reset Password
Hi Rob.
I do not believe that CHGUSRPRF cares a whit about the password rules. CHGPWD does, but not CHGUSRPRF.
When system value QPWDRULES contains *ALLCRTCHG, even CRTUSRPRF and CHGUSRPRF commands will have to comply to the password rules defined in QPWDRULES.
Best regards,
Christian
------------------------------
Christian Jorgensen
IT System Administrator
Network of Music Partners A/S
Original Message:
Sent: Wed September 06, 2023 09:07 AM
From: Robert Berendt
Subject: CL Reset Password
I do not believe that CHGUSRPRF cares a whit about the password rules. CHGPWD does, but not CHGUSRPRF.
The following password does not meet our rules. It's monocase. No special characters. No numbers, etc.
CHGUSRPRF USRPRF(DUMMY) PASSWORD(BEARSSUCK)
It gives a warning but I can log on as the new password.
CPI22AE - Password does not meet all password rules.
Severity . . . . . . . : 10
Message type . . . . . : Information
------------------------------
Robert Berendt IBMChampion
Original Message:
Sent: Wed September 06, 2023 03:23 AM
From: Markus Avogaro
Subject: CL Reset Password
Hi,
basically this program works. most of the time, it failes, because the password does not match the systems password rules.
pls check your sysvals QPWD* for how the password needs to be set. (probably the last 32, same character position .. etc,
Regards
Markus Avogaro
------------------------------
Markus Avogaro
Original Message:
Sent: Tue September 05, 2023 11:17 AM
From: Robert Berendt
Subject: CL Reset Password
I thought about this further. I think you're in this scenario:
User forgets their password.
Helpdesk has a special adopted authority program which changes the password to a known default and sets it to must be changed upon signon.
However your program isn't working.
Possibly it is because CHGUSRPRF doesn't allow a parameter value for USRPRF?
No sweat. Wrap the whole command into a string
DCL &CMD CHAR(150)
DCL &CMDLEN DEC(15 5) VALUE(150)
CHGVAR &CMD 'CHGUSRPRF USRPRF(' *TCAT &USRPRF *TCAT ') PASSWORD(CAKE4LUNCH)'
CALL PGM(QCMDEXC) PARM((&CMD) (&CMDLEN))
------------------------------
Robert Berendt IBMChampion
Original Message:
Sent: Tue September 05, 2023 11:04 AM
From: Robert Berendt
Subject: CL Reset Password
I think the general concept you are trying is to set their password to some default and have it set to expired to force them to change it.
There are a lot of rules on CHGUSRPRF. For example
CPF2292 - *SECADM required to create or change user profiles. So you have to have the program adopt authority. This applies even to their own user profile.
Also, if I run this, and their password was already set to this, it will not change their "date password last changed": CHGUSRPRF USRPRF(DUMMY) PASSWORD(CAKE4LUNCH) . This I know because of one user here... (they no longer have access to IBM i).
Have you thought about just using CHGPWD instead?
------------------------------
Robert Berendt IBMChampion
Original Message:
Sent: Thu August 31, 2023 01:04 PM
From: Michael Ruth
Subject: CL Reset Password
Hello,
I have a CL program that will allow a user to reset their password. I'm getting an error that it doesn't like the &USRPRF that I have declared in the program. It wants an actual user profile name coded in there. So any ideas how to fix this? Document attached showing the error.
DCL VAR(&USRPRF) TYPE(*CHAR) LEN(10)
CHGUSRPRF USRPRF(&USRPRF) PASSWORD(CAKE4LUNCH) +
STATUS(*ENABLED) PWDEXP(*YES)
ERROR:
------------------------------
Michael Ruth
------------------------------