為listener增加密碼驗證
工作上有用到Listener加密的這個需求,試了試,留下個簡單的記錄,覺得在單例項資料庫中還較方便的。
在RAC中由於用到srvctl 管理,在srvctl start ... 命令時會去檢查Listener的status(這個動作就等同於是執行了lsnrctl status命令來查詢Listener狀態),所以這個時候會不透過(這是我目前在RAC環境加密Listener測試到挺麻煩的一個issue),有時間再查一查。
[@more@]rac-test2$lsnrctl <<< 此時是沒有設定密碼前的操作,可以正常作業(如status/start/stop/reload等操作)
LSNRCTL for Linux: Version 9.2.0.8.0 - Production on 09-9??-2008 11:28:19
Copyright (c) 1991, 2006, Oracle Corporation. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac-test2)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 9.2.0.8.0 - Production
Start Date 09-9??-2008 10:59:13
Uptime 0 days 0 hr. 29 min. 10 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /oracle/9208/network/admin/listener.ora
Listener Log File /oracle/9208/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac-test2)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "testdb" has 1 instance(s).
Instance "testdb2", status READY, has 2 handler(s) for this service...
Service "testdb2" has 1 instance(s).
Instance "testdb2", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> change_password <<
Old password:
New password:
Reenter new password:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac-test2)(PORT=1521)))
Password changed for LISTENER
The command completed successfully
LSNRCTL> status <<< 此時密碼設定已經完畢,嘗試一下status操作,收到報錯提示:需要密碼驗證。
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac-test2)(PORT=1521)))
TNS-01169: The listener has not recognized the password
LSNRCTL> set password <<< 我們需要透過set password來驗證密碼,並輸入之前設定的密碼,驗證透過方可執行相關操作。
Password:
The command completed successfully
LSNRCTL> status <<< 可以試一下在密碼驗證成功後的操作結果是成功的。
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac-test2)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 9.2.0.8.0 - Production
Start Date 09-9??-2008 10:59:13
Uptime 0 days 0 hr. 29 min. 36 sec
Trace Level off
Security ON
SNMP OFF
Listener Parameter File /oracle/9208/network/admin/listener.ora
Listener Log File /oracle/9208/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac-test2)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "testdb" has 1 instance(s).
Instance "testdb2", status READY, has 2 handler(s) for this service...
Service "testdb2" has 1 instance(s).
Instance "testdb2", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> save_config <<< 注意密碼設定後一定要用save_config命令儲存所做的設定,oracle會將這些設定的變動保留到listener.ora裡面去。
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac-test2)(PORT=1521)))
Saved LISTENER configuration parameters.
Listener Parameter File /oracle/9208/network/admin/listener.ora
Old Parameter File /oracle/9208/network/admin/listener.bak
The command completed successfully
LSNRCTL>
在設定了密碼以及儲存了設定後Listener.ora裡會出現這樣一條記錄:
#----ADDED BY TNSLSNR 09-9??-2008 11:28:52---
PASSWORDS_LISTENER = 62753F69B85AD170
#----------------------------------------------
所以,大家需要注意的是,以後重啟DB後,啟動Listener時需要先進入lsnrctl 命令裡透過 set password命令先輸入密碼方可進行操作哦!
PS:Listener做密碼設定不會影響任何client 端的東西,僅是為了防止listener遭到遠端惡意作業時加的一陣密碼驗證過程。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/14517718/viewspace-1010449/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- PHP行為驗證碼PHP
- 行為驗證碼接入彙總
- 線上Bcrypt加密、驗證工具加密
- HTTPS加密過程和TLS證書驗證HTTP加密TLS
- 驗證碼原理及驗證
- 行為驗證碼小圖示修改
- 驗證碼---js重新整理驗證碼JS
- 行為驗證碼安全策略設定
- 為網站實現一個驗證碼網站
- JavaScript驗證碼生成和驗證效果JavaScript
- 行為式驗證碼家族再添一員 網易易盾推出推理拼圖驗證碼
- 驗證碼機制之驗證碼重複使用
- 登入驗證碼生成kaptcha(輸入驗證碼)APT
- Spring Security 中的 BCryptPasswordEncoder加密、驗證策略Spring加密
- Laravel - 驗證碼Laravel
- Response驗證碼
- PHP驗證碼PHP
- 為什麼Web端登入需要驗證碼?Web
- 【驗證碼逆向專欄】某多多驗證碼逆向分析
- easy-captcha實現驗證碼驗證APT
- 影片直播app原始碼,傳送驗證碼 驗證碼識別APP原始碼
- PHP 驗證身份證號碼PHP
- WPA2安全加密協議概念驗證程式碼現已釋出加密協議
- node js如何實現密碼雜湊加密以及jwt登陸驗證JS密碼加密JWT
- 帝國CMS為什麼驗證碼均顯示為“ecms”?
- JavaWeb——驗證碼功能解決表單重複提交問題(使用谷歌驗證碼jar包為例)JavaWeb谷歌JAR
- 常見驗證碼的弱點與驗證碼識別
- 【驗證碼逆向專欄】某驗“初代”滑塊驗證碼逆向分析
- 手機號碼驗證方法(正則驗證)
- 基於Node.js實現行為驗證碼Node.js
- django 驗證碼框架Django框架
- 隨機驗證碼隨機
- 驗證碼識別
- 圖形驗證碼
- laravel(五) 驗證碼Laravel
- 【驗證碼逆向專欄】某驗三代滑塊驗證碼逆向分析
- 【驗證碼逆向專欄】某驗四代滑塊驗證碼逆向分析
- 極驗驗證碼破解與研究
- ACCESS 密碼驗證/文字驗證中的小坑密碼