[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debian-users:45149] postgresqlのcron



お世話になります下野と申します。

woodyで構築されたwebサーバにPostgreSQLが入っているのですが
PostgreSQLのパッケージで自動で入ったcronでエラーが発生しています。

cronの内容は
/etc/cron.d/postgresqlのファイル名で
0 4 * * * postgres [ -x /usr/lib/postgresql/bin/do.maintenance ] && /usr/lib/postgresql/bin/do.maintenance -a
となっています。

エラーはメールで来て、その内容は
\connect: FATAL 1 : Password authentication failed for user "postgres"
となっています。

また、cronではなくコマンドで
su - postgres
/usr/lib/postgresql/bin/do.maintenance -a でリターンすると
Password:
とパスワードの入力を求められます。
ここで何も入力せずにEnterキーを押すとまたPassword:となります。
適当なキーを押してEnterキーを押すと
\connect: FATAL 1:  Password authentication failed for user "postgres"
とcronのメールと同じ結果が返ってきます。

/etc/shadowを確認すると
postgres:*:11409:0:99999:7:::
となっているので、postgresユーザにはパスワードはかかっていないと思う
のですが・・・何故パスワード入力が求められるのでしょうか?

なお、/etc/postgres/pg_hba.conf は以下のようになっています。
local        dicos                                         crypt
host         dicos       127.0.0.1     255.255.255.255     crypt
local        all                                           ident sameuser
host         all         127.0.0.1     255.0.0.0           ident sameuser
host         all         0.0.0.0       0.0.0.0             reject

なぜエラーが発生するのか、どうすればエラーが発生しなくなるのか分からずに
困っています。どうかご教示のほどよろしくお願いします。