This is the mail archive of the cygwin@cygwin.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]
Other format: [Raw text]

RE: NEWBIE: Problem with $Home being set to /usr/bin/%USERPROFILE%


Mark,

Thanks for the reply.  To answer your questions:

1. What does the command 'id' report?  Or, 'id -un'?

$ id
uid=500(Administrator) gid=513(None)
groups=513(None),544(Administrators),545(Users)

$ id -un
Administrator

2. Have you recently changed the contents of /etc/passwd?

No

   What are the permissions and ownership of this file?

-rwx------    1 Administ None          658 Sep 16 13:37 /etc/passwd*

   What are the permissions and ownership of '/etc'?

drwx------   16 Administ None         8192 Nov 14 12:35 etc/

3. What bash initialization files are you using,

  /etc/profile,

   Have you checked their permissions and ownership?

They are fine.

As far as I can tell, one issue lies within /etc/profile.  In the following
passage, $HOME is already set to /usr/bin/%USERPROFILE% and therefore does
not get set to /home/$USER :

# Set up USER's home directory
if [ -z "$HOME" ]; then
	HOME="/home/$USER"
fi


Removing the if -z check resolves the issue.  Where do you suppose bash
picked up the variable $HOME=/usr/bin/%USERPROFILE%  ?  My windows
environmental variables suggest nothing of the sort.


Thanks,

Michael

PS - Sorry about sending the output of env within my last message.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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