Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Jason.

Asked: September 27, 2018 - 11:03 pm UTC

Last updated: October 06, 2018 - 6:02 am UTC

Version: Opera Hospitality

Viewed 1000+ times

You Asked

Hello Experts,

I am just curious about changing passwords via cmd sql for SYS user.
I issued the below command:

alter user SYS identified by new_password;
commit;

Then restart the instance and OS.
When I tried to use the new password, it works. However, when I try the old password it is still able to login. What else am I missing with the above command?

Kind regards,
Jason

and Connor said...

If you are in the DBA group, then you will get that authorisation via the OS, eg:

C:\>sqlplus sys/admin as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Mon Oct 1 09:03:35 2018

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production


SQL> connect sys/blahblah as sysdba
Connected.

SQL> connect sys/anything_i_want as sysdba
Connected.



If you try connect over the network, then you'll see the authorization you anticipate.

Rating

  (3 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Jason Navarro, October 01, 2018 - 11:14 am UTC

I think you just showed me how to login to sqlplus via cmdline?

The answer I was looking for is how to prevent the OLD SYS password from working, when I already altered it with a NEW password?




Connor McDonald
October 02, 2018 - 6:51 am UTC

No, I showed that if you are in the DBA group, then *any* password will "work" because you are authenticated at a privileged level at the OS.

If you are not in the DBA group, then you the new password will work, the old one will not.

Jason Navarro, October 02, 2018 - 8:20 am UTC

Oh ok I get it now. Apologies for the confusion. Thanks a lot for the clarification. Cheers!

A reader, October 06, 2018 - 5:00 am UTC

how to create user for pdb database of single container in 12c.2
Connor McDonald
October 06, 2018 - 6:02 am UTC

Please ask a new question for this

More to Explore

Security

All of the vital components for a secure database are covered in the Security guide.