LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-30-2004, 12:48 AM   #1
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 32
Help getting PostgreSQL working -- createuser


Trying to get PostgreSQL working for the first time.

Just installed: postgresql, postgresql-client, postgresql-doc, libpgperl.

I see that it's running (not directly copy-pasted):
Code:
ps ax | grep post
/usr/lib/postgresql/bin/postmaster
postgres: stats buffer process
postgres: stats collector process
My username is john. As root I tried:
Code:
# createuser -U postgres john
but no joy. It's telling me:
Code:
psql: FATAL 1: IDENT authentication failed for user "postgres"
I checked my /etc/passwd and there's a user "postgres" in there.

I realize that:
A. PostgreSQL "users" are different than Unix user accounts.
B. I've got to have a PostgreSQL "user" to work with db's, and it may as well be the same name as my username.

I've tried stopping and restarting /etc/init.d/postgresql.

What am I missing?
 
Old 03-30-2004, 12:42 PM   #2
souljah
Member
 
Registered: Feb 2004
Location: New York City
Distribution: Debian
Posts: 97

Rep: Reputation: 15
You missed reading the manpage for createuser. The flag -U is undefined and I think you need to set a -h host, but since I don't use postgre I couldn't say for sure. Hope this helps.

Hint: the last lines of the manpage has some excellent examples.
 
Old 03-30-2004, 01:20 PM   #3
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Original Poster
Rep: Reputation: 32
Turned out I needed to first su to user postgres, then createuser new_user worked fine.

I was using the -U option because I'd been reading an older book on setting up PostgreSQL and I guess the -U option is now deprecated (though the createuser program didn't explicitly complain about me using it).

What I "missed" from the man page was this paragraph:
|
| createuser creates a new PostgreSQL user. Only superusers
| (users with usesuper set in the pg_shadow table) can cre_ate
| new PostgreSQL users, so createuser must be invoked by
| someone who is a PostgreSQL superuser.
|

My problem was that I'd just assumed that root was a "PostgreSQL superuser".

Also, souljah wrote
> >
> > What am I missing?
> >
>
> You missed reading the manpage for createuser.
>

Jordan, thanks for the reply. It made me take a 2nd look at the man page. Next time, you might consider put a smiley in there or folks might think you're being rude/smug. :)

Last edited by johnMG; 03-30-2004 at 01:28 PM.
 
Old 03-31-2004, 08:19 AM   #4
souljah
Member
 
Registered: Feb 2004
Location: New York City
Distribution: Debian
Posts: 97

Rep: Reputation: 15
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postgresql and PHP4 not working on Debian tomj88 Linux - Software 4 10-12-2005 08:43 PM
Python with MySQL/PostgreSQL not working iainr Programming 2 02-03-2004 02:50 PM
postgresql -odbc & postgresql-jdbc installation kjsubbu Linux - Software 0 06-19-2003 02:50 AM
postgreSQL dsgdevil Linux - Software 3 02-20-2003 10:30 PM
PostgreSQL dorian33 Linux - Software 3 01-15-2003 04:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration