getent doesn't work properly

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Oct 24 14:06:00 GMT 2019


On Oct 23 13:33, Maayan Apelboim wrote:
> 
> 
> Since I can't reproduce this problem, would you mind trying to run getent under strace?  It would be helpful to get 2 strace outputs for the same account, one working, one failing.  Call it like this:
> 
>   $ strace -o getent-1.trace getent passwd <account>
> 
> 
> Thanks,
> Corinna
> 
> --
> Corinna Vinschen
> Cygwin Maintainer
> 
> 
> ---------------
> 
> Attached.

Thanks.  What happens is that in the non-working scenario the user
name is refused by Cygwin because it's apparently not in the primary
domain of the machine.  I.e., if the machine's primary domain is
"dom0", and "user1" is in "dom1", then the account has to be called
"dom1+user1".  The name only is forbidden in this case.

However, this doesn't explain why this happens at all since apparently
"user1" is in the primary domain of the machine, and why it only fails
intermittendly.  In both cases, working and non-working, the domain is
returned by the same Windows call LookupAccountNameW.

What's really strange is that in the working case a lot of network
related Windows DLLs are loaded into the process, e.g. wshqos.dll,
WSHTCPIP.DLL, wship6.dll etc., while this does not happen in the
non-working case.  None of these DLLs is requested by Cygwin, so this is
something occuring in the native Windows background.  This is a bit
suspicious and may point to some interaction with a virus scanner or
something along these lines, and which for some reason doesn't always
work as desired (Avast, anybody?)  Can you check this, perhaps?

Apart from that first question is, is the domain really called "dom"
and is the user account name really "user1"?  I'm asking because
the name may collide with another account name from a builtin or
second domain, and sometimes the wrong user account is returned by the
Windows functions for whatever reason.

Second question is, can I send you the URL to a Cygwin test DLL with
extended debug info in private email?  In this case I'd only need
the non-working trace, preferredly verbatim, and you can return the
trace by private email as well.


Thanks,
Corinna

-- 
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: <http://cygwin.com/pipermail/cygwin/attachments/20191024/b0552473/attachment.sig>


More information about the Cygwin mailing list