Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 68B3364FC39 for ; Wed, 10 Dec 2008 00:43:16 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 45711-02 for ; Wed, 10 Dec 2008 00:43:13 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.31]) by mail.postgresql.org (Postfix) with ESMTP id 4A5D264FC37 for ; Wed, 10 Dec 2008 00:43:13 -0400 (AST) Received: by yw-out-2324.google.com with SMTP id 3so155362ywj.73 for ; Tue, 09 Dec 2008 20:43:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=J5v3sYKXU/D0Lm9Fm6RpVPwB0HKzugby46LkZMg5GL8=; b=KdkaXqTDnyW2vGYx6Fp8gw2P1o3yXu7jS/DaWzseuRfETSddtZZFlLwMuNZFS0IjL4 Tx9zKYuNS0aqrnUzsPJIEqTF4cMrVixVaEAKu7xkkQhlMpIf8tV9+RS5wBuOH0seJvRh nE2bS2vwJS3Ig+lDqLNROX05BjMnsOlbY1dIU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=S51NTNQ+E0AJalyHhDc5kQVkU7J71lKrgcEbXWjDgJAK4otWSt76G8AqjZ0f84ZcRv jyLrw1P/dqXTQH90hnOGYZ3aghFfxz9qx3dodUK1Adke0671En26Hkw2Bues+5hv4nbQ J/KzpMUaUCjfWvPXGxXMgOtZf8UNNghea9izE= Received: by 10.115.75.14 with SMTP id c14mr674121wal.86.1228884191762; Tue, 09 Dec 2008 20:43:11 -0800 (PST) Received: by 10.114.167.5 with HTTP; Tue, 9 Dec 2008 20:43:11 -0800 (PST) Message-ID: Date: Tue, 9 Dec 2008 21:43:11 -0700 From: "Scott Marlowe" To: "Dan Scott" Subject: Re: Change user password Cc: pgsql-admin@postgresql.org In-Reply-To: <6835906b0812050742t279c9f04r18218cff3d79eb78@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6835906b0812050742t279c9f04r18218cff3d79eb78@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/87 X-Sequence-Number: 30920 On Fri, Dec 5, 2008 at 8:42 AM, Dan Scott wrote: > Hi, > > Is is possible to modify a user password using a command line script? > I know about the ALTER USER command from within the client, but this > looks like it's quite insecure, storing the password in the history. I > know it's possible to insert the encrypted password with ALTER USER > but that means generating the hash elsewhere. A simple 'alteruser -P > username' which then prompts for the user password would be nice. Does > this exist? \password from the psql prompt does that.