On January 27th, this site will be read-only as we migrate to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,889,672 Users
  • 2,269,776 Discussions
  • 7,916,820 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: 20,213 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.