username should be lower-case for $USER

DePriest, Jason R. jrdepriest@gmail.com
Wed Jan 10 00:06:00 GMT 2007


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/



More information about the Cygwin mailing list