getent doesn't show all domain users

Corinna Vinschen
Mon Jun 3 11:14:00 GMT 2019

On May 27 09:59, Brian Inglis wrote:
> 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 resolver.

Pointing to the user's guide which actually explains why this happens:

The user's guide!  Probably the most unread document of all times... ;)


Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <>

More information about the Cygwin mailing list