delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/07/30/13:11:27

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:message-id:date:from:reply-to:mime-version:to
:subject:references:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=BhIdMTg8R6de4vnu
B/iF4m2FURZFPdautqQDdzwCaYKTxOGr7flw0wOzs6mu47AOIarDjAzYyxona1sK
t7CgN6eaBzR7pDmIMu+hSXTNMAxMFbnW76fqrz44j6XQIw1ERbUCEHfOyYDEjPrc
4sQBsCEIHNf5jtDFWUVI/0I4kDw=
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:message-id:date:from:reply-to:mime-version:to
:subject:references:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=/bj1e21FOjr04qTnohqgEC
oRYYA=; b=RE8+FUFQIvJwgJhFdy3ji0J46WMlWiOkbu3K9yLlGX5txqg5V5lJUb
Vzsygs+t19zURqMrjPy6TpCS48uLdnPJ4IMhy8PnG4VKK+wC2aw2kBlvcS4qGesE
ABpS7s0ZoL1b34lBVBEosu3446p66BSkKZ6KbjrAGHCoSSC+Cuxfs=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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=-1.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
X-HELO: vms173025pub.verizon.net
Message-id: <53D9270B.3010007@cygwin.com>
Date: Wed, 30 Jul 2014 13:10:35 -0400
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com>
Reply-to: cygwin AT cygwin DOT com
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.5.0
MIME-version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Simplify AD integration?
References: <20140730134716 DOT GM25860 AT calimero DOT vinschen DOT de>
In-reply-to: <20140730134716.GM25860@calimero.vinschen.de>

On 07/30/2014 09:47 AM, Corinna Vinschen wrote:
> Hi folks,
>
>
> here's a set of question to those of you interested in the new
> passwd/group functionality.  This already has been discussed partially,
> but there was no conclusion.
>
> Right now, there's a lot of variability in the user names, based on the
> /etc/nsswitch.conf settings db_prefix and db_separator.
>
> The separator char is a '+' by default but can be replaced with other
> ASCII chars.  db_prefix allows three styles of user naming conventions:
>
>    Default is 'auto':
>
>      builtin accounts;   "+SYSTEM", "+LOCAL", etc.
>      primary domain      "corinna", "cgf", ...
>      other domain:       "DOMAIN1+walter", "DOMAIN2+mathilda"
>
>    If set to 'primary':
>
>      builtin accounts;   "+SYSTEM", "+LOCAL", etc.
>      primary domain      "MYDOMAIN+corinna", "MYDOMAIN+cgf", ...
>      other domain:       "DOMAIN1+walter", "DOMAIN2+mathilda"
>
>    If set to 'always':
>
>      builtin accounts;   "NT AUTHORITY+SYSTEM", "BULTIN+LOCAL", etc.
>      primary domain      "MYDOMAIN+corinna", "MYDOMAIN+cgf", ...
>      other domain:       "DOMAIN1+walter", "DOMAIN2+mathilda"
>
> "Primary domain" here is either the primary domain of the machine or the
> local SAM if the machine is no domain member.  "Other domain" here is
> either a trusted domain or the local SAM for domain machines.
>
> Together with the variable separator char this is an awful lot of
> variability, which has the potential side effect to complicate the
> code *and* debugging.
>
> Also, the leading '+' for builtin accounts results in some downsides,
> one of them for instance the fact that `chown +x' assumes that x is a
> numerical uid or gid.  Thus `chown +SYSTEM ...' fails.  On the other
> hand it simplifies the account handling inside of Cygwin.
>
> So I'd like to ask a few questions to which I'd like to have some brief
> answers, kind of like a poll, to get a better idea how we should
> proceed:
>
> 1. Shall we remove the leading '+' from the builtin account names
>     or shall we keep it?

I'd say remove it since it isn't providing a clear benefit and,
more importantly, causes regressions in some cases with existing tools
(as you stated above with chown).

> 2. Shall we stick to '+' as the separator char or choose another one?
>     If so, which one?

Did the discussion of this before end up inconclusive?  I thought that
'+' was seen as preferable for some reason that received some overall
approval.

> 3. Shall we keep the `db_prefix' variability or choose one of
>     the prefixing methods and stick to it?  If so, which one, auto,
>     primary, or always?

My opinion is that options are only necessary when there's no clear
single solution.  If it's very clear that there is no way to merge
all these possibilities into 1 or one is not clearly a superset of
the others, then we need to keep the options.  We shouldn't keep the
options just to have options obviously. :-)

> Bonus question:
>
> 4. Should Cygwin downcase all usernames when generating the Cygwin
>     username, so, if your Windows username is 'Ralph', your Cygwin
>     username will be 'ralph'?

This is enticing since it's a more common convention for UNIX/Linux
environments, which Cygwin strives to mimic.  But I would say that
downcasing isn't desirable since it just upholds a convention.  The
convention isn't a requirement so it shouldn't be enforced.


-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019