Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Sep 2005 11:40:31 -0700
From:      Doug Sampson <dougs@dawnsign.com>
To:        'Dan Nelson' <dnelson@allantgroup.com>
Cc:        "'freebsd-questions@freebsd.org'" <freebsd-questions@freebsd.org>
Subject:   RE: [Samba] getent & winbindd on FreeBSD 5.4
Message-ID:  <EFADFCBA81EEBC4FA93D573B32AFFE270124A4C2@mercury.dawnsign.com>

next in thread | raw e-mail | index | archive | help
> FreeBSD doesn't come with a getent program.  I was able to compile
> OpenSolaris' getent on FreeBSD with minimal problems, though.  You'll
> have to remove support for ipnodes, project, and netmasks since those
> are Solaris-specific, remove the gettext code, and you'll need to
> provide a "putpwent" function (I used
> /usr/src/usr.sbin/pw/pwupd.c:fmtpwentry() instead ).
> 
> http://cvs.opensolaris.org/source/xref/usr/src/cmd/getent/
  
I found the source for getent in
/usr/ports/net/samba3/work/samba-3.0.20/testsuite/nsswitch (see file
listing:)

aries-root@/usr/local/sbin: find / | grep getent
/usr/share/man/man3/tgetent.3.gz
/usr/share/man/man3/cgetent.3.gz
/usr/share/man/man3/kgetent.3.gz
/usr/src/contrib/telnet/libtelnet/getent.c
/usr/ports/net/samba3/work/samba-3.0.20/source/lib/util_getent.c
/usr/ports/net/samba3/work/samba-3.0.20/source/lib/util_getent.o
/usr/ports/net/samba3/work/samba-3.0.20/source/lib/util_getent.po
/usr/ports/net/samba3/work/samba-3.0.20/source/include/util_getent.h
/usr/ports/net/samba3/work/samba-3.0.20/testsuite/nsswitch/getent_pwent.c
/usr/ports/net/samba3/work/samba-3.0.20/testsuite/nsswitch/getent_r.sh
/usr/ports/net/samba3/work/samba-3.0.20/testsuite/nsswitch/getent_grent.c
/usr/ports/net/samba3/work/samba-3.0.20/testsuite/nsswitch/getent.exp
/usr/ports/net/samba3/work/samba-3.0.20/testsuite/nsswitch/getent.c
/usr/compat/linux/usr/bin/getent
/usr/obj/usr/src/lib/libtelnet/getent.o
aries-root@/usr/local/sbin: 

and I ran 'gcc -o getent getent.c' to create the getent command. I then
moved it to /usr/local/sbin and ran 'getent passwd'. The output still
doesn't produce the list of domain users- only the local users. Hm? I am not
sure if I am doing this correctly. I am flying blindly on this as I am
relatively new to *nix in general (huge learning curve). Can you verify that
I'm doing this correctly?

I am starting to wonder if my problem isn't related to getent but elsewhere.
I read on the 'Net that FreeBSD finally provided NSS support starting with
version 5.0. I also wonder if I'm not configuring my PAM modules correctly.
See my earlier mail re: nsswitch.conf and /etc/pam.d/login.

> > How can I verify that linux libraries have been installed? I looked
> > at this:
> > 
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/linu
> xemu-lbc-insta
> > ll.html#LINUXEMU-LIBS-PORT. When I run the 'getent' command, it
> > doesn't complain about missing libraries. When I checked for
> > /compat/linux directory as follows:
> >
> > I noticed that the libnss_winbind.so and the libnss_wins.so 
> aren't in
> > /usr/compat/linux/lib directory. Should I add them manually? If so,
> > from where? Or make a link to appropriate FreeBSD libs?
> 
> You would need to install them manually, from either an existing linux
> system, or by extracting them out of an rpm.
> 
> Are you really sure you need a "getent" command?

Nope.

~Doug



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EFADFCBA81EEBC4FA93D573B32AFFE270124A4C2>