Lesson 12 | Securing the Oracle Listener with a Password |
Objective | Demonstrate how to securely set, encrypt, and manage the Oracle Listener password using recommended best practices. |
The Oracle Listener is a critical network service that directs client connection requests to the database. If left unprotected, unauthorized users could stop, start, or alter listener settings. This lesson explains how to secure the listener with a password, beginning with operating system–level security and progressing to modern Oracle 19c/23ai best practices.
# Allow only the Oracle owner to run LSNRCTL
chmod 744 $ORACLE_HOME/bin/lsnrctl
# Allow Oracle owner and DBA group members
chmod 774 $ORACLE_HOME/bin/lsnrctl
# Restrict read access to listener.ora
chmod 700 $ORACLE_HOME/network/admin/listener.ora
On Windows, use **File Properties → Security** to restrict access to the Oracle service account.
lsnrctl
utility.
Never type a clear-text password directly into listener.ora
.
LSNRCTL> CHANGE_PASSWORD
and then:
LSNRCTL> SAVE_CONFIG
Oracle writes the encrypted password hash into listener.ora
. This prevents exposure of the password to unauthorized users.
SET PASSWORD
– Authenticates your current lsnrctl
session using the existing listener password.CHANGE_PASSWORD
– Updates the stored listener password (and requires you to provide the old password first).admin01
to secure01
:
LSNRCTL> SET PASSWORD
Password: admin01 -- Authenticate to the listener
LSNRCTL> CHANGE_PASSWORD
Old password: admin01
New password: secure01
Reenter new password: secure01
Password changed for LISTENER
The command completed successfully
LSNRCTL> SAVE_CONFIG
The SAVE_CONFIG
command writes the encrypted password to listener.ora
and creates a backup file (listener.bak
).
lsnrctl set password
This password is valid until the listener process stops and is not written to listener.ora
.
listener.ora
lsnrctl
to set or change passwords so that they are encrypted, and complement this with OS-level restrictions and, where possible, Oracle Wallet integration.