Thanks for your reply. The bugzilla reference you have provided thats related to user does not exist in LDAP Store. But mine is littel bit different. I could find the user is present in Active Directory and also using strace I found getpwnam_r reads the user attributes and also confirmed using wireshark when LDAP server responded back with required attributes for that user to getpwnam_r ldap search request. But getpwnam_r returns NULL and error was set to 0.
So it would be great help if I get to known what all being checked by getpwnam_r after receiving data and when does it return NULL and error 0.
By the way I am using glibc-2.30 . I wrote a small test program using getpwnam_r there also I find the same behaviour.