如何繞過oracle listener 監聽的密碼設定,oraclelistener

來源:互聯網
上載者:User

如何繞過oracle listener 監聽的密碼設定,oraclelistener


如何繞過oracle 監聽的密碼設定:


1.找到監聽進程pid ,並將它kill 掉
ps -ef|grep tns

[oracle@lixora admin]$ ps -ef|grep tns
root         9     2  0 Jul11 ?        00:00:00 [netns]
oracle   29668     1  0 10:12 ?        00:00:00 /oracle/bin/tnslsnr LISTENER -inherit
oracle   29677 29487  0 10:15 pts/1    00:00:00 grep tns


kill -9 pid

kill -9 29668


2.然後替換掉原來的listener.ora 檔案

3.然後啟動監聽


Oracle 監聽口令及監聽器安全

很多人都知道,Oracle的監聽器一直存在著一個安全隱患,假如不設定安全措施,那麼能夠訪問的使用者就可以遠程關閉監聽器。

相關樣本:

D:\>lsnrctl stop eygle

LSNRCTL for 32-bit Windows: Version 10.2.0.3.0 - Production on 28-11月-2007 10:02:40

Copyright (c) 1991, 2006, Oracle. All rights reserved.

正在串連到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.33.11)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=eygle)))
命令執行成功

大家可以發現,此時預設的監聽器的日誌還無法記錄操作地址:

No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.33.11)(PORT=1521)))
28-NOV-2007 09:59:20 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=Administrator))(COMMAND=stop)
(ARGUMENTS=64)(SERVICE=eygle)(VERSION=169870080)) * stop * 0

為了更好的保證監聽器的安全,大家最好為監聽設定密碼:

[oracle@jumper log]$ lsnrctl

LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 28-NOV-2007 10:18:17

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> set current_listener listener
Current Listener is listener
LSNRCTL> change_password
Old password:
New password:
Reenter new password:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.33.11)(PORT=1521)))
Password changed for listener
The command completed successfully
LSNRCTL> set password
Password:
The command completed successfully
LSNRCTL> save_config
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.33.11)(PORT=1521)))
Saved LISTENER configuration parameters.
Listener Parameter File /opt/oracle/product/9.2.0/networ......餘下全文>>
 
oracle 無監聽程式,有配置listener與tnsnames服務

DEMO =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.22.12.33)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = demo)
)
)

中的SERVICE_NAME 改成跟監聽裡面的SID一樣,即SERVICE_NAME = ORCL;

如果不行的話,tnsping一下看下什麼結果。
 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.