Skip site navigation (1) Skip section navigation (2)

Re: Unix Scripts linking with Postgres

From: Orlando Eloy Gentil <gentil(at)cdludi(dot)com(dot)br>
To: ltt(at)pml(dot)ac(dot)uk
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Unix Scripts linking with Postgres
Date: 2001-01-16 15:28:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
	Hi all,
	How did u change it? I changed the last two lines from my pg_hda.conf (
"trust" to "crypt") but it didn't work.
	I did the following after "su -l postgres"
	1-> createdb postgres
	2-> chmod 600 pg_pwd
	3-> psql
	4-> alter user postgres with password postgres_pw
	5-> \q
	6-> changed the file pg_hda.conf as described later
	7-> /etc/rc.d/init.d/postgresql restart

	After this when I try to use "psql -u -d postgres" or "psql -u", it
says that connection to database failed and failed authentication.
	Thanks in advance,


Luke Tudor - RSG wrote:
> Dear All,
> I have set-up my postgres db to require user authentication when a user
> wishes to enter the db.
> This works wonderfully.
> I have programs written in Java, Ansi C and CGI which integrate with the
> database and pass user names and
> passwords to the database using the pgConnect function. However, I also
> have several unix scripts which must
> be able to gain access into the database in a similar manner i.e. make a
> connection with no user interaction.
> Is there anyway I can do this within a Unix Script?
> Thanks for your Assistance.
> --
> Best Regards,
> Luke.

In response to

pgsql-novice by date

Next:From: RasputinDate: 2001-01-16 15:29:12
Subject: Re: Unix Scripts linking with Postgres
Previous:From: Stephen HardmanDate: 2001-01-16 14:44:36
Subject: help

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group