delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/09/19:06:34

X-Spam-Check-By: sourceware.org
Message-ID: <31b7d2790701091606xa4fb359wcd993c781104d2da@mail.gmail.com>
Date: Wed, 10 Jan 2007 00:06:10 +0000
From: "DePriest, Jason R." <jrdepriest AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Re: username should be lower-case for $USER
In-Reply-To: <D3DA8E9DB543364DB6DE9B5964BA8EEAC7C51E@auntm231.apac.corp.eds.com>
MIME-Version: 1.0
References: <eo13qf$p4j$1 AT sea DOT gmane DOT org> <D3DA8E9DB543364DB6DE9B5964BA8EEAC7C51E AT auntm231 DOT apac DOT corp DOT eds DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

First -

On 1/9/07, Igor Peshansky  wrote:
> On Tue, 9 Jan 2007, DePriest, Jason R. wrote:
>
> >
> > $USER is a Windows environment variable and Cygwin doesn't change it.
> > It just reports what Windows says.
>
> Not true.  $USER is actually a shell variable, and is (re)set by the shell
> (bash, ash, tcsh, what have you).  You must be thinking of $USERNAME,
> which is a Windows variable.
>

Yes, you are exactly correct.  I goobered that and I am glad you
caught it and put it out there so at least the archives will reflect
the truth.

Next -

On 1/9/07, Irwin, Doug  wrote:
> As covered later in this thread the user is logging into a domain.
> Windows is indeed case insensitive
> WRT logins and can even be forced into case insensitive mode for
> passwords programatically (as
> demonstrated by the l0phtcrack algorithm).  But I have never seen a
> DOMAIN report the user id back in
> lowercase, even when it was specifically entered in lower case (I may be
> wrong about this - please let
> me know if you have contrary evidence).

If the user ID is created with lower-cased letters, it will be stored
and reported in lower-cased letters.  At least that is how the Windows
2003 Active Directory where I work expresses its user IDs.

For example, our regular IDs are a number.  Some special IDs have
letters added to the beginning of the number.
I am looking at user IDs right now through the AD User and Computers
mmc snap-in and I can see that most of them are in all caps, but some
are not.  No matter how I look at the account name for this particular
ID, it is in lower-cased letters.
The reported 'dn' of objects with lower-cased letters have lower-cased
letters in them, so AD will use that to report the values.

I also know that when you initially log on to a system and it creates
a new user profile for you, the folder it creates will have upper /
lower -cased letters based on how you logged on and not on how AD says
your ID should be capitalized.

>
> There is another workaround, tho!  In my environment I log into the
> domain with a login in the form
> "AA9999", but need my Cygwin environment to recognise me as "sybase".
> So I simply edited the
> leading column of my record in /etc/passwd and changed the contents
> "sybase".  Since the other tokens
> linking me record to the domain account were unchanged Cygwin sees me as
> "sybase", but the domain sees
> me as myself.  This has been working for well over a year.  If anyone
> sees any problems with it I'd
> be glad to hear form them.
>
> -doug
> ----------------------------------------

This is of course the new best answer to the problem and is something
I also routinely do (mostly to distinguish between groups that are in
different domains but would otherwise have the same name).

I have no idea why it wasn't suggested earlier unless we all just
thought he had probably already tried that.

-Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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