IBM i Global

IBM i 

A space for professionals working with IBM’s integrated OS for Power systems to exchange ideas, ask questions, and share expertise on topics like RPG and COBOL development, application modernization, open source integration, system administration, and business continuity.


#Power


#IBMi
 View Only
  • 1.  Change password API (QSYCHGPW) only allows 10 char passwords

    Posted Fri April 04, 2025 11:43 AM

    I created a little Node.js app that allows users without 5250 screen access to change their password. I am using the QSYCHGPW API, but it only allows 10 character passwords. My system is set up to allow 10-15 character passwords. Is there another API that I can use for passwords greater than 10? I'm surprised that this API still only allows 10 chars.

    Thanks, Matt



    ------------------------------
    Matt Hopkins
    ------------------------------


  • 2.  RE: Change password API (QSYCHGPW) only allows 10 char passwords

    Posted Fri April 04, 2025 12:28 PM

    You have to set the length of old and new passwords using the optional parameters. When not specified the default length is indeed 10.

    https://www.ibm.com/docs/en/i/7.5?topic=ssw_ibm_i_75/apis/QSYCHGPW.html

    ----- quote -----

    Optional Parameter Group

    Length of current password
    INPUT; BINARY(4)

    The length, in bytes, of the password contained in the current password parameter. If the optional parameter group is not specified, a default of 10 is used. The current password parameter should be padded with trailing blank characters, if necessary, to the size specified by this parameter.

    This parameter accepts values from 1 to 512; however, values greater than 128 should only be used if multi-byte characters are specified for the current password. The number of characters, as interpreted by the CCSID of the current password parameter, cannot exceed 128.

    CCSID of current password
    INPUT; BINARY(4)

    The CCSID of the current password parameter. If the optional parameter group is not specified and the system is operating at password level 0 or 1, CCSID 37 is used. If the optional parameter group is not specified and the system is operating at password level 2 or 3, the default CCSID of the job is used to determine the CCSID of the data to be converted. For a list of valid CCSIDs, see the IBM i globalization topic collection.

    The valid values are:

    Length of new password
    INPUT; BINARY(4)

    The length, in bytes, of the password contained in the new password parameter. If the optional parameter group is not specified, a default of 10 is used. The new password parameter should be padded with trailing blank characters, if necessary, to the size specified by this parameter.

    This parameter accepts values from 1 to 512; however, values greater than 128 should only be used if multi-byte characters are specified for the new password. The number of characters, as interpreted by the CCSID of the new password parameter, cannot exceed 128.

    CCSID of new password
    INPUT; BINARY(4)

    The CCSID of the new password parameter. If the optional parameter group is not specified and the system is operating at password level 0 or 1, CCSID 37 is used. If the optional parameter group is not specified and the system is operating at password level 2 or 3, the default CCSID of the job is used to determine the CCSID of the data to be converted. For a list of valid CCSIDs, see the IBM i globalization topic collection.

    The valid values are:

     

    ----- quote -----



    ------------------------------
    Marc Rauzier
    ------------------------------



  • 3.  RE: Change password API (QSYCHGPW) only allows 10 char passwords

    Posted Fri April 04, 2025 01:26 PM

    Thank you for that. In all my online searches that page never came up, which I thought was very unusual. So I appreciate the link.



    ------------------------------
    Matt Hopkins
    IBM i Programmer/Analyst

    ------------------------------



  • 4.  RE: Change password API (QSYCHGPW) only allows 10 char passwords

    Posted Mon April 07, 2025 04:52 AM

    The IBM documentation is the go-to place for IBM i information, especially when using SQL or API's. Make a bookmark to find this information easy, and remember to use the right IBM i documentation version. This can easily be changed on each page in the documentation, or you can find all IBM i version documentation here: https://www.ibm.com/docs/en/i

    Never just rely on an internet search, but also verify your assumptions in this reference material, this will save you a lot of trouble.

    Material found on the internet can be used for clarification of how to use any API or IBM i feature, if the IBM documentation is not clear enough. Also the IBM Support may have some explanations and howto's, although the search function here is not the best - I always search using "ibmi" and the subject.

    HTH.



    ------------------------------
    Christian Jorgensen
    IT System Administrator | CEAC member
    Network of Music Partners A/S
    ------------------------------



  • 5.  RE: Change password API (QSYCHGPW) only allows 10 char passwords

    Posted Mon April 07, 2025 08:23 AM

    I will also suggest that you do not assume that a google search will find all the right links available at ibm.com, even if you do site:ibm.com.  Try the IBM search bar within ibm.com.  And maybe even sign in first (if you have an id).  Some of IBM's links are tough on the web crawlers.



    ------------------------------
    Robert Berendt IBMChampion
    Business Systems Analyst, Lead
    Dekko
    Fort Wayne
    ------------------------------



  • 6.  RE: Change password API (QSYCHGPW) only allows 10 char passwords

    Posted Wed April 09, 2025 11:23 AM

    When dealing with APIs, I prefer to use the API Finder page from IBM ex- IBM Documentation - IBM Documentation



    ------------------------------
    Rich Malloy
    Principal Systems Engineer - IBMi
    Cox Automotive
    Draper UT
    ------------------------------