Обсуждение: createdb.exe prompting for password on Vista

Поиск
Список
Период
Сортировка

createdb.exe prompting for password on Vista

От
"Greg Quinn"
Дата:

I am using createdb to automatically create a database from a .sql file, but in Vista it seems to prompt me for the postgres password.

How can I stop this from happening? I’m not using the –W or –password option so why does it ask me for a password?

 

Here is my command...

 

createdb.exe -U postgres myDb

 

Thanks

 

Re: createdb.exe prompting for password on Vista

От
Andrew Sullivan
Дата:
On Sun, May 27, 2007 at 09:02:56PM +0200, Greg Quinn wrote:
> I am using createdb to automatically create a database from a .sql file, but
> in Vista it seems to prompt me for the postgres password.
>
> How can I stop this from happening? I'm not using the -W or -password option
> so why does it ask me for a password?

You must have password authentication enabled.  You'd have to change
it to "trust", I guess.

A

--
Andrew Sullivan  | ajs@crankycanuck.ca
I remember when computers were frustrating because they *did* exactly what
you told them to.  That actually seems sort of quaint now.
        --J.D. Baldwin

Re: createdb.exe prompting for password on Vista

От
"Greg Quinn"
Дата:
And how would I enable this?
I've tried all the created password options with no luck.

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Andrew Sullivan
Sent: 28 May 2007 02:52 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] createdb.exe prompting for password on Vista

On Sun, May 27, 2007 at 09:02:56PM +0200, Greg Quinn wrote:
> I am using createdb to automatically create a database from a .sql file,
but
> in Vista it seems to prompt me for the postgres password.
>
> How can I stop this from happening? I'm not using the -W or -password
option
> so why does it ask me for a password?

You must have password authentication enabled.  You'd have to change
it to "trust", I guess.

A

--
Andrew Sullivan  | ajs@crankycanuck.ca
I remember when computers were frustrating because they *did* exactly what
you told them to.  That actually seems sort of quaint now.
        --J.D. Baldwin

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@postgresql.org so that your
       message can get through to the mailing list cleanly



Re: createdb.exe prompting for password on Vista

От
Andrew Sullivan
Дата:
On Mon, May 28, 2007 at 07:18:47PM +0200, Greg Quinn wrote:
> And how would I enable this?
> I've tried all the created password options with no luck.

You'll need to look at
http://www.postgresql.org/docs/8.2/static/client-authentication.html.
Sorry, I know nothing about Windows, so if there's some
Windows-specific tricks, you may need to know that.

A

--
Andrew Sullivan  | ajs@crankycanuck.ca
Everything that happens in the world happens at some place.
        --Jane Jacobs

Re: createdb.exe prompting for password on Vista

От
"Greg Quinn"
Дата:
Setting the authentication option to "trust" seems to work but now I'm
worried my application won't need a password for users accessing the
database. It is a client-server application so I don't know which IP
addresses can/can't use it and I'm not relying my application to be on a
windows domain/active directory.

I'm thinking the best way to get around it is change the auth option to
trust in my installer, create the database, and then automatically set the
auth option back to "md5". Not the most elegant solution but it will work
for now.

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Andrew Sullivan
Sent: 28 May 2007 07:46 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] createdb.exe prompting for password on Vista

On Mon, May 28, 2007 at 07:18:47PM +0200, Greg Quinn wrote:
> And how would I enable this?
> I've tried all the created password options with no luck.

You'll need to look at
http://www.postgresql.org/docs/8.2/static/client-authentication.html.
Sorry, I know nothing about Windows, so if there's some
Windows-specific tricks, you may need to know that.

A

--
Andrew Sullivan  | ajs@crankycanuck.ca
Everything that happens in the world happens at some place.
        --Jane Jacobs

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq



Re: createdb.exe prompting for password on Vista

От
Andrew Sullivan
Дата:
On Mon, May 28, 2007 at 09:13:20PM +0200, Greg Quinn wrote:
> I'm thinking the best way to get around it is change the auth option to
> trust in my installer, create the database, and then automatically set the
> auth option back to "md5". Not the most elegant solution but it will work
> for now.

You could perhaps set up a .pgpass just for you at the beginning as
well; but in general, yes, if you have to rely on someone else
managing the permissions to the back end, then you also have to be
able to cope with the authentication mechanisms.

A

--
Andrew Sullivan  | ajs@crankycanuck.ca
The fact that technology doesn't work is no bar to success in the marketplace.
        --Philip Greenspun