lsnrctl中,SET PASSWORD和CHANGE_PASSWORD命令

keeptrying發表於2012-06-05

CHANGE_PASSWORD

 

Use the CHANGE_PASSWORD command to establish an encrypted password or change an encrypted password set with the PASSWORDS_listener_name parameter in the listener.ora file.

 

CHANGE_PASSWORD命令用於建立和修改密碼!

 

如建立口令的簡單過程如下:

LSNRCTL> change_password

Old password:

New password:

Reenter new password:

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=liuxiaohui)(PORT=1521)))

Password changed for LISTENER

The command completed successfully

LSNRCTL> save_config

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=liuxiaohui)(PORT=1521)))

Saved LISTENER configuration parameters.

Listener Parameter File   E:\oracle\product\10.2.0\db_1\network\admin\listener.ora

Old Parameter File   E:\oracle\product\10.2.0\db_1\network\admin\listener.bak

The command completed successfully

--===============================================================

 

修改口令:

LSNRCTL> set password

Password:

The command completed successfully

LSNRCTL> change_password

Old password:

New password:

Reenter new password:

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=liuxiaohui)(PORT=1521)))

Password changed for LISTENER

The command completed successfully

LSNRCTL> save_config

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=liuxiaohui)(PORT=1521)))

Saved LISTENER configuration parameters.

Listener Parameter File   E:\oracle\product\10.2.0\db_1\network\admin\listener.ora

Old Parameter File   E:\oracle\product\10.2.0\db_1\network\admin\listener.bak

The command completed successfully

 

 

SET PASSWORD

 

Use the command SET PASSWORD prior to privileged Listener Control utility commands, such as SAVE_CONFIG and STOP.

The password entered should match the one established for the PASSWORDS_listener_name parameter in the listener.ora file or set by the CHANGE_PASSWORD command.

 

SET PASSWORD命令用於設定當前環境密碼,以便能夠執行如SAVE_CONFIGSTOP這類重要操作。這裡輸入的密碼要和listener.ora檔案中PASSWORDS_listener_name引數指定的密碼一致,或者和CHANGE_PASSWORD命令設定的密碼一致。

 

這樣做的目的是保護LISTENER不被非法的關閉,而不是限制非法使用者啟用監聽。如,當其他使用者、或遠端使用者關閉LISTENER時,必須SET PASSWORD,才能執行STOP,否則會收到錯誤:

 

[oracle@boypoo2 ~]$ lsnrctl
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 09-OCT-2006 22:02:22
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> set current_listener listener1
Current Listener is listener1
LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.100)(PORT=1521)))
TNS-01169: The listener has not recognized the password
TNS-01189: The listener could not authenticate the user

LSNRCTL>

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25744374/viewspace-732001/,如需轉載,請註明出處,否則將追究法律責任。

相關文章