Winbind and Gecos field ...

C.Lee Taylor leet at leenx.co.za
Fri Oct 10 13:24:44 GMT 2003


Greetings ...

    I dought this is a big thing, seeing that not much I know of really 
use the gecos field, but I thought I would take a look at it.


    When I do getent passwd, I get 
install:x:10153:10000::/home/users/install:/bin/bash, now the gecos 
field is empty, so after tring to read through the source, thinking ( 
hoping ) this might be a small thing to fix, I came across a few 
question, which I will ask ...

    Line 149 and 252 of winbindd_ads.c has
        gecos = ads_pull_string(ads, mem_ctx, msg, "name");

    Which would let me believe that the LDAP field name would be getting 
put into gecos field, so I check my Win2K3 system, and find that field 
name is the same as sAMAccountType, but, it filled.  Which got me 
searching further, if this is were gecos gets set, then I think it 
should be field displayName, as it is in the LDAP backend, unless I am 
mising something ...

    Now, if that is the bug, then line 446 needs to changed too ...

    info->full_name = ads_pull_string(ads, mem_ctx, msg, "name");

But this still leaves me with an empty gecos field, so I continued to 
search, which lead me to winbindd_rpc.c and more questions, how will I 
know if winbind is using rpc or ads? ... Does this depond on how you 
joined the domain, or how well the DC communicates?
    So, I still have not found out why my gecos fields is not getting 
filled in ... if any body has a hint in which direction I should be 
look, please let me know.

Thanks
Mailed
Lee





More information about the samba-technical mailing list