This is the mail archive of the cygwin 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: bash 3.2.49(23): when I start a bash window, $HOME is the DOS value rather than /home/lwv27

On 10/23/2009 03:55 PM, wrote:
On Fri, Oct 23, 2009 at 13:47, Dave Korn
<>  wrote:
  The home dir won't just appear when you update mkpasswd; you have to start a
new shell, when the /etc/profile startup script notices your home dir setting
doesn't exist it'll kick of the creation process for you.

  For the full explanation, see:


Huh? Wait. I'm ah... Oh, you meant the other Larry. ;-)

Dave is right.  Creating a new shell is a much better way to get the
home directory created.  Here is an excerpt from /etc./profile.

50 # If the home directory doesn't exist, create it.
51 if [ ! -d "${HOME}" ]; then

Maybe I missed this clarification for the OP in the intervening thread
messages but if HOME is actually set in the Windows environment, it
will override the home path set in '/etc/passwd'.  Starting a new shell
is certainly required to invoke the mechanism to create the home directory
and copy the skeleton files in but that won't happen unless the directory it
thinks is "home" doesn't exist.  If the Windows environment has $HOME
pointing to an existing directory, then the changes in '/etc/passwd' will be
transparent no matter what he does.

Larry Hall                    
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746


A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

Problem reports:
Unsubscribe info:

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