プロが教える店舗&オフィスのセキュリティ対策術

宜しくお願い致します。

postgresql7.2 でlinuxアカウントに登録されていない
ユーザを作成しました。(createuser hoge)
その後 "psql -U hoge DB名" でアクセスすると
psql: FATAL 1: user "hoge" does not exist
になってしまいます。
linuxアカウントに登録されていないユーザで
DBにアクセスする事は可能なのでしょうか?
それとも必ずlinuxアカウントに登録されている
ユーザ名で作成する必要があるのでしょうか?

ご教授下さい。m(__)m

A 回答 (1件)

linuxアカウントではないhogeさんを作ってみましたが、特に、問題ありません。




[postgres]$ psql -l

List of databases
Name | Owner | Encoding
-----------+----------+-----------
postgres | postgres | SQL_ASCII
template0 | postgres | SQL_ASCII
template1 | postgres | SQL_ASCII
(3 rows)


[postgres]$ createuser hoge

Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) n
CREATE USER


[postges]$ psql -U hoge postgres

Welcome to psql 7.3, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

postgres=>
    • good
    • 0
この回答へのお礼

ご返答ありがとうございます。
xjdさんの手順と同じ事をしているのですが
なぜか上手くできません。。。
linuxアカウントに無くてもOKと言うことなので
なんとかもうひと踏ん張りしてみます。
ホントにありがとうございました。

お礼日時:2003/04/26 01:28

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!