Originally posted by ckwan
Hi everyone,
I have a situation where I want to get back my users'password where the user might forget the password and the application want to sent to the particular user for the lost password. And also this is transparent to the system admin user.

Any ideas on this ?

Thanks
Well if that was possible, then there goes the security...

no you cannot decrypt the password, what you can do is save the encrypted password some where and then reuse it to reset the password to initial password in case the user losses his or her password.

Code:
SQL> select username,password from dba_users where username ='HR';

USERNAME                       PASSWORD
------------------------------ ------------------------------
HR                             E3FDF7CE80ED18FE

SQL> conn hr/manager;
Connected.
--initial password was manager
SQL> conn sys as sysdba
Enter password:
Connected.
SQL> alter user hr identified by hr;

User altered.
--changed the password
SQL> conn hr/manager;
ERROR:
ORA-01017: invalid username/password; logon denied


Warning: You are no longer connected to ORACLE.
SQL> conn sys as sysdba
Enter password:
Connected.
SQL> alter user hr identified by values 'E3FDF7CE80ED18FE';

User altered.
--resets the password to manager
SQL> conn hr/manager;
Connected.
SQL>
This method is good in case you don't know a user password and you want to make changes in his/her schema without letting her know

Just change it, make changes, reset it

Little bit off the main topic. But you can find a way to use it.

HTH