[Samba] getent & winbindd on FreeBSD 5.4
dougs at dawnsign.com
Fri Sep 16 11:40:32 PDT 2005
> 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 ).
I found the source for getent in
/usr/ports/net/samba3/work/samba-3.0.20/testsuite/nsswitch (see file
aries-root@/usr/local/sbin: find / | grep getent
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:
> > 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?
More information about the freebsd-questions