From owner-freebsd-questions@FreeBSD.ORG Fri Sep 16 18:40:32 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7164816A41F for ; Fri, 16 Sep 2005 18:40:32 +0000 (GMT) (envelope-from dougs@dawnsign.com) Received: from mercury.dawnsign.com (216-70-236-236.cust.telepacific.net [216.70.236.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3079243D45 for ; Fri, 16 Sep 2005 18:40:32 +0000 (GMT) (envelope-from dougs@dawnsign.com) Received: by mercury.dawnsign.com with Internet Mail Service (5.5.2657.72) id ; Fri, 16 Sep 2005 11:40:32 -0700 Message-ID: From: Doug Sampson To: 'Dan Nelson' Date: Fri, 16 Sep 2005 11:40:31 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain; charset="iso-8859-1" Cc: "'freebsd-questions@freebsd.org'" Subject: RE: [Samba] getent & winbindd on FreeBSD 5.4 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2005 18:40:32 -0000 > 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