Php – Change oracle db user password without knowing existing password PHP

forgot-passwordoraclePHPreset

I have a request to supply the functionality for users to change their Oracle password through their web interface. In the case of an expired password it's fine, but I haven't been able to find a solution if the user has forgotten their password. I've had a look at oci_password_change but the old password is required.

Would there be a way to create an 'admin' db connection and use that to reset the Oracle password for a specific user without knowing the previous password?

Best Answer

A user with the alter user system privilege can run:

ALTER USER user_name IDENTIFIED BY new_password;
Related Topic