I need a script that shows me all of the database users and their passwords in my Oracle database. How would I
acquire such a script? Passwords for Oracle database users are not encrypted, they are hashed. Therefore, it is not possible to retrieve the password for a user given the password string. When you login to the database, the password you supply is hashed in the same manner it was when the user was created. If the computed hash (at login time) and the stored hash (from create or alter time) match, you are authenticated. It is statistically unlikely that you can create two passwords that produce the same hash value. A similar method is used for the passwords for Unix accounts. That's why the system or database administrator can only reset your password, they cannot retrieve the current password.
select username,password from dba_users;
That query will show you all the hashed passwords for each user account, but you cannot use that string to login.
Dig deeper on Oracle database security
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.