Web lists-archives.com

Re: getent doesn't show all domain users

On 2019-05-27 03:15, Maayan Apelboim wrote:
> I have a server in the domain (duplicated from another domain if it matters).
> At first "getent passwd" run I see the user from the different domain, but 
> after a few runs it disappears.
> Even after it disappears getent doesn't return all domain users while
> mkpasswd -d returns all users.
> When I try to chown user /home/user I get "invalid user" error - but this
> user exists in the domain.
> After a few restarts to the server or logging with the user the problem is
> solved.
> But I don't have a constant work around that works smoothly.

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

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.

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