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.

If you forget the password, do the worst.
– hard kill the listener process from the OS
– modify the listener.ora file by taking out the “PASSWORDS_LISTENER” parameter.
– Restart the listener
– Proceed with one of the following methods

1. Cleartext Password
– Add PASSWORDS_<your_listener_name> entry to your existing listener.ora file. e.g. PASSWORDS_listener1 = (p1,p2)
– 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

2. Encrypted Password
– Comment out PASSWORD_ line if cleartext password is set.
– Restart listener.
– Run lsnrctl
LSNRCTL> set current_listener <your_listener_name>
LSNRCTL> set save_config_on_stop on
LSNRCTL> change_password
Old password: <enter>
New password: <enter_your_password>
Reenter new password: <reenter_your_password>

LSNRCTL> change_password
Old password: <enter>
New password: dummy
Reenter new password: dummy

Just hit <enter> 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: <enter_your_password_here>

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.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.