Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can one switch to another database user without a password?

database password Switch user
0
Posted

Can one switch to another database user without a password?

0

Users normally use the “CONNECT” statement to connect from one database user to another. However, DBAs can switch from one user to another without a password. Of course it is not advisable to bridge Oracle’s security, but look at this example: SQL> CONNECT / as sysdba Connected. SQL> SELECT password FROM dba_users WHERE username=’SCOTT’; PASSWORD ————— ————— F894844C34402B67 SQL> ALTER USER scott IDENTIFIED BY anything; User altered. SQL> CONNECT scott/anything Connected. OK, we’re in. Let’s quickly change the password back before anybody notices. SQL> ALTER USER scott IDENTIFIED BY VALUES ‘F894844C34402B67’; User altered. Note: Also see the su.sql script in the Scripts and Sample Programs section of this site.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123