I think the secrets in the /etc/postgresql/pg_hba.conf file.
If your coming from a mysql background, this will seem quite different.
So using your example...
[EMAIL PROTECTED]:su - postgres
[EMAIL PROTECTED]:~$ createdb foo
CREATE DATABASE
[EMAIL PROTECTED]:~$ createuser foouser
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) y
CREATE USER
[EMAIL PROTECTED]:~$ psql -U foo foouser
psql: FATAL: IDENT authentication failed for user "foo"
--Im guessing this is the error you got?
-- So..
[EMAIL PROTECTED]:~$ vi /etc/postgresql/pg_hba.conf
-- Then above all the other entries, till you sort out
-- how you want to use your permissions and security etc
-- put:
-- local foo foouser trust
-- (this assumes you're trying to access from same box)
then...
su -
[EMAIL PROTECTED]:~$ /etc/init.d/postgresql restart
[EMAIL PROTECTED]:~$ psql -U foouser foo
Welcome to psql 7.4.2, 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
foo=#
Best of luck
Glenn
On Wed, 2004-03-17 at 13:30, Tom Allison wrote:
> I'm trying to get debian's postgresql server running on a machine.
>
> But I'm stuck on what the passwords are for the users I create.
>
> createdb foo
> createuser foouser
>
> works just fine.
> But how do I log in to the database foo as user foouser?
> It says I need a password in the docs, But I have no clue what it might
> be, I was never asked for one.
>
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]