X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Andrew DeFaria <Andrew@DeFaria.com>
Subject:  Re: Home directory
Date:  Sun, 30 Sep 2007 23:18:58 -0700
Lines: 47
Message-ID: <fdq3gi$aiq$1@sea.gmane.org>
References:  <fdpta4$uev$1@sea.gmane.org>
Mime-Version:  1.0
Content-Type:  text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding:  7bit
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
In-Reply-To: <fdpta4$uev$1@sea.gmane.org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Gmane User wrote:
> ACcording to http://cygwin.com/faq/faq.setup.html#faq.setup.home, the 
> cygwin
> home directory is determined by the checking the following, in the 
> order listed:
>
> 1. Windows HOME environment variable
> 2. /etc/passwd
> 3. HOMEDRIVE and HOMEPATH variables in the Windows environment
> 4. /
>
> I recently got a new domain account, and the cygwin home directory is 
> a network
> drive, instead of c:/cygwin/home/UserName. I am currently trying to 
> research
> the causes, though I don't have access to the machine in question at 
> the moment.
> I assume that the path to the home directory was embedded in 
> /etc/passwd, which
> I created using "mkpasswd -d". I am debating on manually changing this in
> /etc/passwd back to c:/cygwin/home/UserName, since I might ssh into 
> the machine,
> in which case the network drive will likely not be accessible. As 
> well, working
> off a network drive by default makes one more vulnerable to network 
> problems.
> The only thing which might make the network drive attractive is the 
> limited
> space on the local drive.
>
> If I were make c:/cygwin/home/UserName my home directory, what is the 
> best way?
> Ssh only considers /etc/passwd, so it seems best to manually set it there,
> though I'd have to manually fix it each time I recreate it. It still 
> seems to
> be the best way, but opinions are welcome on "good practice".
Personally I'd:

    $ mv /home /home.save
    $ mount -bsf //<server>/<homeshare> /home
    $ mv -rp /home.save/* /home

Adjust the output of /etc/passwd to use /home/$USER
-- 
Andrew DeFaria <http://defaria.com>
There's very little advice in men's magazines, because men think, I know 
what I'm doing. Just show me somebody naked. - Jerry Seinfeld


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

