Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 13 Jun 2003 09:23:39 -0400 From: Jason Tishler Subject: Re: Changing users in a bash shell. In-reply-to: <5790CEEF83581444838043A480BDABD7012196DD@exchange01.zetec.com> To: cygwin AT cygwin DOT com Mail-followup-to: cygwin AT cygwin DOT com Message-id: <20030613132339.GC1548@tishler.net> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline User-Agent: Mutt/1.4i References: <5790CEEF83581444838043A480BDABD7012196DD AT exchange01 DOT zetec DOT com> Matthew, On Thu, Jun 12, 2003 at 01:08:55PM -0700, Matthew Rudolph wrote: > In the postgres.x.x.x.README there is the following: > ->The "$" prompt indicates running as the "postgres" user. > Log in as "postgres" or use ssh to emulate Unix's "su" command. > > Can you point me to something that explains how to do this? I know of three ways to do this: 1. Log out and log back in as postgres. [1] 2. Set up sshd and then execute "ssh postgres AT localhost". [2] 3. Use Fast User Switching to switch user to postgres. [1] [3] Notes: [1] Obviously cannot be scripted [2] Can be scripted but assumes that sshd is set up. [3] Only available on XP and later. > The problem I am trying to solve is an install. I trying to automate > the installation of postgresql onto winXP machines. As part of the > install I want to be able to 'su' to user postgres and run the initdb > command (and a few others) but I am not sure what is necessary to > make that happen and I have not been able to find any document like > 'How to switch users for dummies on windows'. AFAICT, there is no completely general way to script a Cygwin PostgreSQL installation (unless one assumes sshd is set up). This is why the PostgreSQL does not contain an installation script like some of the other packages. Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/