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 Message-ID: <265000-220021231119462040@M2W081.mail2web.com> X-Priority: 3 Reply-To: lhall AT rfk DOT com X-Originating-IP: 209.113.174.244 From: "lhall AT pop DOT ma DOT ultranet DOT com" To: cygwin AT cygwin DOT com, clewis AT mobilecom DOT com, cygwin AT cygwin DOT com Subject: RE: Force bash to start as administrator Date: Wed, 11 Dec 2002 14:46:20 -0500 MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 X-OriginalArrivalTime: 11 Dec 2002 19:46:20.0092 (UTC) FILETIME=[FA2297C0:01C2A14D] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id gBBJkaN25462 Indeed, good point. That may solve the problem for those that don't have the privileges to start a service. It has it's own quirks though too. I find I need the password here in order for it to work. Larry Original Message: ----------------- From: Igor Pechtchanski pechtcha AT cs DOT nyu DOT edu Date: Wed, 11 Dec 2002 14:06:20 -0500 (EST) To: clewis AT mobilecom DOT com, cygwin AT cygwin DOT com Subject: RE: Force bash to start as administrator Cary, Windows already has such a service. Try the following from your bash prompt: $ at `date -d "next min" +"%H:%M"` /interactive 'c:\cygwin\bin\login.exe' Administrator and wait at most 60 seconds. If you want an interactive login, omit the "Administrator" from the line above. Not sure if you'll need password, either (I don't on my W2K machine). Igor P.S. So much for Windows security, eh? On Wed, 11 Dec 2002, lhall AT pop DOT ma DOT ultranet DOT com wrote: > You'll need a service to do this in Windows. Windows won't allow any > account other than SYSTEM the permissions to impersonate another by > default. System services run as SYSTEM by default. You can add a > service which invokes 'login' so that the user can log in someone else. > This has been discussed before on this list but setting this up goes > something like this: > > Type this in a bash window: > cygrunsrv -I LoginShell -d "Login shell" -p /usr/bin/cygstart -a > /usr/bin/login -e "CYGWIN=tty binmode ntsec" > > Go to the Control Panel->Administrative Tools->Services > Right click on "LoginShell" and go to properties. > Go to the "Log On" tab and check the "Allow service to interact with > desktop" > > Follow this with this in a bash window: > cygrunsrv -S LoginShell > > This will give you a new console window with the login prompt. From here, > you can log in as anybody, assuming you know the proper passwords. ;-) > > You should be able to use ssh to do this as well, which should be easier > than going through the above gyrations. > > Obviously, all this assumes that you can install a service or that one is > already installed for your use (ssh). Also, the above works on W2K. I > can't > speak to other platforms, although it should be generally applicable to > NT-based platforms (with the possible exception of XP-Home). > > The rest is obvious, no? ;-) > > Larry > > > Original Message: > ----------------- > From: Cary Lewis clewis AT mobilecom DOT com > Date: Wed, 11 Dec 2002 11:22:47 -0500 > To: cygwin AT cygwin DOT com > Subject: Force bash to start as administrator > > I want to be able to start a bash shell as Administrator id=500 regardless > of who I am logged into the windows box as. Alternatively can I force cygwin > to ignore the current user credentials and use the Administrator. > > I would like to be able to do this so that I can standardize my deployment > of Cygwin, I would like any user to always get the same permissions, same > home directory, etc. > > BTW, how does login work in cygwin? -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Water molecules expand as they grow warmer" (C) Popular Science, Oct'02, p.51 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/