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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 11g 密碼設定為不過期Oracle密碼
- 通過jquery.cookie.js實現記住使用者名稱、密碼登入功能jQueryCookieJS密碼
- SSH配置—Linux下實現免密碼登入Linux密碼
- flask框架如何實現修改密碼和免密登入功能Flask框架密碼
- 密碼登入密碼
- SharedPreferences實現記住密碼----自動登入功能密碼
- 通過selenium突破極驗驗證實現登入
- 密碼過期引起的ssh無法登陸密碼
- 介紹Linux小技巧,如何實現免密碼登入Linux密碼
- app直播原始碼,平臺登入頁面實現和修改密碼頁面實現APP原始碼密碼
- 直播系統原始碼,自動登入及記住密碼實現原始碼密碼
- vue通過vue-router攔截實現登入驗證Vue
- Laravel 通過 cookie 實現基於 session 的單點登入LaravelCookieSession
- 如何通過Python暴力破解網站登陸密碼Python網站密碼
- 2.13.3 使用 Oracle Wallet 實現在DBCA中使用身份驗證Oracle
- 登入過期--localStorage加sessionStorage實現7天登入過期Session
- 修改 MySQL 登入密碼MySql密碼
- 密碼方式登入redis密碼Redis
- uniapp 完成兩種方式登入 驗證碼登入 密碼登入APP密碼
- 通過ORACLE VM virtualbox環境安裝oracle 11G RAC(ASM)OracleASM
- JWT過期,修改密碼,登出登入如何處理JWT密碼
- ORACLE 11g的密碼錯誤延時驗證Oracle密碼
- 小視訊app原始碼,實現簡單的登入介面,輸入賬號密碼APP原始碼密碼
- win10免密碼自動登入怎麼設定 win10跳過密碼直接登入電腦Win10密碼
- origin登入密碼不正確或已經過期怎麼辦 origin登入密碼錯誤怎麼解決密碼
- 兩臺伺服器實現免密登入伺服器
- Oracle密碼過期處理Oracle密碼
- 賬號密碼登入介面密碼
- PbootCMS後臺登陸密碼忘記/找回密碼後臺登入密碼外掛boot密碼
- oracle安裝後無法登入Oracle
- jmeter通過cookies來登入JMeterCookie
- Oracle 11g的使用者密碼預設為180天過期的修改方法Oracle密碼
- 批量實現多臺伺服器之間ssh無密碼登入的相互信任關係伺服器密碼
- 帝國模板登入出現已被登入或者密碼錯誤解決方法密碼
- ssh-copy-id登陸無需重複輸入密碼密碼
- 微軟賬戶將支援無密碼身份認證登入微軟密碼
- unbuntu16.04 伺服器的 免密登入、秘鑰登入和禁止密碼登入 配置伺服器密碼
- unbuntu16.04 伺服器的 免密登入、祕鑰登入和禁止密碼登入 配置伺服器密碼
- 使用mimipenguin實現從當前 Linux 使用者轉儲登入密碼NGUILinux密碼