8.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
インタラクティブモードでの Red Hat Support Tool の登録
インタラクティブモードを使用して Red Hat Support Tool をカスタマーポータルに登録するには、以下のコマンドを実行します。
以下のコマンドを入力してツールを起動します。
~]# redhat-support-toolRed Hat カスタマーポータルのユーザー名を入力します。
Command (? for help): config user usernameユーザー名をグローバル設定ファイルに保存するには、
-gオプションを追加します。Red Hat カスタマーポータルのパスワードを入力します。
Command (? for help): config password Please enter the password for username:
8.4.1. 設定ファイルへの設定の保存 リンクのコピーリンクがクリップボードにコピーされました!
Red Hat Support Tool は、(他の方法が設定されていない場合に) ~/.redhat-support-tool/redhat-support-tool.conf 設定ファイルを使用して現在のユーザーのホームディレクトリーに値とオプションをローカルで保存します。必要に応じて、パスワードをこのファイルに保存することが推奨されます。この場合、パスワードは特定のユーザーのみが確認できます。ツールが起動すると、グローバル設定ファイル /etc/redhat-support-tool.conf とローカル設定ファイルから値が読み取られます。ローカルに保存された値とオプションは、グローバルに保存された設定よりも優先されます。
グローバルな /etc/redhat-support-tool.conf 設定ファイルにパスワードを保存することは 推奨されません。パスワードは base64 でエンコードされているだけなので簡単にデコードできます。また、ファイルは誰でも読み取り可能です。
値とオプションをグローバル設定ファイルに保存するには、以下のように -g, --global オプションを追加します。
Command (? for help): config setting -g value
-g, --global オプションを使用して設定をグローバルで保存できるようにするには、Red Hat Support Tool を root で実行する必要があります。これは、通常のユーザーには /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 オプションを同時に使用してグローバル設定ファイルから値とオプションを削除できます。