Monday, 29 September 2008

Changing a user password programmatically

Silly users - always locking themselves out - forgetting their passwords and so forth. As indicated in a previous post - EBS can now be configured so that users can reset their passwords - having the new password emailed to the email address associated with their user account. However, not all clients enable this functionality.

My current client is one such. Recently they managed to lock themselves out of all their System Administrator level accounts. These are the only accounts with the ability to reset user passwords. A bit of a catch-22 situation you might think???

Fortunately Oracle have made it surprisingly easy to do a password reset programatically. Simply call:

fnd_user_pkg.changepassword(, )

It returns a boolean indicating success or otherwise. The new password must obey the relevant password policy or the reset will fail. The user will *not* be prompted to change this password the next time they log in.