User Tools

Site Tools


lucid1004:smb:openldap

This is an old revision of the document!


Устанавим сервер OpenLDAP и дополнительные пакеты для начала работы

apt-get update
apt-get install slapd ldap-utils samba-doc

Конвертируем схему samba.schema в формат ldif понятный серверу OpenLDAP

zcat /usr/share/doc/samba-doc/examples/LDAP/samba.schema.gz > /etc/ldap/schema/samba.schema

cat <<EOFLIST > /tmp/schema_convert.conf
include         /etc/ldap/schema/core.schema
include         /etc/ldap/schema/cosine.schema
include         /etc/ldap/schema/inetorgperson.schema
include         /etc/ldap/schema/samba.schema
EOFLIST

rm -rf /tmp/ldif_output
mkdir /tmp/ldif_output
slaptest -f schema_convert.conf -F /tmp/ldif_output
find /tmp/ldif_output -type f -name '*samba.ldif' -exec cp {} /etc/ldap/schema/samba.ldif \;
echo -e '1c\ndn: cn=samba,cn=schema,cn=config\n.\n3c\ncn: samba\n.\n$n\n-6,$d\nwq' | ed /etc/ldap/schema/samba.ldif
lucid1004/smb/openldap.1280776584.txt.gz · Last modified: (external edit)