すべてのプロダクト
Search
ドキュメントセンター

E-MapReduce:アカウントの管理

最終更新日:Jun 22, 2026

E-MapReduce (EMR) の Hue サービスでは、Hue アカウントの作成とパスワードのリセットが可能です。このトピックでは、Hue アカウントの作成方法とパスワードのリセット方法について説明します。

前提条件

E-MapReduce Hadoop クラスターが作成済みであること。詳細については、「クラスターの作成」をご参照ください。

Hue アカウントの作成

  1. SSH 経由でご利用のクラスターにログインします。詳細については、「クラスターへのログイン」をご参照ください。
  2. 次のコマンドを実行してアカウントを作成します。
    /opt/apps/hue/build/env/bin/hue createsuperuser
  3. プロンプトが表示されたら、ユーザー名、メールアドレス、パスワードを入力します。パスワードを再入力して確認し、Enter キーを押します。
    [root@emr-header-1 ~]# /opt/apps/hue/build/env/bin/hue createsuperuser
    Username (leave blank to use 'root'): emr
    Email address: 60!xxx
    Password:
    Password (again):
    Superuser created successfully.
    [root@emr-header-1 ~]#
    Superuser created successfully というメッセージが表示されると、アカウントの作成は完了です。このアカウントを使用して Hue にログインできます。

Hue アカウントのパスワードのリセット

  1. SSH 経由でご利用のクラスターにログインします。詳細については、「クラスターへのログイン」をご参照ください。
  2. 次のコマンドを実行して Hue のパスを表示します。
    ps aux | grep hue
    コマンドは、次のような出力を返します。
    [root@emr-header-1 ~]# ps aux | grep hue
    root      3831  1.8  0.4 401888 73696 pts/2    S+   16:25   0:01 /opt/apps/hue/build/env/bin/python2.7 hue/build/env/bin/hue shell
    root      5949  0.0  0.0 112716   960 pts/1    S+   16:26   0:00 grep --color=auto hue
    root      7832  0.0  0.1 369196 19820 ?        Sl   15:13   0:01 /opt/apps/hue-current/build/env/bin/supervisor
    hue       8019  0.1  0.8 2954004 135800 ?      Sl   15:13   0:06 /opt/apps/hue/build/env/bin/python2.7 /opt/apps/hue/build/env/bin/hue runcherrypyserver
    root     30881  0.3  0.4 401888 73804 pts/0    S+   16:22   0:00 /opt/apps/hue/build/env/bin/python2.7 /opt/apps/hue/build/env/bin/hue shell
    説明 この例では、Hue 実行可能ファイルのパスは /opt/apps/hue/build/env/bin/hue です。
  3. 次のコマンドを実行して Hue シェルを起動します。
    /opt/apps/hue/build/env/bin/hue shell
    説明 コマンド内の /opt/apps/hue/build/env/bin/hue は、ステップ 2 で取得したパスです。
  4. 次のコマンドを実行して Hue アカウントのパスワードをリセットします。
    from django.contrib.auth.models import User
    user = User.objects.get(username='<your_username>')
    user.set_password('<your_new_password>')
    user.save()
    説明 コマンド内の <your_username> をパスワードをリセットしたいユーザー名に置き換え、<your_new_password> を新しいパスワードに置き換えます。Ctrl+D を押すとシェルを終了できます。
    以下に例を示します。
    [root@emr-header-1 ~]# /opt/apps/hue/build/env/bin/hue shell
    Python 2.7.5 (default, Aug  7 2019, 00:51:29)
    [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    (InteractiveConsole)
    >>> from django.contrib.auth.models import User
    >>> user = User.objects.get(username='xxx')
    >>> user.set_password('xxx')
    >>> user.save()

    パスワードをリセットした後、新しいパスワードを使用して Hue にログインできます。