This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Force bash to start as administrator

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

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


Original Message:
From: Cary Lewis
Date: Wed, 11 Dec 2002 11:22:47 -0500
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:
Bug reporting:

mail2web - Check your email from the web at .

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]