[Samba] getent/wbinfo and gecos field weird behaviour
TarodBOFH
bofh at juanylaura.es
Mon Jan 2 08:31:24 MST 2012
Hello there,
I'm having a weird behaviour with getent (and by extension winbind using
wbinfo) when querying for specific user info.
I'm running Samba 3.5.4 in Centos 5.7 (3.5.4-0.83.el5_7.2) with default
options, and securty = ads
Everything works fine, but now I'm working on some autoemails with reports
and I want to get rid of the user names, using user's first / last names
from Gecos field in the emails.
srv names, (D)OMAIN name, (PATH)S and (usr)user names/uids have been
ommited for clarity:
[root at xxx:~]$ getent passwd D+usr
D+usr:*:nnn:mmm::/path/D/usr:/sbin/nologin
[root at xxx:~]$ getent passwd | grep D+usr
D+usr:*:nnn:mmm:User Name:/path/D/usr:/sbin/nologin
getent seems to use some kind of cache or hack to avoid querying geco field
from AD when using Winbind / samba if you run getent with user param.
However, if you query for full DB and then grep the user, the geco field is
there.
nscd is stopped:
[root at xxx:~]$ service nscd status
nscd is stopped
Winbind has a 10 seconds cache, however, winbind without caching has been
tested (-n switch at /etc/sysconfig/samba) and a 0 seconds cache (to force
resync every query) has also been tested.
nscd has been tested also, with permanent = no and enable-cache = no (and
yes, everything has been tested <sob>), with same results.
Occassionaly, and only for a certain ammount of time, wbinfo returns full
gecos field info, but most of the time it does not return gecos field.
I've been searching for similar problems over the internet (which leaded to
some nscd clues and some wb cache settings) but none worked.
There is no error trace in /var/log/messages or other logs.
Any ideas?
Thank any one in advance,
Tarod
More information about the samba
mailing list