delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/11/18/10:49:36

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:reply-to:date:from:to:subject:message-id
:mime-version:content-type; q=dns; s=default; b=Hj74NLasoo69BWms
wuEFg8q8B34g48YERUOOglGdGZyzUsTFoBI22nSCVFIDs75SacDfHJQE+N4fXeID
fFZ8lQHyqfC9Z2bqXC7yhEU4IbZyPQJo0LgDZ0bcBGMT/bnjSd4wRJ+tBpIXzD7k
M2zsoYwYF5UFVEPTsbuTfGrgQJM=
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:reply-to:date:from:to:subject:message-id
:mime-version:content-type; s=default; bh=1W0Z8Ug6LoP4oGhjkimbPZ
jPXiQ=; b=g7GZDCvlLdjco+IfdA+1fQlu6QjhuD7cI5hY0r7ml2jZ8D07n8nlOD
Y9VTfoMDvU1fOFPAstpWTHrawwSfK5AkNH1hpcSKP5pVaZJHpDh7K9H0H2sTIRTQ
shrW5fx/tG1iQ9w7aGtdrMF7CH3wGxTWzRVWbvV16tyIhw2Kzft4k=
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-HELO: localhost.localdomain
Reply-To: cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-4.7 required=5.0 tests=AWL,BAYES_00,TVD_PH_BODY_ACCOUNTS_PRE autolearn=no version=3.3.2
Date: Tue, 18 Nov 2014 16:43:10 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: [ANNOUNCEMENT] Update: getent-2.18.90-4
Message-Id: <announce.20141118154310.GB3151@calimero.vinschen.de>
MIME-Version: 1.0
User-Agent: Mutt/1.5.23 (2014-03-12)

Hi folks,


I just uploaded getent-2.18.90-4.

getent is a Glibc tool which allows to fetch host, passwd, group,
protocol, and service information via a simple tool.

The -4 option introduces the -w/--windows command line option.
Together with the "group" and "passwd" commands, it generates
Cygwin<->Windows account mapping records in the following form:

  $ getent -w passwd cygwin_username
  cygwin_username:cygwin_uid:windows_domain\windows_username:SID
  $ getent -w group cygwin_groupname
  cygwin_groupname:cygwin_uid:windows_domain\windows_groupname:SID

Real life example:

  $ getent -w passwd Administrator
  Administrator:1049076:VINSCHEN\Administrator:S-1-5-21-2913048732-1697188782-3448811101-500
  $ getent -w group Administrators
  Administrators:544:BUILTIN\Administrators:S-1-5-32-544

Given the -4 version came so fast after -3, here's the -3 change again
to avoid confusion:

The -3 version introduced the ability to ask for passwd and group
entries via Windows username/groupname, using the "U-" prefix as
in Cygwin's pw_gecos field:

  $ getent passwd U-BUILTIN\\Administrator
  Administrators:*:544:544:,S-1-5-32-544::

You can skip the domain name.  In this case getent relies on the
default account name resolution order of the underlying LookupAccountName(*)
function

  $ getent passwd U-Administrator
  Administrators:*:544:544:,S-1-5-32-544::

This release also fixes the problem that under current versions of
Cygwin an entry for the user/group name "????????" is printed when
enumerating user or group accounts.
 
=====================================================================
        IMPORTANT (not only) FOR CYGWIN PACKAGE MAINTAINERS
=====================================================================

The most important aspect for Cygwin for the near future is this:

With the new passwd/group code just in testing (see
https://cygwin.com/preliminary-ntsec.html for lots and lots
of information), tools and scripts must not rely anymore on being able
to grep user and group information from /etc/passwd and /etc/group!

The new way to read passwd and group information from, for instance,
service installation helper scripts, is to use the getent tool for
this purpose.

I'd like to urge all maintainers which provide such scripts to look
into their packages and fix them to use the getent tool, rather than
grep'ing /etc/passwd and /etc/group directly.
=====================================================================

(*) http://msdn.microsoft.com/en-us/library/windows/desktop/aa379159%28v=vs.85%29.aspx


Have fun,
Corinna

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

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