Oracle 11g通過wallet實現無密碼登入
建立一個目錄來存放wallet
[oracle@localhost trace]$ mkdir -p /u01/app/oracle/wallets
在客戶端通過下面命令建立一個wallet
[oracle@localhost trace]$ mkstore -wrl /u01/app/oracle/wallets -create
Oracle Secret Store Tool : Version 11.2.0.4.0 - Production
Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
Enter password:
Enter password again:
輸入的密碼是wallet的管理密碼,在建立具體使用者的wallet時需要用到
在目錄下會生成下面檔案
[oracle@localhost wallets]$ ls /u01/app/oracle/wallets
cwallet.sso ewallet.p12
建立資料庫連線證照
[oracle@localhost trace]$ mkstore -wrl /u01/app/oracle/wallets -createCredential DB_FIRE scott
Oracle Secret Store Tool : Version 11.2.0.4.0 - Production
Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
Your secret/Password is missing in the command line
Enter your secret/Password: # 輸入scott的密碼
Re-enter your secret/Password: # 再次輸入scott的密碼
Enter wallet password: # 輸入wallet的管理密碼
Create credential oracle.security.client.connect_string1
/u01/app/oracle/wallets是在之前建立的wallet存放路徑
DB_FIRE是TNS中的連線名
scott是資料庫中的使用者名稱
[oracle@localhost admin]$ cat tnsnames.ora
DB_FIRE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1536))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = OTA4GSRV)
)
)
在sqlnet.ora檔案中,編輯WALLET_LOCATION引數,將目錄路徑設定為上面建立的wallet存放路徑
SQLNET.WALLET_OVERRIDE引數為TRUE,會覆蓋系統本身存在的外部安全認證,啟用資料庫認證
[oracle@localhost admin]$ vi sqlnet.ora
WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = /u01/app/oracle/wallets)
)
)
SQLNET.WALLET_OVERRIDE = TRUE
SSL_CLIENT_AUTHENTICATION = FALSE
SSL_VERSION = 0
通過下面方式實現無密碼登入
[oracle@localhost admin]$ sqlplus /@DB_FIRE
SQL*Plus: Release 11.2.0.4.0 Production on Wed Jan 11 11:59:47 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
檢視外部密碼存放內容
[oracle@localhost admin]$ mkstore -wrl /u01/app/oracle/wallets -listCredential
Oracle Secret Store Tool : Version 11.2.0.4.0 - Production
Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
Enter wallet password:
List credential (index: connect_string username)
1: DB_FIRE scott
刪除外部密碼存放的證照
[oracle@localhost admin]$ mkstore -wrl /u01/app/oracle/wallets -deleteCredential DB_FIRE scott
Oracle Secret Store Tool : Version 11.2.0.4.0 - Production
Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
Enter wallet password:
Delete credential
Delete 1
test invalid
Invalid command: scott
[oracle@localhost admin]$ mkstore -wrl /u01/app/oracle/wallets -listCredential
Oracle Secret Store Tool : Version 11.2.0.4.0 - Production
Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
Enter wallet password:
List credential (index: connect_string username)
刪除證照後,通過無密碼方式登入時,會提示錯誤
[oracle@localhost admin]$ sqlplus /@DB_FIRE
SQL*Plus: Release 11.2.0.4.0 Production on Wed Jan 11 14:27:27 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
[oracle@localhost trace]$ mkdir -p /u01/app/oracle/wallets
在客戶端通過下面命令建立一個wallet
[oracle@localhost trace]$ mkstore -wrl /u01/app/oracle/wallets -create
Oracle Secret Store Tool : Version 11.2.0.4.0 - Production
Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
Enter password:
Enter password again:
輸入的密碼是wallet的管理密碼,在建立具體使用者的wallet時需要用到
在目錄下會生成下面檔案
[oracle@localhost wallets]$ ls /u01/app/oracle/wallets
cwallet.sso ewallet.p12
建立資料庫連線證照
[oracle@localhost trace]$ mkstore -wrl /u01/app/oracle/wallets -createCredential DB_FIRE scott
Oracle Secret Store Tool : Version 11.2.0.4.0 - Production
Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
Your secret/Password is missing in the command line
Enter your secret/Password: # 輸入scott的密碼
Re-enter your secret/Password: # 再次輸入scott的密碼
Enter wallet password: # 輸入wallet的管理密碼
Create credential oracle.security.client.connect_string1
/u01/app/oracle/wallets是在之前建立的wallet存放路徑
DB_FIRE是TNS中的連線名
scott是資料庫中的使用者名稱
[oracle@localhost admin]$ cat tnsnames.ora
DB_FIRE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1536))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = OTA4GSRV)
)
)
在sqlnet.ora檔案中,編輯WALLET_LOCATION引數,將目錄路徑設定為上面建立的wallet存放路徑
SQLNET.WALLET_OVERRIDE引數為TRUE,會覆蓋系統本身存在的外部安全認證,啟用資料庫認證
[oracle@localhost admin]$ vi sqlnet.ora
WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = /u01/app/oracle/wallets)
)
)
SQLNET.WALLET_OVERRIDE = TRUE
SSL_CLIENT_AUTHENTICATION = FALSE
SSL_VERSION = 0
通過下面方式實現無密碼登入
[oracle@localhost admin]$ sqlplus /@DB_FIRE
SQL*Plus: Release 11.2.0.4.0 Production on Wed Jan 11 11:59:47 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
檢視外部密碼存放內容
[oracle@localhost admin]$ mkstore -wrl /u01/app/oracle/wallets -listCredential
Oracle Secret Store Tool : Version 11.2.0.4.0 - Production
Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
Enter wallet password:
List credential (index: connect_string username)
1: DB_FIRE scott
刪除外部密碼存放的證照
[oracle@localhost admin]$ mkstore -wrl /u01/app/oracle/wallets -deleteCredential DB_FIRE scott
Oracle Secret Store Tool : Version 11.2.0.4.0 - Production
Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
Enter wallet password:
Delete credential
Delete 1
test invalid
Invalid command: scott
[oracle@localhost admin]$ mkstore -wrl /u01/app/oracle/wallets -listCredential
Oracle Secret Store Tool : Version 11.2.0.4.0 - Production
Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
Enter wallet password:
List credential (index: connect_string username)
刪除證照後,通過無密碼方式登入時,會提示錯誤
[oracle@localhost admin]$ sqlplus /@DB_FIRE
SQL*Plus: Release 11.2.0.4.0 Production on Wed Jan 11 14:27:27 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26506993/viewspace-2132246/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 如何實現 SSH 無密碼登入密碼
- 使用Oracle客戶端wallet實現匿名登入Oracle客戶端
- MySQL實現無密碼登入(mysql_config_editor)MySql密碼
- 通過jquery.cookie.js實現記住使用者名稱、密碼登入功能jQueryCookieJS密碼
- 關於Oracle和MySQL中的無密碼登入OracleMySql密碼
- Linux SSH無密碼登入Linux密碼
- 網站的無密碼登入網站密碼
- SSH 實現免密登入
- shell實現多節點ssh密碼登入密碼
- SSH無需密碼金鑰登入密碼
- flask框架如何實現修改密碼和免密登入功能Flask框架密碼
- 通過論壇實現登陸的程式碼
- 密碼登入密碼
- SSH配置—Linux下實現免密碼登入Linux密碼
- 誰幹的mysql無密碼登入?薦MySql密碼
- SSH無密碼登入到指定機器密碼
- SecureCRT for Mac 無法儲存登入密碼SecurecrtMac密碼
- ssh無密碼登入認證失敗密碼
- ORACLE密碼檔案和登入方式Oracle密碼
- 密碼過期引起的ssh無法登陸密碼
- 通過selenium突破極驗驗證實現登入
- SharedPreferences實現記住密碼----自動登入功能密碼
- Windows如何實現登陸系統不用輸入密碼Windows密碼
- oracle 11G 密碼過期後修改方法Oracle密碼
- Oracle 11g存在密碼過期問題Oracle密碼
- 通過Oracle 11g 邏輯standby實現BI的需求Oracle
- 如何用一次性密碼通過 SSH 安全登入 Linux密碼Linux
- 通過expect實現ssh協議自動輸密碼協議密碼
- Laravel 通過 cookie 實現基於 session 的單點登入LaravelCookieSession
- vue通過vue-router攔截實現登入驗證Vue
- 網通修改了偶的ADSL登入密碼密碼
- 介紹Linux小技巧,如何實現免密碼登入Linux密碼
- 登入過期--localStorage加sessionStorage實現7天登入過期Session
- 在linux上通過ssh直接登入到windows系統上,不用密碼LinuxWindows密碼
- Oracle 11g 密碼設定為不過期Oracle密碼
- app直播原始碼,平臺登入頁面實現和修改密碼頁面實現APP原始碼密碼
- 教你巧妙利用u盤儲存上網登入賬號密碼實現快速登入密碼
- 直播系統原始碼,自動登入及記住密碼實現原始碼密碼