Password protection for 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.
There are two ways to set a password:

1. Clear text Password
2. Encrypted Password

1.Clear text Password
Lets say that in your $TNS_ADMIN/listener.ora you have a listener named LISTENER1
(i)Add PASSWORDS_LISTENER1 entry to your existing listener.ora file. e.g.PASSWORDS_LISTENER1 = (p1,p2)
(ii)Stop your listener, and restart it.

Now passwords are in effect.

To administer the listener, set password command must be used.
 LSNRCTL> set current_listener LISTENER1
 LSNRCTL> set password p1
 LSNRCTL> stop
2. Encrypted Password
Lets say that in your $TNS_ADMIN/listener.ora you have a listener named LISTENER2
run lsnrctl
LSNRCTL> set current_listener LISTENER2
LSNRCTL> set save_config_on_stop on
LSNRCTL> change_password
Old password:
New password:
Reenter new password:

Just hit ‘Enter’ key for old password since no previous password is set.

LSNRCTL> save_config

Stop the listener
LSNRCTL> set password
LSNRCTL> set password
 Password: ****
LSNRCTL> start

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

PASSWORDS_listener2 = 2D6C48144CF753AC

  • September 27, 2018 | 16 views
  • Comments