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

X-Spam-Check-By: sourceware.org
Date: Tue, 9 Jan 2007 18:06:35 -0500 (EST)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: "DePriest, Jason R." <jrdepriest AT gmail DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: username should be lower-case for $USER
In-Reply-To: <31b7d2790701091428h4ca730c6p3ddec3f4e875bc6d@mail.gmail.com>
Message-ID: <Pine.GSO.4.63.0701091802470.19688@access1.cims.nyu.edu>
References: <8241120 DOT post AT talk DOT nabble DOT com> <008601c7340c$a76fc380$a501a8c0 AT CAM DOT ARTIMI DOT COM> <8247784 DOT post AT talk DOT nabble DOT com> <31b7d2790701091428h4ca730c6p3ddec3f4e875bc6d AT mail DOT gmail DOT com>
MIME-Version: 1.0
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

On Tue, 9 Jan 2007, DePriest, Jason R. wrote:

> On 1/9/07, David Smiley  wrote:
> >
> > I forgot to add, I log into a windows domain and so I can't set the
> > case. Perhaps this issue only relates to windows domain logins.
> > Maybe they are case insensitive because when I log into the domain, I
> > ALWAYS specify it in lower case.  I don't think I've ever seen it
> > presented to me (in Windows) as upper case.  Yet in CYGWIN,
> > $USER=DSMILEY.  If domain logins are case *in*sensitive (appears
> > likely), then it would seem to me that it should be normalized to
> > lower-case for use in CYGWIN.
>
> $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.

Cygwin sets it from the data it finds in /etc/passwd.  In fact, the only
thing that Cygwin actually uses is the SID in /etc/passwd -- everything
else (including the username) is under the user's control.

> I disagree that Cygwin should normalize it to lower case by default.
>
> You can do something creative with your logon process by sending the
> variable to some shell script and having it fix the case.
> [snip perl script]

Or you can edit /etc/passwd and make your username whatever you wish it to
be (just be sure to leave the SID unchanged).  For more information, see
the NTSEC section of the User's Guide (outdated as it is).
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Freedom is just another word for "nothing left to lose"...  -- Janis Joplin

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