delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/12/11/15:51:55

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
Path: not-for-mail
From: Andrew DeFaria <ADeFaria AT Salira DOT com>
Subject: Re: Force bash to start as administrator
Date: Wed, 11 Dec 2002 12:49:29 -0800
Lines: 86
Message-ID: <3DF7A4D9.20503@Salira.com>
References: <265000-220021231117280767 AT M2W093 DOT mail2web DOT com> <Pine DOT GSO DOT 4 DOT 44 DOT 0212111401290 DOT 12239-100000 AT slinky DOT cs DOT nyu DOT edu>
NNTP-Posting-Host: 206.184.204.2
Mime-Version: 1.0
X-Trace: main.gmane.org 1039639860 32695 206.184.204.2 (11 Dec 2002 20:51:00 GMT)
X-Complaints-To: usenet AT main DOT gmane DOT org
NNTP-Posting-Date: Wed, 11 Dec 2002 20:51:00 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01
X-Accept-Language: en-us, en, ru, zh

Igor Pechtchanski wrote:

> 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?

Ah, wouldn't that be Cygwin's login that was responsible for the 
[non]security? I believe it didn't prompt you for a password because 
Administrator in your /etc/passwd didn't have a password.

Why not simply use Runas?

>
>
> 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?
>
>




--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019