delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/05/28/04:36:17

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:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; q=dns; s=default; b=SaHnsjV0ofpE3KnEISF5UAagO41kZ
GXF8aMOcqb2m6p1I7wYIvtC0eGLtyu4eW5P/WmpPcBIlV72Wy/csfOGYelh3J88B
faihfHoTMTCaZOxaGX36jO+pR5z4Azot62rETY6Ez8wGvCCP6yK+c10wZw7Kes1M
B68aKCcg5g8hIo=
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:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; s=default; bh=hKyaDWXA6Xqv3MADbnVTP0D78ck=; b=Zwr
K2sVDdx3GpBfS1Fax8IRw3mlCPXFfTTd+CFsUIEvFIts43HRIPEQ0aRqP9VVOPD9
9pr0zFRR2LN/Cx1GhlaiL0t+yE0kwVJvc1QOWVb6W9TVeTwcn0qdh/a43SFoMbwc
vN4ym8lhNxwHB720gN3gNotc86RBg1d8o6hOe6SM=
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-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=Manager
X-HELO: EUR01-HE1-obe.outbound.protection.outlook.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=clarizen.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P65CzPIb9p+5gJ0QM0bCs1b87qWRzzbYuGQ5kZlhUfI=; b=A1nb+ccr5bxKdBb5aLVPLGfjxXiRxH7gD293CjIkvTTOHQn0k11CDjJH05UbkJiTgCQuGvPXYr1IdX3ldjxYf3wrfZH2ixgPcKr9fuIh3G22hnPOdLn7r7MLMshYUYrlI+vjISJN/OghVgF2j2VeTOqfHSJTEV8LIWnPN5/TTNQ=
From: Maayan Apelboim <Maayan DOT Apelboim AT clarizen DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: RE: getent doesn't show all domain users
Date: Tue, 28 May 2019 08:36:02 +0000
Message-ID: <AM6PR07MB5334AC0D9083A5425E6CA390951E0@AM6PR07MB5334.eurprd07.prod.outlook.com>
References: <3a2c51fe-894d-8959-70b9-22a9d8f980aa AT SystematicSw DOT ab DOT ca>
In-Reply-To: <3a2c51fe-894d-8959-70b9-22a9d8f980aa@SystematicSw.ab.ca>
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Maayan DOT Apelboim AT clarizen DOT com;
x-ms-oob-tlc-oobclassifiers: OLM:10000;
received-spf: None (protection.outlook.com: clarizen.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: Maayan DOT Apelboim AT clarizen DOT com
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id x4S8aGrj003585

Systems may have tens to hundreds of local user accounts, and domains may have hundreds to hundreds of thousands of user accounts.
The system probably caches only active users, and getent enumerates those if no /etc/passwd file exists, as it was designed to enumerate only a few entries from local files.
As it is, getent will not even enumerate hosts from the local hosts files or resolver.

It appears that mkpasswd enumerates all local and system accounts in the Security Accounts Manager file at $SYSTEMROOT/System32/config/SAM loaded into /proc/registry/HKEY_LOCAL_MACHINE/SAM/, so it probably does the same for domain accounts from Active Directory Domain Service.

--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised.

----

Ok, I understand why it won't display all users, but even when I query for this specific user that exists in the domain - it returns nothing.
It only works when I have /etc/passwd file in place (generated by mkpasswd -d), but I was told in a previous thread that I should not use mkpasswd -d anymore, and use getent instead.
Is there something I need to do with getent to get access for all my domain users?
Should I keep my previous passwd file generated by mkpasswd -d?

Thanks

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