Author Topic: Problem with pgAdmin  (Read 9123 times)

Offline Pumper

  • Newbie
  • *
  • Posts: 2
Problem with pgAdmin
« on: January 07, 2010, 02:41:33 AM »
Hi, I am new here and new to Postgres & pgAdmin.
I cannot logon to Postgresql w/pgAdmin. I get message
FATAL:  password authentication failed for user "walter".
I read the article,Howto setup Database Server With postgresql and pgadmin3.
I am using a stand alone system, no network, with Ubuntu 9.10.
Do I need to make all of the changes in the article since I am not a server??
I can open a db in terminal.
I am very frustrated, please help.
Thank You

Ubuntu Forums (Ubuntu Linux Support)

Problem with pgAdmin
« on: January 07, 2010, 02:41:33 AM »

Offline gg234

  • Newbie
  • *
  • Posts: 39
Re: Problem with pgAdmin
« Reply #1 on: January 07, 2010, 07:13:25 AM »
You have to follow all steps in the article and check the following

You probably don't have permission to access the template1 database on the server (which pgAdmin intially connectsto by default). On one of the tabs under Tools -> Options, try setting the name of the master database to one you can access

Offline Pumper

  • Newbie
  • *
  • Posts: 2
Re: Problem with pgAdmin
« Reply #2 on: January 07, 2010, 10:24:41 PM »
Thanks for the reply, but I am still nowhere.

"Now we need to reset the password for the ‘postgres’ admin account for the server"    sudo su postgres -c psql template1
From that I get syntax error.
But I started from  postgresql=#       If I start from template1 prompt, I get

template1=# ALTER USER postgres WITH PASSWORD ‘walter’;
ERROR:  syntax error at or near "‘walter’"
LINE 1: ALTER USER postgres WITH PASSWORD ‘walter’;

Also: I do not have those options available in the tools menu.
Thankyou.

Offline gg234

  • Newbie
  • *
  • Posts: 39
Re: Problem with pgAdmin
« Reply #3 on: January 10, 2010, 11:01:14 PM »
For anyone in the same problem follow this procedure

these are the steps to set up a database and a user for that db, never use postgres as the main user for everyday work or for a public site!!!

1: go to a terminal and gain acces like postgres user:

:~$ sudo su postgres -

2: now going to enter postgres client, there are linux commands to create databases and users, but I preffer to do all in the pgsql client, cuz when you go to other OS don't get lost!

:~$ psql

postgres=#

3: Change/set the postgres user password:

# ALTER USER postgres WITH ENCRYPTED PASSWORD 'yourhardtoguesspassword';

don' t forget the semicolon at the end of every sentence in the psql client.

4: Create the new database:

# CREATE DATABASE yourdatabase;

5: Create the new user for the database:

#CREATE USER youruser WITH ENCRYPTED PASSWORD 'youruserpassword';

6: Grant All privilegies to youruser in yourdatabase:

# GRANT ALL PRIVILEGES ON DATABASE yourdatabase TO youruser;

from now on user youruser to manage yourdatabase, ans postgres user only to admin all the databases with pgadmin or other software or the psql client.

Source http://ubuntuforums.org/showthread.php?t=388632