This is an old revision of the document!
[gate:~] # pkg install openldap-client
root@gate:~# apt install ldap-utils
gate# ldapsearch -x -b"dc=corpX,dc=un" -h server "uid=user1"
gate# ldapsearch -x -D "cn=Administrator,cn=Users,dc=corpX,dc=un" -W -h server -b "dc=corpX,dc=un" "sAMAccountName=user1" gate# LDAPTLS_REQCERT=never ldapsearch -x -D "cn=Administrator,cn=Users,dc=corp6,dc=un" -W -H ldaps://server -b "dc=corp6,dc=un" "sAMAccountName=user1"
[gate:~] # pkg install nss_ldap [gate:~] # cat /usr/local/etc/nss_ldap.conf
root@gate:~# apt install libnss-ldap ... Ответы по умолчанию, все равно все сотрем;) ... root@gate:~# cat /etc/ldap.conf
host server base dc=corpX,dc=un nss_base_passwd ou=users,dc=corpX,dc=un?one nss_base_group ou=groups,dc=corpX,dc=un?one
Настройка Active Directory сервера (Сервис NIS)
host server base dc=corpX,dc=un binddn cn=user1,cn=Users,dc=corpX,dc=un bindpw Pa$$w0rd1 scope sub nss_base_passwd cn=Users,dc=corpX,dc=un?one nss_base_group cn=Users,dc=corpX,dc=un?one nss_map_objectClass posixAccount User nss_map_attribute uid msSFU30Name nss_map_attribute uniqueMember msSFU30PosixMember nss_map_attribute homeDirectory msSFU30HomeDirectory nss_map_objectClass posixGroup Group nss_map_attribute gidNumber msSFU30GidNumber nss_map_attribute uidNumber msSFU30UidNumber nss_map_attribute loginShell msSFU30LoginShell
host server # uri ldaps://server/ # tls_checkpeer no base dc=corpX,dc=un binddn cn=Administrator,cn=Users,dc=corpX,dc=un bindpw Pa$$w0rd scope sub nss_base_passwd cn=Users,dc=corpX,dc=un?one nss_base_group cn=Users,dc=corpX,dc=un?one nss_map_objectClass posixAccount User nss_map_objectClass posixGroup Group nss_map_attribute uid msSFU30Name nss_map_attribute uniqueMember msSFU30PosixMemberOf nss_map_attribute homeDirectory unixHomeDirectory
root@gate:~# cat /etc/nsswitch.conf
... passwd: files ldap group: files ldap #shadow: files ldap # for linux ...
# setenv LDAPTLS_REQCERT never или # pkg install ca_root_nss # setenv LDAPTLS_CACERT /usr/local/etc/ssl/cert.pem
# export LDAPTLS_REQCERT=never