< Previous | Contents | Next >
3. Add objects 2.2.1. Samba schema
In order for OpenLDAP to be used as a backend for Samba, logically, the DIT will need to use attributes that can properly describe Samba data. Such attributes can be obtained by introducing a Samba LDAP schema.
Let's do this now.
For more information on schemas and their installation see Section 1.4, “Modifying the slapd Configuration Database” [p. 120].
1. The schema is found in the now-installed samba package and is already in the ldif format. We can import it with one simple command:
zcat /usr/share/doc/samba/examples/LDAP/samba.ldif.gz | sudo ldapadd -Q -Y EXTERNAL -H ldapi:///
2. To query and view this new schema:
sudo ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// -b cn=schema,cn=config 'cn=*samba*'