LDAP Debian setup

Installed:
slapd
ldap-utils
migrationtools
libnss-ldap
jxplorer

After slapd was installed run
dpkg-reconfigure slapd

Check whether is LDAP working with
ldapsearch -x -b dc=psylogical,dc=org

Fill up database with local data
edit
vim /etc/migrationtools/migrate_common.ph
uncoment here:
IGNORE_UID_BELOW
IGNORE_GID_BELOW
update here:
DEFAULT_MAIL_DOMAIN
DEFAULT_BASE

afterwords run script
cd /usr/share/migrationtools
LDAPADD="/usr/bin/ldapadd -c" ETC_ALIASES=/dev/null ./migrate_all_online.sh

update nsswitch
/etc/nsswitch.conf
add in front there ldap except hosts where LDAP is last