2015年4月14日火曜日

OEM 12c の SYSMAN パスワードリセット。

最近、自宅の Enterprise Manager (EM)にあまりにログインしていなくて
つい SYSMAN (EM の管理ユーザ)のパスワードを忘れてしまいました。



そこで、マニュアルにある SYSMAN のパスワードリセットをしてみました。
「現在のSYSMANパスワードが不明な場合」のリセット方法がマニュアルに記載されています。

Oracle Enterprise Manager Cloud Controlセキュリティ・ガイド
12c リリース4 (12.1.0.4)

2.7.1.1 SYSMANユーザー・パスワードの変更
現在のSYSMANパスワードが不明な場合
http://docs.oracle.com/cd/E26854_01/doc.121/e49736/sec_features.htm#CJAIDHEF

今回の環境では、
EM の OMS は /u01/app/oracle/mw/oms にインストールされています。

まず、OMS を停止します。
[oracle@oem12c-oms ~]$ /u01/app/oracle/mw/oms/bin/emctl status oms
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
WebTier is Up
Oracle Management Server is Up ★まだ OMS は起動中。
[oracle@oem12c-oms ~]$ /u01/app/oracle/mw/oms/bin/emctl stop oms
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Stopping WebTier...
WebTier Successfully Stopped
Stopping Oracle Management Server...
Oracle Management Server Successfully Stopped
Oracle Management Server is Down ★OMS が停止。

ちなみに、root ユーザでは実行できないので
OMS 管理用の OS ユーザで実行します。
root で実行しようとすると、下記のようにメッセージが出ます。
[root@oem12c-oms ~]# /u01/app/oracle/mw/oms/bin/emctl stop oms
Cannot execute /u01/app/oracle/mw/oms/bin/emctl.pl since its userid does not match yours.

それでは、SYSMAN ユーザのパスワードをリセットします。
emctl コマンドでの OMR パスワード変更「-change_repos_pwd」に加えて、
「-use_sys_pwd」と「-sys_pwd」で OMR の SYS ユーザのパスワードを指定します。
ちなみに OMR とは、EM の使用する Oracle Database のことです。
[oracle@oem12c-oms ~]$ /u01/app/oracle/mw/oms/bin/emctl config oms -change_repos_pwd -use_sys_pwd -sys_pwd <SYS パスワード> -new_pwd <新規パスワード>
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
<2015/04/14 0時47分35秒 JST> <Info> <Security> <BEA-090905> <起動パフォーマンスを向上するためにCryptoJ JCEプロバイダ自己整合性チェックを無効にしています。このチェックを有効にするには、-Dweblogic.security.allowCryptoJDefaultJCEVerification=trueを指定します>
<2015/04/14 0時47分35秒 JST> <Info> <Security> <BEA-090906> <RSA CryptoJのデフォルトの乱数 ジェネレータをECDRBGからFIPS186PRNGに変更しています。この変更を無効にするには、-Dweblogic.security.allowCryptoJDefaultPRNG=trueを指定します>

Changing passwords in backend ...
Passwords changed in backend successfully.
Updating repository password in Credential Store...
Successfully updated Repository password in Credential Store.
Restart all the OMSs using 'emctl stop oms -all' and 'emctl start oms'.
Successfully changed repository password.

OMS を、管理サーバも含めて完全に停止します。
[oracle@oem12c-oms ~]$ /u01/app/oracle/mw/oms/bin/emctl stop oms -all
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Stopping WebTier...
WebTier Successfully Stopped
Stopping Oracle Management Server...
Oracle Management Server Already Stopped
AdminServer Successfully Stopped
Oracle Management Server is Down ★停止した。

そして起動します。
[oracle@oem12c-oms ~]$ /u01/app/oracle/mw/oms/bin/emctl start oms
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Starting Oracle Management Server...
Starting WebTier...
WebTier Successfully Started
Oracle Management Server Successfully Started
Oracle Management Server is Up ★起動した。

これで、指定したパスワードを使用して、
SYSMAN ユーザで EM にログインできるようになります。

以上、EM 12c のパスワードリセットでした。

0 件のコメント:

コメントを投稿