Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Injected-Via-Gmane: http://gmane.org/ To: cygwin AT cygwin DOT com From: Andrew DeFaria Subject: Re: SSH into XP: mapped network drives disappeared! Date: Thu, 23 Oct 2003 11:39:59 -0700 Lines: 34 Message-ID: References: <20031022183112 DOT GA18629 AT te35 DOT hq DOT eso DOT org> <20031022205204 DOT GS1653 AT cygbert DOT vinschen DOT de> <20031023080628 DOT GT1653 AT cygbert DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT sea DOT gmane DOT org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en In-Reply-To: <20031023080628.GT1653@cygbert.vinschen.de> Corinna Vinschen wrote: >You're mixing stuff which doesn't belong to each other. Cygwin is not at all interested in $HOME or your /etc/passwd home entry. The evaluation of this values is done by tools in a UNIXy way. Shells (bash, tcsh, >whatever) are traditionally only paying attention to $HOME. Remember how a logon to a UNIX machine works. First, there's a terminal on which runs a getty, then login(1) is called for the authentication, login's only available information is /etc/passwd. After authentication, login sets $HOME to the correct value and starts a shell. The shell relies on the fact, that $HOME has been set correctly by the logon procedure. > >So, there are authenticating/logon tools which use /etc/passwd and there are user tools, which rely on $HOME already been set correctly by the former. That's just the way it works. > >Especially /etc/profile should *not* take the /etc/passwd value for evaluating the home directory. /etc/profile is used by the shell, in a state when $HOME should already have a value. If /etc/profile sets $HOME, this would overwrite custom settings from login tools. > Hmmm... My /etc/profile.orig (I believe that's where I put the original /etc/profile before I modified it) has # Set up USER's home directory if [ -z "$HOME" ]; then HOME="/home/$USER" fi Seems to me it not only can, but does set HOME if it has not been set before. If that be the case then why should it guess at using "/home/$USER" instead of the home field in /etc/passwd? I guess I just think that the value of %HOME% should always equal the value of home in /etc/passwd thus giving the user one consistent home directory. Granted you're correct that if %HOME% was set and is not the same as /etc/passwd's home then perhaps profile should not change the value. However to me this seems like a receipe for disaster or at least for mass confusion... YMMV -- Why is the alphabet in that order? Is it because of that song? -- 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/