Bug 565 - winbindd(8) man page missing crucial info for hostnames
Summary: winbindd(8) man page missing crucial info for hostnames
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: winbind (show other bugs)
Version: 3.0.0
Hardware: Other other
: P3 normal
Target Milestone: none
Assignee: Tim Potter
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-04 23:53 UTC by Cory Dodt
Modified: 2005-08-24 10:20 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cory Dodt 2003-10-04 23:53:45 UTC
man 8 winbindd produces the following snippets:

       The  following  nsswitch  databases are implemented by the
       winbindd service:

       hosts  User  information  traditionally  stored   in   the
              hosts(5)  file  and  used by gethostbyname(3) func-
              tions. Names are resolved through the  WINS  server
              or by broadcast.
       . . .
       The  following  simple   configuration   in   the/etc/nss-
       witch.conf file can be used to initially resolve hostnames
       from /etc/hosts and then from the WINS server.

       OPTIONS       

!!!

As you can see, the text promising an example nsswitch.conf for hostname
resolution gives no actual example.  To make matters worse, just above that
paragraph is an actual example talking about users and groups gives the
misleading example, "passwd: winbind ..."

"winbind" is the wrong setting for hosts, it should be "wins", but this crucial
information is missing from the manpages.  And it's all but missing from Google
as well, I finally found what I needed by accident, here:

http://groups.google.com/groups?q=samba+3+winbindd+nsswitch.conf+hosts:&hl=en&lr=&ie=UTF-8&oe=utf-8&selm=9fof7a%241sie%241%40FreeBSD.csie.NCTU.edu.tw&rnum=5

I noticed that it had hosts: wins.  I tried this, and it worked.  "wins" needs
to be documented in winbindd(8).
Comment 1 Tim Potter 2003-10-06 04:08:18 UTC
Reassigning to me.
Comment 2 Gerald (Jerry) Carter (dead mail address) 2004-03-04 08:27:38 UTC
Tim,

I don;t think that libnss_wins.so uses winbind and 
libnss_winbind.so doesn't implement the gethostbyname
hook.

# grep _nss_win nsswitch/winbind_nss_linux.c
_nss_winbind_setpwent(void)
_nss_winbind_endpwent(void)
_nss_winbind_getpwent_r(struct passwd *result, char *buffer,
_nss_winbind_getpwuid_r(uid_t uid, struct passwd *result, char *buffer,
_nss_winbind_getpwnam_r(const char *name, struct passwd *result, char *buffer,
_nss_winbind_setgrent(void)
_nss_winbind_endgrent(void)
_nss_winbind_getgrent_r(struct group *result,
_nss_winbind_getgrlst_r(struct group *result,
_nss_winbind_getgrnam_r(const char *name,
_nss_winbind_getgrgid_r(gid_t gid,
_nss_winbind_initgroups_dyn(char *user, gid_t group, long int *start,
_nss_winbind_getusersids(const char *user_sid, char **group_sids,
_nss_winbind_nametosid(const char *name, char **sid, char *buffer,
_nss_winbind_sidtoname(const char *sid, char **name, char *buffer,
_nss_winbind_sidtouid(const char *sid, uid_t *uid, int *errnop)
_nss_winbind_sidtogid(const char *sid, gid_t *gid, int *errnop)
_nss_winbind_uidtosid(uid_t uid, char **sid, char *buffer,
_nss_winbind_gidtosid(gid_t gid, char **sid, char *buffer,

why do we have wins lookup support in winbindd and not in any 
of the NSS client libs?
Comment 3 Tim Potter 2004-03-04 15:41:44 UTC
It looks like it's only implemented in the IRIX version.  See winbind_nss_irix.c
Comment 4 Gerald (Jerry) Carter (dead mail address) 2004-03-05 10:09:15 UTC
ok.  Updated winbindd(8)
Comment 5 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:20:50 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.