Forum Stats

  • 3,769,484 Users
  • 2,252,969 Discussions
  • 7,875,053 Comments

Discussions

Oracle Profile Password verify function

User_CS62G
User_CS62G Member Posts: 17 Red Ribbon

Hello Team,

I have to develop a customized password verify function. The function should address below requirements :

(i) Minimum password age 2 days.

(ii) Forced password reset on first logon of user.

I have got the minimum password age as below :

PROCEDURE p_CheckMinPwdAge     ( pUserName  IN VARCHAR2)

IS

 nDummy Number;

 nCount Number;  

BEGIN

   SELECT COUNT(1) INTO nCount FROM FROM SYS.USER$ WHERE NAME = pUserName;

    IF nCount > 0 THEN  

      SELECT (SYSDATE - PTIME) INTO nDummy FROM SYS.USER$ WHERE NAME = pUserName;  

    IF nDummy <= 2 THEN

     RAISE_APPLICATION_ERROR( -20007, 'Password should be used for atleast 2 days.' );

    END IF;

END IF; 

END p_CheckMinPwdAge;


I need help to implement the functionality of password reset when user logon for first time and I need to get it in password verify function.

Please help.

Best Answer

Answers

  • Solomon Yakobson
    Solomon Yakobson Member Posts: 18,917 Red Diamond

    So if user changed password just recently and forgot it he/she will have to wait 2 days. Very productive :). Anyway, you need to associate password verification function with desired profiles. E.g.:

    ALTER PROFILE some_profile LIMIT PASSWORD_VERIFY_FUNCTION p_CheckMinPwdAge;
    

    But keep in mind, your function doesn't enforce any password complexity rules.

    SY.

  • User_CS62G
    User_CS62G Member Posts: 17 Red Ribbon

    Thanks for answering. My original question was how to implement password expire on first logon. I want to get this done through an Oracle profile.