どのリモートサブコマンドにも資格が必要で、管理ユーザー名とそのパスワードを指定しなくてはなりません。ID が明示的または暗黙的に何も指定されていない場合は、デフォルトでは asadmin ユーザーが管理者向け操作を実行できるような ID でドメインが作成されます。デフォルト ID は、ユーザー名が admin でパスワードがない形式です。コマンド行やプロンプトにユーザー名を指定せず、--passwordfile オプションまたはプロンプトにパスワードを何も指定せず、login サブコマンドまたは create-domain サブコマンドに ----savelogin オプションを付けたうちのいずれかでドメインにログインしたことがなければ、asadmin ユーティリティーが ID を何も指定せずに指定の管理操作を実行しようとします。サーバー (ドメイン) は、次の状況に当てはまる限り、このデフォルト ID を使用して管理操作を行えるようにします。
1. サーバー (ドメイン) が、admin ユーザーの認証にファイルレルムを使用している。
2. ファイルレルムに、ユーザーが 1 人しかいない (ユーザー名の内容は問わない)。
3. その 1 人のユーザーに、パスワードが用意されていない。
デフォルトでは、特定のユーザー名とパスワードでドメインを作成していない限り、これらの条件がすべて当てはまります。したがって、唯一の管理ユーザーは、パスワードなしの admin となります。3. に当てはまらない場合は、パスワードを指定する必要があります。2. に当てはまらない場合も、ユーザー名を指定する必要があります。1. に当てはまらない場合は、ユーザー名とパスワードを指定する必要があります。
特定ドメインへの認証 (ログイン) を行うには、ローカルモードで login サブコマンドを使用します。ログインした後は、そのドメインのそれ以降の操作に管理ユーザーやパスワードを指定しなくても済むようになります。login サブコマンドは、管理パスワードを指定する際にのみ使用できます。リモートサブコマンドから入力を求められるこれ以外のパスワードについては、--passwordfile オプションを使用するか、コマンドプロンプトでパスワードを指定してください。管理ユーザー名とパスワードの入力が常に求められます。
logout サブコマンドは一切ありません。別のドメインにログインするには、asadmin login の --host と --port に新しい値を付けて呼び出します。
ログインしようとしているドメイン名を指定します。
既存ドメインの一覧表示
asadmin list-domains |
login(1)コマンドでドメインにログインします。
この例では、別のマシンにあるドメインにログインします。login サブコマンドの前に、オプションを指定します。
asadmin> --host foo --port 8282 login Please enter the admin user name>admin Please enter the admin password> Trying to authenticate for administration of server at host [foo] and port [8282] ... Login information relevant to admin user name [admin] for host [foo] and admin port [8282] stored at [/.asadminpass] successfully. Make sure that this file remains protected. Information stored in this file will be used by asadmin commands to manage associated domain. |
この例では、デフォルトポートの myhost にあるドメインにログインします。login サブコマンドの前に、オプションを指定します。
asadmin> --host myhost login Please enter the admin user name>admin Please enter the admin password> Trying to authenticate for administration of server at host [myhost] and port [4848] ... An entry for login exists for host [myhost] and port [4848], probably from an earlier login operation. Do you want to overwrite this entry (y/n)?y Login information relevant to admin user name [admin] for host [myhost] and admin port [4848] stored at [/home/joe/.asadminpass] successfully. Make sure that this file remains protected. Information stored in this file will be used by asadmin commands to manage associated domain. |
このサブコマンドの完全な構文を確認するには、コマンド行に asadmin help login と 入力してください。パスワードの詳細は、「パスワードの管理」を参照してください。