This is the mail archive of the
mailing list for the Cygwin project.
Re: Changing users in a bash shell.
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: Jason Tishler <jason at tishler dot net>
- Cc: cygwin at cygwin dot com
- Date: Fri, 13 Jun 2003 12:25:25 -0400 (EDT)
- Subject: Re: Changing users in a bash shell.
- Reply-to: cygwin at cygwin dot com
On Fri, 13 Jun 2003, Jason Tishler wrote:
> 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. 
> 2. Set up sshd and then execute "ssh postgres@localhost". 
> 3. Use Fast User Switching to switch user to postgres.  
>  Obviously cannot be scripted
>  Can be scripted but assumes that sshd is set up.
>  Only available on XP and later.
Umm, Jason, what about 4. Use RunAs? It's available on at least Win2k,
and maybe even on WinNT...
> > 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.
|\ _,,,---,,_ email@example.com
ZZZzz /,`.-'`' -. ;-;;,_ firstname.lastname@example.org
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html