Monday, March 9, 2015

Prevent login as sysdba

To set a new password you should (after connecting to the DB):

alter user SYS identified by "newpassword";
But if you want to prevent connecting without a password - sqlplus / as sysdba, then you need to add this:

SQLNET.AUTHENTICATION_SERVICES=none
in sqlnet.ora

http://davidalejomarcos.wordpress.com/2010/08/21/securing-passwords-on-scripts-using-oracle-wallet/

sample sqlnet.ora file with sysda login off and wallet on
*********************************************************************************************************************************
# Generated by Oracle configuration tools.

#NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

ADR_BASE = /opt/app/oracle

WALLET_LOCATION =
   (SOURCE =
     (METHOD = FILE)
     (METHOD_DATA =
       (DIRECTORY = /opt/app/oracle/product/11.2.0/11.2.0.3/dbs)
     )
    )

SQLNET.WALLET_OVERRIDE = TRUE
SQLNET.AUTHENTICATION_SERVICES=NONE
*********************************************************************************************************************************



After you create a new database

First open tnsnames.ora and create a new entry. In my case shicon_sys

Now we store user name and password under this service name. So only people connecting from this tns can login as sysdba from server

here after wrl it is wallet location

after createcredential it is tnsname, username, password

mkstore -wrl /opt/app/oracle/product/11.2.0/11.2.0.4/dbs -createCredential shicon_sys sys password


Once created you can check

mkstore -wrl /opt/app/oracle/product/11.2.0/11.2.0.4/dbs -listCredential


No comments:

Post a Comment

Featured Post

Apply Patch 22191577 latest GI PSU to RAC and DB homes using Opatch auto or manual steps

Patch 22191577: GRID INFRASTRUCTURE PATCH SET UPDATE 11.2.0.4.160119 (JAN2016) Unzip the patch 22191577 Unzip latest Opatch Version in or...