Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

7.4. Red Hat Support Tool の設定

インタラクティブモードの場合は、コマンド config --help を入力して設定オプションの一覧を表示できます。
~]# redhat-support-tool
Welcome to the Red Hat Support Tool.
Command (? for help): config --help

Usage: config [options] config.option <new option value>

Use the 'config' command to set or get configuration file values.
Options:
  -h, --help    show this help message and exit
  -g, --global  Save configuration option in /etc/redhat-support-tool.conf.
  -u, --unset   Unset configuration option.

The configuration file options which can be set are:
 user      : The Red Hat Customer Portal user.
 password  : The Red Hat Customer Portal password.
 debug     : CRITICAL, ERROR, WARNING, INFO, or DEBUG
 url       : The support services URL.  Default=https://api.access.redhat.com
 proxy_url : A proxy server URL.
 proxy_user: A proxy server user.
 proxy_password: A password for the proxy server user.
 ssl_ca    : Path to certificate authorities to trust during communication.
 kern_debug_dir: Path to the directory where kernel debug symbols should be downloaded and cached. Default=/var/lib/redhat-support-tool/debugkernels

Examples:
- config user
- config user my-rhn-username
- config --unset user

手順7.1 インタラクティブモードでの Red Hat Support Tool の登録

インタラクティブモードを使用して Red Hat Support Tool をカスタマーポータルに登録するには、以下のコマンドを実行します。
  1. 以下のコマンドを入力してツールを起動します。
    ~]# redhat-support-tool
  2. Red Hat カスタマーポータルのユーザー名を入力します。
    Command (? for help): config user username
    ユーザー名をグローバル設定ファイルに保存するには、-g オプションを追加します。
  3. Red Hat カスタマーポータルのパスワードを入力します。
    Command (? for help): config password
    Please enter the password for username:

7.4.1. 設定ファイルへの設定の保存

Red Hat Support Tool は、(他の方法が設定されていない場合に) ~/.redhat-support-tool/redhat-support-tool.conf 設定ファイルを使用して現在のユーザーのホームディレクトリーに値とオプションをローカルで保存します。必要に応じて、パスワードをこのファイルに保存することが推奨されます。ツールが起動すると、グローバル設定ファイル /etc/redhat-support-tool.conf とローカル設定ファイルから値が読み取られます。ローカルに保存された値とオプションは、グローバルに保存された設定よりも優先されます。
警告
パスワードは base64 でエンコードされ簡単にデコードできるため、グローバルな /etc/redhat-support-tool.conf 設定ファイルにパスワードを保存することは推奨され ませ ん。また、ファイルは誰でも読み取り可能です。
値またはオプションをグローバル設定ファイルに保存するには、以下のように -g, --global オプションを追加します。
Command (? for help): config setting -g value
注記
-g, --global オプションを使用して設定をグローバルで保存できるようにするには、Red Hat Support Toolroot で実行する必要があります。これは、通常のユーザーには /etc/redhat-support-tool.conf への書き込みに必要なパーミッションがないためです。
値またはオプションをローカル設定ファイルから削除するには、以下のように -u, --unset オプションを追加します。
Command (? for help): config setting -u value
これにより、ツールからパラメーターが削除および設定解除され、(利用可能な場合は) グローバル設定ファイルにある同等の設定が使用されます。
注記
非特権ユーザーとして実行している場合は、 -u, --unset オプションでグローバル設定ファイルに保存される値は削除できませんが、-g, --global オプションと -u, --unset オプションを同時に使用して、ツールの現在の実行中のインスタンスから、設定を解除することができます。root として実行している場合は、-g, --global-u, --unset オプションを同時に使用してグローバル設定ファイルから値とオプションを削除できます。