Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Resetting PPM user password with a request type

Highlighted
Dale Colliver
Regular Collector

Resetting PPM user password with a request type

Has anyone created a request type to reset user passwords? I have worked on it but can't get the script to encrypt and save the new password.

5 REPLIES
Sascha_Mohr
Super Collector

Re: Resetting PPM user password with a request type

You could just set the password to a default one, by setting the pw for one user to the default, get the encrypted string from the DB and in the script you have just use that previously encrypted string.

Regards
Sascha
Dale Colliver
Regular Collector

Re: Resetting PPM user password with a request type

I tried that using a script in an execution step. When I compiled the function, I got a couple of messages that I didn't understand but it seemed to compile. The script ran without error but the password that I set did not work.

Cat_2
Regular Collector

Re: Resetting PPM user password with a request type

Can you include the script you used?

Dale Colliver
Regular Collector

Re: Resetting PPM user password with a request type

Here is the script: The default password was welcome

 

CREATE OR REPLACE FUNCTION FTN_ITG_RESET_PW (P_user_id IN NUMBER)
RETURN VARCHAR2
IS
   CURSOR C_User_Rows IS
      SELECT count(*)
      FROM knta_users
      WHERE User_id = P_user_id;

-- SET DEFINE OFF ;

-- Return value
   Wk_Return_Val VARCHAR2(7);
   Wk_Row_Count NUMBER ;

BEGIN

      OPEN C_User_Rows;
      FETCH C_User_Rows INTO Wk_Row_Count;
      CLOSE C_User_Rows;

   IF Wk_Row_Count = 1
   THEN

      UPDATE KNTA_USERS
         SET
 LAST_UPDATE_DATE = CURRENT_DATE,
 PASSWORD_EXPIRATION_DATE = CURRENT_DATE,
        PASSWORD = '1nCYgKyGh3m9hzy>XQ3z0Kn|qF^+&9XD@A=(zmVnizeKH2L8*V7Yl/i O{wSrGgwS*+@9C4f)M{wCYl8g7O`2*CcKf=YWF,5g0_cT/_|zPsITAa(l$)f9S7*_*&Ji(1k2NAJieQ|p_{WQTixtKR0F<XDZW3C-gg)YLfKut/rUkL?6pdToi F~ymi:>QJo'
         WHERE user_id = P_user_id ;

      COMMIT;
      Wk_Return_Val := 'SUCCESS';
   ELSE
      Wk_Return_Val := 'FAILURE';
   END IF;

RETURN Wk_Return_Val ;
END FTN_ITG_RESET_PW ;

/

 

Jim Esler
Honored Contributor

Re: Resetting PPM user password with a request type

We have used the following to encrypt a password. The encrypted password is then stored in the user's record with a SQL query. We are running 7.5 SP7. ksc_connect_dest_server cd bin ./kEncrypt.sh -t "[REQD.VP.RUNTIME_PASSWORD]" | grep "\#\!\#" | sed 's/#\!#//g' ksc_set ENCRYPTED="[EXEC.OUTPUT]" ksc_exit
//Add this to "OnDomLoad" event