How to change Oracle user password without showing the actual password on screen

oracle

Is there a way you can change Oracle user password without showing the actual password on the screen? I understand that you can execute ALTER USER user_name IDENTIFIED BY new_password; but this will show the password on screen.

My organization practices split-password for administrator password and two person would need to key in the password. How do I allow them to key in the password without any of them viewing any portion of the password?

Thank you.

Best Answer

You can do this with the SQL*Plus password command.

To change the current user's password, just type password and you'll get the usual prompt.

$ sqlplus foo/foo123
...
SQL> password
Changing password for FOO
Old password:
New password:
Retype new password:
Password changed

You can also use password username to change another user's password (if you're logged on with sufficient privileges - you need to be dba I believe).

SQL Developer also allows you to do that. Just type password and execute, and you'll get a password change popup. Or expand the "Other users" branch, right-click on the account that needs a change and select the "Edit user" menu.