X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 20CE08B9CE7 for ; Tue, 8 Feb 2005 09:02:34 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 89869-07 for ; Tue, 8 Feb 2005 09:02:24 +0000 (GMT) Received: from mail.jobflash.com (oncallweb2.jobflash.com [64.62.211.41]) by svr1.postgresql.org (Postfix) with ESMTP id 0F1DC8B9B2E for ; Tue, 8 Feb 2005 09:02:25 +0000 (GMT) Received: from [192.168.2.22] (user-38lc014.dialup.mindspring.com [209.86.0.36]) by mail.jobflash.com (Postfix) with ESMTP id 6AEE5420CF; Tue, 8 Feb 2005 01:02:21 -0800 (PST) Message-ID: <42088001.3010602@jobflash.com> Date: Tue, 08 Feb 2005 01:01:53 -0800 From: Tom Arthurs User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrei Bintintan Cc: pgsql-admin@postgresql.org Subject: Re: Win32 Postgresql Command Line Password Specification References: <007501c50db5$c6e204f0$0b00a8c0@forge> In-Reply-To: <007501c50db5$c6e204f0$0b00a8c0@forge> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200502/62 X-Sequence-Number: 16230 Not sure if it will work in windows, but in unix, I use the envrionmental variable PGPASSWORD Not the safest thing in the world, but in my case, if a hacker's gotten through two layers of firewall, I'm sunk anyhow. :) Andrei Bintintan wrote: > Hi, > > I have to run some command line commands that I have to run on a windows > machine. Like pgsql, dropdb, createdb etc. > All these commands are runned from a php scripts. > > Now, my question is how can I specify a User and Password to postgresql > database system. I found out how can I say the user, but the password is > always asked in the command line. I need this also to be specified in > the command. > > for example: dropdb database1 -U postgres -W.... always ask a password > in the command line. > I want to specify in the command line the pass. > > The only solution that I found for this problem is to put the postgre > user autentication to trust and to skip the password. > > Andy.