public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: RFC: 1.7.33 problem with user's home directory
Date: Tue, 11 Nov 2014 11:09:00 -0000	[thread overview]
Message-ID: <20141111110943.GA28012@calimero.vinschen.de> (raw)
In-Reply-To: <20141111101821.GO2782@calimero.vinschen.de>

[-- Attachment #1: Type: text/plain, Size: 3836 bytes --]

On Nov 11 11:18, Corinna Vinschen wrote:
> On Nov 10 23:09, Warren Young wrote:
> > On Nov 10, 2014, at 1:52 PM, Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
> > 
> > > 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.
> 
> - Some want to use the Windows home folder.
> 
> - Some want Cygwin to utilize the HOMEPATH dir.
> 
> - 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.
> 
> 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.
> 
> 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.

Another way to handle Cygwin-specific settings would be to utilize the
description(*) field in the user's entry, just as implemented for SAM
accounts.  See the SAM part of
https://cygwin.com/preliminary-ug/ntsec.html#ntsec-mapping-passwdinfo
for how to use XML-alike entries in the description field to add user
data, for instance

  <cygwin home="/foo/bar"\ shell="/bin/tcsh"/>

This could be added to some standard scheme:

  1. Utilize the description attribute.
  2. If description is empty, utilize homeDirectory.
  3. If homeDirectory is empty, use /home/$USER.

Or this could be added as a setting in nsswitch.conf:

  home: [unix|win|desc|home]

I could think of arbitrarily complex ways to extend this nsswitch.conf
setting, as in:

  home: /foo/bar/%U

With %U being the Windows username, %D the domain name, %u the Cygwin
user name.  But all this also takes time to implement, of course :(


Corinna


(*) Note the naming confusion:
    The `net user /comment:...' command sets the AD attribute "description".
    The `net user /usercomment:...' command sets the AD attribute "comment".

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2014-11-11 11:09 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-10 20:52 Corinna Vinschen
2014-11-10 21:18 ` Achim Gratz
2014-11-10 21:39   ` Corinna Vinschen
2014-11-11  7:30     ` Achim Gratz
2014-11-11  0:50 ` Andrey Repin
2014-11-11  2:42   ` Andrew DeFaria
2014-11-11  6:35     ` Andrey Repin
2014-11-11  9:15   ` Frank Fesevur
2014-11-11 15:20     ` Andrey Repin
2014-11-11  1:39 ` Jeffrey Altman
2014-11-11  6:19   ` Warren Young
2014-11-11  9:33     ` Corinna Vinschen
2014-11-11 10:00   ` Corinna Vinschen
2014-11-11 13:52     ` Jeffrey Altman
2014-11-11 16:19       ` Corinna Vinschen
2014-11-11  4:26 ` Yaakov Selkowitz
2014-11-11  6:05   ` Warren Young
2014-11-11  6:50   ` Andrey Repin
2014-11-11  9:00     ` Marco Atzeri
2014-11-11  6:09 ` Warren Young
2014-11-11 10:18   ` Corinna Vinschen
2014-11-11 11:06     ` Achim Gratz
2014-11-11 11:14       ` Corinna Vinschen
2014-11-11 12:48         ` Habermann, David (D)
2014-11-12 16:27           ` Warren Young
2014-11-12 16:31           ` Warren Young
2014-11-12 17:55             ` Habermann, David (D)
2014-11-12 21:28               ` cyg Simple
2014-11-12 21:51                 ` Habermann, David (D)
2014-11-13  9:06                   ` Corinna Vinschen
2014-11-12 22:35                 ` Andrey Repin
2014-11-11 16:45         ` Achim Gratz
2014-11-11 16:55           ` Corinna Vinschen
2014-11-26 21:16         ` Corinna Vinschen
2014-11-26 21:29           ` Cygwin AD schema and configuration extensions (was Re: RFC: 1.7.33 problem with user's home directory) Corinna Vinschen
2014-11-26 21:56             ` Achim Gratz
2014-11-27  9:36               ` Corinna Vinschen
2014-11-27 14:52                 ` Corinna Vinschen
2014-11-27 19:23                   ` Achim Gratz
2014-11-27 20:12                     ` Corinna Vinschen
2014-11-28  2:21                       ` Achim Gratz
2014-11-26 21:58             ` Habermann, David (D)
2014-11-26 23:15               ` Corinna Vinschen
2014-11-27 16:12           ` RFC: 1.7.33 problem with user's home directory Corinna Vinschen
2014-11-27 17:41           ` Corinna Vinschen
2014-11-28 12:48             ` Andrey Repin
2014-11-28 16:20               ` Corinna Vinschen
2014-11-28 17:04                 ` Andrey Repin
2014-11-28 18:34                   ` Corinna Vinschen
2014-11-29  9:36                     ` Andrey Repin
2014-12-01 17:50                       ` cyg Simple
2014-12-02  5:35                         ` Andrey Repin
2014-12-03 14:05                           ` cyg Simple
2014-12-03 20:20                             ` Andrey Repin
2014-12-04 12:21                               ` Linda Walsh
2014-12-04 13:47                                 ` Corinna Vinschen
2014-12-02 16:03                 ` Corinna Vinschen
2014-11-28 16:17             ` Andrey Repin
2014-12-03  7:35           ` Cygwin AD integration home/shell changes Andrey Repin
2014-12-03  9:16             ` Corinna Vinschen
2014-12-03 13:50               ` Andrey Repin
2014-12-04  9:40                 ` Corinna Vinschen
2014-12-05  5:20                   ` Andrey Repin
2014-12-05 10:13                     ` Corinna Vinschen
2014-12-05 20:20                       ` Andrey Repin
2014-12-06 10:08                         ` Corinna Vinschen
2014-12-04 15:49           ` RFC: 1.7.33 problem with user's home directory Corinna Vinschen
2014-12-05  5:35             ` Andrey Repin
2014-12-05 10:15               ` Corinna Vinschen
2014-12-05 21:20                 ` Andrey Repin
2014-12-06 11:08                   ` Corinna Vinschen
2014-12-10 20:52                   ` cyg Simple
2014-12-10 22:50                     ` Andrey Repin
2014-12-10 23:29                     ` David Stacey
2014-11-11 11:09     ` Corinna Vinschen [this message]
2014-11-11 12:11     ` Bryan Berns
2014-11-11 12:31       ` Corinna Vinschen
2014-11-11 15:35     ` Andrey Repin
2014-11-11 16:57       ` Corinna Vinschen
2014-11-11 20:20         ` Andrey Repin
2014-11-12 10:30           ` Corinna Vinschen
2014-11-12 20:35             ` Andrey Repin
2014-11-13  9:07               ` Corinna Vinschen
2014-11-13 21:50                 ` Andrey Repin
2014-11-14 10:32                   ` Corinna Vinschen
2014-11-17  4:05                     ` Andrey Repin
2014-11-12 16:45     ` Warren Young
2014-11-13  9:27       ` Corinna Vinschen
2014-11-13 22:05         ` Andrey Repin
2014-11-14 10:35           ` Corinna Vinschen
2014-11-11 10:01 Houder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141111110943.GA28012@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).