---Change the password, and will restrict the next time the user logs on (the first time), forcing a new password to change:---This process can fully simulate the action of initializing the user's password in the standard user's form! ---Finally, this process is the result of creating a user's picture through research criteria, so if necessary, please feel free to use it! SELECTLast_logon_date,password_date,last_update_date,last_update_login fromFnd_userWHERE user_name = 'QWR01'; DECLAREp_user_name Fnd_user.user_name%TYPE; P_init_passwordVARCHAR2( -);---Initialize password, non-encrypted. ---L_change_flagVARCHAR2(Ten); L_reasonvarchar2( -);BEGIN ---Input parameters (user name and initialized password)P_user_name:= 'QWR01'; P_init_password:= 'PWD123'; --------- ---processing--L_change_flag:=Fnd_web_sec.change_password (P_user_name,p_init_password); IFL_change_flag= 'Y' Then --Bug 7016473-during An administrative reset, set the last_logon_date to NULL --instead of sysdate. Last_logon_date should reflect the date the user last --logged in successfully, not the date the user's password was reset. --This does isn't regress the fix for bug 4690441 because in Fnd_web_sec.disable_user --if Last_logon_date is NULL, the last_update_date would be used which is the same --date of the sysadmin reset, so the effect is the same. -- --Reset password_date field to null -to-force password --expiration the next time user logs on. -- UPDATEFnd_userSETLast_logon_date= NULL, Password_date= NULL --, last_update_date = Sysdate --, Last_update_login = Fnd_global. login_id WHERE user_name =P_user_name; COMMIT; ----Dbms_output. Put_Line ('successful initialization of the user ('||P_user_name||') has the following password:'||P_init_password); ELSE ---Show Why you cannot modifyL_reason:=Fnd_message.get; Fnd_message.set_name ('FND','fnd_change_password_failed'); Fnd_message.set_token ('user_name', P_user_name); Fnd_message.set_token ('REASON', L_reason); App_exception.raise_exception; END IF;END;
Oracle EBS Initialize user password (go)