X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=gD7ds8n54zyxmIAQ deDEhGxajKt2XHWTn7HXV/eodRrmtxUTGvBwr6/hm4p0ulBcQQ7SZHPtrR4yEsBm UYFnRpB58/VkJugqJ2kWCBlOQyYAdKh6DIyuXIGZKBF1eCJSS8NMzvWDmArpbQsS edy4nSGAYCgoXUncVaCIkKjamI0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=LK5asirpOhLj3KLrc74Oqs vcbNA=; b=Q7nCowOXPCF2lR29s3D14hS2AJtIw4LRtZnO8BEmafz6VOs1R01vrw Ky0lQDjHDZ3Aw6SRETmiAuI+/iPoypK9RCfXxQSJ9kKvUztzEq+At/y+Hw95+PD8 eAGSZaqc0fUSmqz8eeIu88iEDcGdlytEl6JMzm5EeEmrk143qyhkQ= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,MIME_BASE64_BLANKS,SPF_SOFTFAIL,UNSUBSCRIBE_BODY autolearn=no version=3.3.2 X-HELO: smtp.ht-systems.ru Date: Tue, 11 Nov 2014 18:29:59 +0300 From: Andrey Repin Reply-To: cygwin AT cygwin DOT com Message-ID: <551076208.20141111182959@yandex.ru> To: Corinna Vinschen , cygwin AT cygwin DOT com Subject: Re: RFC: 1.7.33 problem with user's home directory In-Reply-To: <20141111101821.GO2782@calimero.vinschen.de> References: <20141110205216 DOT GJ2782 AT calimero DOT vinschen DOT de> <0B8D23F7-0258-472D-BF38-860402FD3CDC AT etr-usa DOT com> <20141111101821 DOT GO2782 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id sABFZj5I011138 Greetings, Corinna Vinschen! >> > Shall the "db" entries utilize the Windows home folder if it exits(*) >> > and drop using the unixHomeDirectory? It seems inevitable… >> >> Use of AD implies some level of security consciousness. The ability to write to c:\cygwin — not just during installation, but during all use thereafter! — comes out of a world where every user is a local Administrator. >> >> This answer I wrote on Stack Overflow is one way to solve the problem today: >> >> http://stackoverflow.com/questions/26666180/ >> >> It might not be a bad idea if Cygwin started doing this sort of thing by default in the future. (Obviously for new installs only.) > What I gather from the replies so far is this: > - Nobody really cares for unixHomeDirectory. As I understand it from replies, it's not "nobody care", it's "this is wrong way of doing it". > - Some want to use the Windows home folder. > - Some want Cygwin to utilize the HOMEPATH dir. When you clarify your question, this seems to be the same point. > - Some want Cygwin to use always it's own /home and do everything else > via symlinks or mount points. > The problem so far is that I'm not sure it's clear to everybody what > I mean. I'm *not* talking about a default value which can easily be > overridden by tweaking /etc/passwd. I'm talking about what the passwd > entry contains if there's no passwd file, and the admins want to keep > the administration strictly inside AD. The passwd entry gets generated > from what AD provides. And here we need a sensible default behaviour. Yes, this makes more sense. > One possible, but not naturally useful default behaviour is what > the current code does: > 1. Utilize the unixHomeDirectory AD attribute. > 2. If unixHomeDirectory is empty, fall back to /home/$USER. As has been pointed out, unixHomeDirectory is to tell *NIX system, where o look for user's homedir. Cygwin is not a a Unix system, and I have to agree that using this attribute for Cygwin wouldn't be the right thing. > Another possible behaviour: > 1. Utilize the homeDirectory AD attribute (aka %HOMEDRIVE%%HOMEPATH%). > 2. If homeDirectory is empty, fall back to /home/$USER. > Another: > 1. Always use /home/$USER and let the admins come up with a matching > mount point scheme. > Another: > 1. Add a setting to /etc/nsswitch.conf which allows to specify one of > the above: > home: [unix|win|home]... > - "unix" means, set pw_dir to unixHomeDirectory > - "win" means, set pw_dir to homeDirectory > - "home" means, set pw_dir to /home/$USER > - Multiple entries are possible. > - Default in the absence of this setting is: always set pw_dir to > /home/$USER. How about a slight modification to this? nsswitch.conf configurable settings: user: Use %AppData%/Cygwin%PLATFORM% (Separate directory for different platform Cygwins) system: Use homeDirectory AD attribute. cygwin: Use current Cygwin way of /home/$USERNAME. Default setting is up to discussion. This is more clear in my opinon, than "unix" or "win" (Cygwin is not "unix/linux", neither it's "windows" - it's a userspace DLL providing POSIX API compatibility in Windows), and definitely more clear, than "home: home". -- WBR, Andrey Repin (anrdaemon AT yandex DOT ru) 11.11.2014, <18:18> Sorry for my terrible english...