Bug 1974 - getpwnam(username) returns NULL-string gecos for some users
Summary: getpwnam(username) returns NULL-string gecos for some users
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: winbind (show other bugs)
Version: 3.0.20
Hardware: All Linux
: P3 normal
Target Milestone: none
Assignee: Gerald (Jerry) Carter (dead mail address)
QA Contact: Samba QA Contact
Depends on:
Reported: 2004-10-26 15:15 UTC by Pasi Sjöholm
Modified: 2005-08-15 05:55 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Pasi Sjöholm 2004-10-26 15:15:45 UTC
I'm using Samba 3.0.7, winbindd and Windows 2000 AD to authenticate users.
I also have a software which is using getpwnam-function to get userinfo.

For some reason winbind doesn't return correct gecos-information for all users
when using getpwnam(username), I'm only getting a null-string. 

In the other hand getpwent() works correctly and every account has it's
gecos-information when printing the whole userbase in a while loop.

I also have a old installation with 2.2.12 and NT4 PDC and there
getpwnam(username) is working ok.
Comment 1 Pasi Sjöholm 2004-10-26 15:43:20 UTC
I forgot to mention that I use domain-security not ads.
With ads, getpwent didn't return all the users, so it also has some sort of a
bug. =)

Comment 2 Pasi Sjöholm 2004-10-26 16:25:49 UTC
Found a similar bug report and it seems that only getpwent was fixed.

I think this is actually a caching issue.
Can you remove the netsamlogon_cache.tdb and
retry this?  I just tried it on a Samba PDC running
winbindd and it worked as expected.

Removing netsamlogon_cache.tdb also "resolves" temporarily this problem until
the cache gets "corrupted" again.
Comment 3 Gerald (Jerry) Carter (dead mail address) 2005-02-17 09:31:26 UTC
This should be fixed in 3.0.9 I think.  But please ret3est 
against 3.0.11.
Comment 4 Pasi Sjöholm 2005-02-20 16:42:35 UTC
It's not fixed in 3.0.9 but 3.0.11 did work okey. =)
So this one is closed and resolved, thanks.
Comment 5 Pasi Sjöholm 2005-08-10 13:46:42 UTC
Upgraded to 3.0.20rc2 because the "Interoperability problems with Win2003-SP1 & 
Win2000-SP4.SR1"-bug and noticed that this bug is back again and once againg
deleting netsamlogon_cache.tdb helps.
Comment 6 Gerald (Jerry) Carter (dead mail address) 2005-08-15 05:55:14 UTC
We are going yo remove the netsamlogon_cache file for 3.0.21.