Ask the Expert

Acquiring knowledge of Oracle database users and their IDs

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?

    Requires Free Membership to View

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.

This was first published in April 2005

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: