new install, can't use - need password for postgres user

From: Douglas Hyde <dhyde(at)natureserve(dot)ca>
To: pgsql-novice(at)postgresql(dot)org
Subject: new install, can't use - need password for postgres user
Date: 2011-08-12 08:24:42
Message-ID: 418859A9-3CB8-48AA-967A-6EA99910CAF3@natureserve.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I have just completed a first installation on Windows 2008 Server. I was very keen to work with PostGreSQL. I can't even do the basic things in pgAdmin III that I installed with the database, as I don't have a password and the documentation doesn't provide one. All that is mentioned in my digging is changing the pg_hba.conf file, but no details on how - the manual says:

"19.1. The pg_hba.conf file
Client authentication is controlled by a configuration file, which traditionally is named pg_hba.conf and is stored in the database cluster's data directory. (HBA stands for host-based authentication.) A default pg_hba.conf file is installed when the data directory is initialized by initdb. It is possible to place the authentication configuration file elsewhere, however; see the hba_file configuration parameter...Each record specifies a connection type, a client IP address range (if relevant for the connection type), a database name, a user name, and the authentication method to be used for connections matching these parameters. The first record with a matching connection type, client address, requested database, and user name is used to perform authentication. There is no "fall-through" or "backup": if one record is chosen and the authentication fails, subsequent records are not considered. If no record matches, access is denied."

These instructions do not seem to be about the password for an individual users, but rather the instructions to allow clients and users associated with clients to be allowed access - pgAdmin is one of those? Knowing it probably wouldn't work, I tried to edit that file, adding localhost and all users (followed guidance in the manual) and then PostGreSQL wouldn't restart. When I run pgAdmin, it presents me a password challenge, so that client seems to be connected to the server. There are several command line references to add new accounts, but they use unix commands (do those work in windows, and how do I get to command line in windows) and they also seem to require a user. So I have no password, don't know how to add one, or add a new user, and now have no documentation on what to do. Why wouldn't pgAdmin know the default password for the user "postgres" - I am not stupid, at least I don't think so, and would know to change that right away. I am now having my doubts about postgreSQL, as someone really should make this much simpler - starting off on the wrong foot.

Bottom line, how do I add a user with superuser privileges without spending several hours reading online to start using this system? I just want to log in folks, and create some databases and tables...that should take like 2 minutes. Does anyone else think this is ridiculous? Help please.

Thanks.

Doug

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Douglas Hyde 2011-08-12 08:32:28 new install, can't use - need password for postgres user
Previous Message Jason Tan Boon Teck 2011-08-12 04:11:04 Alter table to add foreign key