ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Example for password change

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Example for password change

    Does anyone have an example of something like this. I want to create a CL that will run on the job scheduler the 1st of each month and automatically change the password for some given users. For example User is ABCDEFG I want to make the password ABCDMMYY where MMYY is the month and year so the user would be ABCDEFG with a password of ABCD1005 for October. Any help would be appreciated!!!

  • #2
    Re: Example for password change

    I don't have an example but you may have to call an API because the CHGPWD command is interactive only.

    The API is and can be found in
    http://publib.boulder.ibm.com/iserie...2924/index.htm (V5R2)

    Change User Password (QSYCHGPW) API

    Required Parameter Group:

    1 User ID Input Char(10)
    2 Current password Input Char(*)
    3 New password Input Char(*)
    4 Error code I/O Char(*)

    Optional Parameter Group:

    5 Length of current password Input Bin(4)
    6 CCSID of current password Input Bin(4)
    7 Length of new password Input Bin(4)
    8 CCSID of new password Input Bin(4)

    Default Public Authority: *USE

    Threadsafe: No
    Never trust a dog to watch your food.

    Comment


    • #3
      Re: Example for password change

      Do you call an api? I am not familiar with how to use an API?

      Comment


      • #4
        Re: Example for password change

        Yes you call them, they are IBM supplied programs.....

        Here are a bunch on this site...




        Jamie
        All my answers were extracted from the "Big Dummy's Guide to the As400"
        and I take no responsibility for any of them.

        www.code400.com

        Comment


        • #5
          Re: Example for password change

          I wrote a RPG to call the API QSYCHGPW. It does exactly what I want it to. Thanks for your help.

          Comment


          • #6
            Re: Example for password change

            Ill mail you a quarter if you post it !!!!!!!!!


            Jamie
            All my answers were extracted from the "Big Dummy's Guide to the As400"
            and I take no responsibility for any of them.

            www.code400.com

            Comment


            • #7
              Re: Example for password change

              I don't know about any quarter but I would be interested in seeing the code. It looks like a straight forward API call but I am curious if you change the binary fields to intergers 4 B = 10 I
              Never trust a dog to watch your food.

              Comment

              Working...
              X