From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16359 invoked by alias); 21 Feb 2014 20:27:50 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 16343 invoked by uid 89); 21 Feb 2014 20:27:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.2 required=5.0 tests=AWL,BAYES_05 autolearn=ham version=3.3.2 X-HELO: calimero.vinschen.de Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Feb 2014 20:27:48 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 750A8520412; Fri, 21 Feb 2014 21:27:45 +0100 (CET) Date: Fri, 21 Feb 2014 20:27:00 -0000 From: Corinna Vinschen To: cygwin-apps@cygwin.com Subject: Re: HEADSUP: New getent tool to read passwd and group data Message-ID: <20140221202745.GE2246@calimero.vinschen.de> Reply-To: cygwin-apps@cygwin.com Mail-Followup-To: cygwin-apps@cygwin.com References: <20140220193814.GU2246@calimero.vinschen.de> <025d01cf2f2d$014b0040$03e100c0$@ieee.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xlNb4re00Yt31/7n" Content-Disposition: inline In-Reply-To: <025d01cf2f2d$014b0040$03e100c0$@ieee.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-02/txt/msg00044.txt.bz2 --xlNb4re00Yt31/7n Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2389 For some reason the original mail didn't make it to the list. I assume this is because the mail body contains raw email addresses. Can you please filter them out before sending? Thanks! On Feb 21 12:47, Pierre A. Humblet wrote: > > -----Original Message----- > > From: cygwin-apps-owner[...] > > On Behalf Of Corinna Vinschen > > Sent: Thursday, February 20, 2014 14:38 > > To: cygwin-apps[...] > >=20 > > Hi guys, > >=20 > >=20 > > I just uploaded the new getent package and sent the announcement, > >=20 > > I'm repeating myself here because this is really important and I'm not = sure > > everybody on this list reads the cygwin and cygwin-announce lists. > >=20 > > In short, we want to get rid of the requirement to maintain /etc/passwd= and > > /etc/group files, per http://cygwin.com/ml/cygwin/2014-02/msg00306.html > >=20 > > In future, tools and scripts, especially service installation helper sc= ripts like > > my ssh-host-config, must not rely on being able to grep user and group > > information from /etc/passwd and /etc/group. > >=20 > > Rather, the scripts should be changed to use the getent tool as soon as > > possible. Usage for checking passwd: > >=20 > > $ getent passwd > >=20 > > I'd like to ask all maintainers providing such scripts, including mysel= f, to look > > into their packages and fix them to use the getent tool. > >=20 >=20 > Corinna, >=20 > For packages such as exim we need to find the uid of System and of Admini= strator, which the user can set any which way in passwd. > So we lookup the SID (not the username) to get the uid (or gid). The SID of the administrator or the SID of the administrors group? The SID of the local administrator makes only marginal sense to me. What do you need it for? > Is there an equivalent mechanism using getent ? > Else, could Cygwin disregard the passwd entries for these 2 users and use= only the fixed values determined by the mapping from Windows?=20 You should not have to expect a name change for the SYSTEM and the Administrators account. It should be entirely sufficient to check for the user Administrator and the user SYSTEM or +SYSTEM. If you really want to check by SID, feel free to enumerate all accounts by just omitting the username and scan for the SID you're looking for: $ getent passwd | grep ',S-1-5-32-544:' $ getent group | grep ':S-1-5-18:' HTH, Corinna --xlNb4re00Yt31/7n Content-Type: application/pgp-signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJTB7bBAAoJEPU2Bp2uRE+gGa8QAIrIbulVnfn+abp5lKfkhPY3 jGbFe2RrcNX7SOOM2sO0Iw5ABICgl66FJe9lmb3T/DZaEAsOp1yVAk8kU77Ucxg6 fSdIzdW5T+I8qftC1N68aog5DW+J/WEJ5Mp/L7BYJQKBIXHwtu03VZLiPQau1cMg eF894YiI5O39djnb4dqOYD21Tc8X2aUhNSp9XX8xKzdaNs+tS+cUWvVtCcthPHaX jaqxCIpTuH7DAU4a43n41Ql0nD6pHAM8Pg3rSJ/XxJMJ0e/F4USYzKAfvmPP5+1v Wel1aqUkUHOvM8GlVG/LLqtXZ4uGienFaQN8K1dHZNDGJROKEPz7Q+8t45uq0mUX b7MFCOzkwJ9nzLVaWBfgxZ7Nm8Ljy9bDMDGdOndqib/LK+1VB8w22YwURhQb3cDP 9nIttUKOsgSF3TwubOH4cufEim/iXGQ/RjlPE5JelI2ox86EIl0D8ODOMx3uDoTi 6Hr+kUwsQwpHe2y2JYSo6V4md54CiT6+bEvhHIhNAfUfgG0vGkAcC0BVogUGRwxX 6bNH7nIpi3fhXvCkkeeXS43Fnm9sivjm9OSV7e/Ngf0nbMu+t5IolO7Z7iZTdW// 6BQRUxyKXYRrCP/ka/8xvRQ9v6cojAa/WYpjiU/bsRb2ieVkSwpitgL7g04HcwNL T7Y1ekp1cG7d4eJyDVpe =y3xF -----END PGP SIGNATURE----- --xlNb4re00Yt31/7n--