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.