- Home ›
- PostgreSQLの使い方 ›
- 設定ファイル ›
- HERE
pg_ident.confファイル
広告
次はpg_ident.confファイルです。このファイルはクライアントの認証の方式で「ident」を使う場合にident のユーザ名を PostgreSQL のユーザ名にマップするマップ名に関する記述を行います。
pg_ident.confファイルが置いてある場所はpostgresql.confと同じPostgreSQLをインストールしたディレクトリの下にある「data」ディレクトリの中にあります。私の場合であれば「D:¥PostgreSQL¥8.1¥data¥pg_ident.conf」にあります。
このファイルはテキストファイルとなっていますので、テキストエディタで見たり編集することが出来ます。
# PostgreSQL Ident Authentication Maps # ==================================== # # Refer to the PostgreSQL Administrator's Guide, chapter "Client # Authentication" for a complete description. A short synopsis # follows. # # This file controls PostgreSQL ident-based authentication. It maps # ident user names (typically Unix user names) to their corresponding # PostgreSQL user names. Records are of the form: # # MAPNAME IDENT-USERNAME PG-USERNAME # # (The uppercase quantities must be replaced by actual values.) # # MAPNAME is the (otherwise freely chosen) map name that was used in # pg_hba.conf. IDENT-USERNAME is the detected user name of the # client. PG-USERNAME is the requested PostgreSQL user name. The # existence of a record specifies that IDENT-USERNAME may connect as # PG-USERNAME. Multiple maps may be specified in this file and used # by pg_hba.conf. # # This file is read on server startup and when the postmaster receives # a SIGHUP signal. If you edit the file on a running system, you have # to SIGHUP the postmaster for the changes to take effect. You can use # "pg_ctl reload" to do that. # Put your actual configuration here # ---------------------------------- # # No map names are defined in the default configuration. If all ident # user names and PostgreSQL user names are the same, you don't need # this file. Instead, use the special map name "sameuser" in # pg_hba.conf. # MAPNAME IDENT-USERNAME PG-USERNAME
[MAPNAME]には pg_hba.confファイルで「ident」を指定した際に合わせて指定するMAPNAMEを指定します。そして[IDENT-USERNAME]と[PG-USERNAME]にそれぞれidentのユーザー名とPostgreSQLのユーザー名を対応させて記述していきます。
現在identを使っていないため、現在何の設定も記述されていません。
具体的な使い方は、必要になった時に説明を行います。
( Written by Tatsuo Ikura )