This is the mail archive of the cygwin@sources.redhat.com 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]

RE: why am I administrator?



Here's what I've (empirically) determined about this and what I did about
it:

First, I'm on Win2k connected to an NT4 hosted domain. The userid I use to
log into windows is on the domain, not the local machine.

The cygwin setup program runs mkpasswd and mkgroup with the -l switch so it
only generates the local information.

It looks like id.exe (and probably login?) use the *name* you logged in with
as a key into /etc/passwd. If its not there it almost seems like it takes
the group ID and finds the first user in /etc/passwd with that group and
assumes you're that person. Or, I'm probably wrong.

Anways, I ran mkpasswd -d and grep'ed out the line with my user name and
appended that to /etc/passwd. Then cygwin got the right user ID and user
name, but the group was still messed up.

I then ran mkgroup -d and appended that to /etc/group. I'm not sure if it
was unique to our setup or what, but the local configuration had a group
with ID 513 and name None and our domain had a group with ID 513 and a
reasonable name. So I deleted the bogus looking entry from the local group
information (the one with the name "None").

After doing that id.exe returns the right user name, user id, group name and
group id and the shell environment variables get set to seemingly correct
values.

I *don't* have ntsec set in CYGWIN - I assume that would invalidate most of
what I did, but haven't tried.

-dave.


-----Original Message-----
From: Larry Hall (RFK Partners, Inc) [mailto:lhall@rfk.com]
Sent: Wednesday, January 10, 2001 3:32 PM
To: soren@wonderstorm.com; cygwin@cygwin.com
Subject: Re: why am I administrator?


At 06:19 PM 1/10/2001, Soren Andersen wrote:
>On 10 Jan 2001, an entity purporting to be Larry Hall (RFK Partners, Inc)
>[Larry Hall (RFK Partners, Inc) <lhall@rfk.com>] wrote [regarding Re: why
am I administrator?]
>
> > 
> > This seems to come up allot.  Maybe we need an FAQ for this?
> > 
>
>Yes! That we do. I have long been puzzled and am still confused about 
>this. How do I do what Earnie wrote in the previous msg:
>


I'm definitely left with the impression that while you can edit the 
/etc/passwd file to make sure things get set up properly, the best solution
for those not using 9x is to run mkpasswd.  You should try this if you're
having problems.


>I want to know if I can be another user without actually logging in to NT 
>as somebody else (I don't have anyone else using my machine and I 
>don't want the expenditure of disk space and perhaps loading / boot 
>additional time that I think this increased complexity might cause). I 
>would like to be a different user so that I can build certain packages in a

>certain way -- logging to bash with a different env set up and ready to go.
>
>I tried the same thing: I set "USER=soren" in my NT env but bash always 
>recognizes me only as "Administrator".


Running mkpasswd should fix this.  As far as the rest of it is concerned, 
yourebest bet is to read the sections in the user guide regarding NT 
security.  Off-hand, I'm not sure you can actually change your user, 
although you can change your name to anything you like easily by changing
the name that goes with your user id in the /etc/passwd file.  Anyway, 
the user guide will give you better background on NT security and how
that affects your permissions and user options.  Just my opinion but I
doubt the specific information you're looking for will become part of an
FAQ.  The user documentation might be a possibility though (if there's not
already enough in there to answer to this issue).



Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


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