destroyuser

Name

destroyuser  --  Destroy a Postgres user and associated databases Postgres ユーザと関連のデータベース を削除します。

Synopsis

destroyuser [ username ]
destroyuser [ -h host ] [ -p port ]
    [ username ]
  

入力

-h host

Specifies the hostname of the machine on which the postmaster is running. Defaults to using a local Unix domain socket rather than an IP connection.

postmaster が動いているマシン のホスト名を指定します。デフォルトは IP 接続ではなく、 ローカル Unix ドメインソケットを使用します。

-p port

Specifies the Internet TCP/IP port or local Unix domain socket file extension on which the postmaster is listening for connections. The port number defaults to 5432, or the value of the PGPORT environment variable (if set).

接続を postmaster が監視する インターネット TCP/IP ポート、またはローカル Unix ドメイン ソケットファイル拡張子を指定します。 デフォルトのポート番号は 5432 または、環境変数(もし設定 していれば)による番号です。

username

Specifies the name of the Postgres user to be removed. This name must exist in the Postgres installation. You will be prompted for a name if none is specified on the command line.

削除するユーザの名前を指定します。名前はこのインストレーションの Postgres に存在していなければなりません。 コマンドライン上で誰も指定されていなければ、名前の確認が求め られます。

出力

destroyuser will remove an entry in the pg_user or pg_shadow system table, and will remove all databases for which that user is the administrator (DBA).

destroyuser は、 pg_user または pg_shadow システムテーブルから登録を削除し、そのユーザが管理者 (DBA) であった全てのデータベースを削除します。

Connection to database 'template1' failed. connectDB() failed: Is the postmaster running and accepting connections at 'UNIX Socket' on port 'port'? destroyuser: database access failed.

destroyuser could not attach to the postmaster process on the specified host and port. If you see this message, ensure that the postmaster is running on the proper host and that you have specified the proper port. If your site uses an authentication system, ensure that you have obtained the required authentication credentials.

destroyuser は、指定したホストとポート の postmaster プロセスに接続できません。 このメッセージが表示された場合、postmaster が特定のホスト上で稼働していて、正しいポートが指定されているかどうか 確認して下さい。サイトが認証システムを使用している場合は、 必要な認証資格が交付されているかどうかの確認をして下さい。

Connection to database 'template1' failed. FATAL 1: SetUserId: user 'username' is not in 'pg_shadow' destroyuser: database access failed.

You do not have a valid entry in the relation pg_shadow and and will not be allowed to access Postgres. Contact your Postgres administrator.

リレーション pg_shadow に有効な登録がなく、 Postgres にアクセスすることが許可 されていません。Postgres 管理者に 連絡を取って下さい。

destroyuser: username cannot delete users.

You do not have permission to delete users; contact your Postgres site administrator.

ユーザを削除する権限がありません。 Postgres サイト管理者に 連絡を取って下さい。

destroyuser: user "username" does not exist

削除の対象となるユーザは pg_shadow クラスに登録されていません。

database access failed

An internal error occurred in psql or in the backend server. Ensure that your site administrator has properly installed Postgresand initialized the site with initdb.

psql またはバックエンドサーバで 内部エラーが起こりました。サイト管理者が適切に Postgres をインストールし、その サイトを initdb で初期化したか どうか確認して下さい。

destroydb on dbname failed - exiting

An internal error occurred in psql or in the backend server. There was possibly a Unix permissions problem with the specified database.

psql またはバックエンドサーバで 内部エラーが起こりました。多分、指定されたデータベースに 対する Unix の権限の問題です。

delete of user username was UNSUCCESSFUL

An internal error occurred in psql or in the backend server.

psql またはバックエンドサーバで 内部エラーが起こりました。

Note: destroyuser internally runs DROP USER from psql while connected to the template1 database.

destroyuser の内部では、 template1 データベースに接続して、 psql から DROP USER を実行します。

説明

destroyuser removes an existing Postgres user and the databases for which that user is database administrator. Only users with usesuper set in the pg_shadow class can destroy Postgres users. As shipped, the user postgres can remove users.

destroyuser は既存の Postgres ユーザとそのユーザ がデータベース管理者であったデータベースを削除します。 pg_shadow クラスに usesuper セットを所有しているユーザ のみが Postgres のユーザを 削除できます。 ユーザ postgres はユーザを削除できる ようになっています。

destroyuser is a shell script that invokes psql. Hence, a postmaster process must be running on the database server host before destroyuser is executed. The PGOPTION and PGREALM environment variables will be passed on to psql and processed as described in psql.

destroyuserpsql を呼び出すシェルスクリプト です。したがい、postmaster プロセスは destroyuser が実行される 以前に、データベースサーバホストで稼働していなければなりません。 PGOPTIONPGREALM 環境変数は psql に渡され、 psql に記載され ているように処理されます。

Once invoked, destroyuser will warn you about the databases that will be destroyed in the process and permit you to abort the removal of the user if desired.

一度呼び出されると、destroyuser は プロセスの中の削除されるデータベースについて警告を出します。 望むのであれば、ユーザの削除を中止することができます。