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
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