2009/5/22 François Mehault <Francois.Mehault@netplus.fr>

I read that I have to modify passwd.c in /usr/src/usr.bin/passwd but I can’t find this path, I just have /usr/src/sys


This sounds very much off topic and freebsd specific. But /usr/src/sys is the kernel source,  /usr/src/usr.bin is the source for the userland applications in /usr/bin. The userland sources need to be installed explicitly (are not installed by default) to modify userland tools.

http://www.freebsd.org/doc/en/books/handbook/makeworld.html

But I would suggest looking for existing native authentication such as net/nss_ldap and security/pam_ldap which allow use of ldap for storage. The nss_ldap at might provide nss capability usable the standard userland commands with an ldap backend.

Cheers
Brett