ITPub博客

首页 > IT职业 > IT生活 > listener 参考 [转]

listener 参考 [转]

原创 IT生活 作者:guyuexue 时间:2007-11-22 11:04:38 0 删除 编辑
这篇文章摘自metalink, 作为如何设置listener密码保护的快速参考.文章的在HPUX 11I, ORACLE8.1.7.4的环境下测试成功:
How to password protect your listener
-------------------------------------
To avoid inadvertent stopping of your listener or to prevent unauthorized
access to your listener, you may set up password protection for your listener.
1. Cleartext Password

- Add PASSWORDS_ entry to your existing listener.ora file.
e.g.
PASSWORDS_LISTENER =(semdg04)
- Stop your listener, and restart it.
Now passwords are in effect.
To stop the listener, set password command must be used.
e.g.
lsnrctl
LSNRCTL> set current_listener listener1
LSNRCTL> set password p1 (Notice: here must be set password p1, if use set password , then return , tape xxxxx; will get TNS-01169: The listener has not
recognized the password )
LSNRCTL> stop

2. Encrypted Password

- Comment out PASSWORD_ line if cleartext password is set.
- Restart listener.
- Run lsnrctl

LSNRCTL> set current_listener
LSNRCTL> set save_config_on_stop on
LSNRCTL> change_password
Old password:
New password:
Reenter new password:

e.g:
LSNRCTL> change_password
Old password:
New password: snake77 (Notice: Here the password "snake77" should be encrypted, not display)
Reenter new password: snake77

Just hit key for old password since no previuos password is set.
The passwords you entered will not be echoed.

- Stop the listener
LSNRCTL> set password
Password:
LSNRCTL> stop
e.g.
LSNRCTL> set password
Password: e1
LSNRCTL> stop

- Check your listener.ora file

Entries similar to the following should have been added to your listener.ora
automatically.

SAVE_CONFIG_ON_STOP_listener1 = ON
PASSWORDS_listener1 = 2D6C48144CF753AC
Sample Files:
-------------
listener.ora
#
# (1) listener.ora
#
LOG_DIRECTORY_LISTENER1 = /tmp/log
LOG_FILE_LISTENER1 = listener.log
TRACE_DIRECTORY_LISTENER1 = /tmp/log
TRACE_FILE_LISTENER1 = listener.trc
TRACE_LEVEL_LISTENER1 = ADMIN
LISTENER1 =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 12345))
)
#passwords_listener1=(p1,p2)
#----ADDED BY TNSLSNR 23-DEC-99 14:57:24---
SAVE_CONFIG_ON_STOP_listener1 = ON
PASSWORDS_listener1 = 2D6C48144CF753AC
#------------------------------------------
sqlnet.ora
#
# (2) sqlnet.ora
#

NAMES.DEFAULT_DOMAIN = your_domain
NAMES.DIRECTORY_PATH = (TNSNAMES)
LOG_DIRECTORY_SERVER = /tmp/log
LOG_FILE_SERVER = server.log
TRACE_DIRECTORY_SERVER = /tmp/log
TRACE_FILE_SERVER = server
TRACE_LEVEL_SERVER = ADMIN
#
#eof
[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/503782/viewspace-983268/,如需转载,请注明出处,否则将追究法律责任。

下一篇: QCM table
请登录后发表评论 登录
全部评论
  • 博文量
    87
  • 访问量
    529866