In sweet memories of my ever loving brother "kutty thambi " ARUN KUMAR

Thursday, July 29, 2010

setting listener password

In Oracle 10g and above, the listener is secured by default, and only user who started the listener can run the commands.

In order to set password on listener, follow the steps:

1) LSNRCTL> set current_listener
2) LSNRCTL> change_password
Old password:
New password: yourpassword
Reenter new password: yourpassword
3) LSNRCTL> save_config
4) LSNRCTL> status

STATUS output will now show:
Security ON: Password or Local OS Authentication

Example:



[oracle@rac1 ~]$ lsnrctl

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 29-JUL-2010 12:44:18

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

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> change_password
Old password:
New password:
Reenter new password:
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
LSNRCTL> start
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1.localdomain)(PORT=1521)))

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 29-JUL-2010 12:44:59
Uptime 0 days 0 hr. 0 min. 1 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1.localdomain)(PORT=1521)))
The listener supports no services
The command completed successfully
LSNRCTL> set current_listener LISTENER
Current Listener is LISTENER
LSNRCTL> change_password
Old password:
New password:
Reenter new password:
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Password changed for LISTENER
The command completed successfully
LSNRCTL> save_config
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Saved LISTENER configuration parameters.
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Old Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.bak
The command completed successfully
LSNRCTL> status
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 29-JUL-2010 12:44:59
Uptime 0 days 0 hr. 0 min. 50 sec
Trace Level off
Security ON: Password or Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1.localdomain)(PORT=1521)))
Services Summary...
Service "cdbs" has 1 instance(s).
Instance "cdbs", status READY, has 1 handler(s) for this service...
Service "cdbsXDB" has 1 instance(s).
Instance "cdbs", status READY, has 1 handler(s) for this service...
Service "cdbs_XPT" has 1 instance(s).
Instance "cdbs", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>


As the another user, enter the password to administer the listener:

1) LSNRCTL> set password
Password: yourpassword
2) LSNRCTL> stop

answered by fahad mirza in OTN forum

1 comment:

Anonymous said...

Your doing good work.

Thanks,
Rajasekhar A

 
Share/Bookmark