NAME¶
ldap-schema-manager - manage schema to be inserted into in openldap server in
cn=config mode
SYNOPSIS¶
ldap-schema-manager [-y] [-n] [-c] [-o options] [path] [-h|-l|-i schema1
schema2|-m schema1 schema2|-e schema1 schema2]
DESCRIPTION¶
This program will list, insert, empty or modify the ldap schemas into an
openldap server in cn=config mode. If a schema is not listed as a path, it
will be searched for in the provided path, or in /etc/ldap/schema/ if no path
has been provided. To insert schemas from working directory prepend them with
"./". Schema with no extension is assumed to be .ldif. Specify
.schema if you want the tool to autoconvert the schema to ldif file. See the
examples for more information
Options¶
- -i
- This option insert the given list of schemas
- -m
- This option insert the given list of schemas, replacing already inserted
versions of those schemas
- -e
- This option empty the given list of schemas, removing attributes and
objectClasses from those. This is useful because you cannot delete a
schema without restarting slapd.
- -l
- This option list inserted schemas
- -n
- This option will make generated ldifs file to not be deleted after
execution. Might be useful to understand errors.
- -c
- This option make the program continue even if an error occur
- -y
- This option answer yes to all questions. The only question right now is
the confirmation one when you ask to empty a schema.
- -o
- This option allow you to specify specifics options to give to ldap
commands such as ldapmodify, but beware that you will not be able to see
things like password prompts as the output of these commands is
piped.
Special options¶
- --tool-name
- This option allows you to set the binary name to use in usage output, only
useful if you wish to create a tool based upon ldap-schema-manager.
- --default-path
- This option defines the default path, which is otherwise
/etc/ldap/schema/
- --default-schemas
- This option specifies the default list of schemas to use in case no schema
list is given. Only useful if you create a tool based upon this one. The
list needs to end with "--end".
EXAMPLES¶
admin@ldapserver$ ldap-schema-manager -i /etc/ldap/otherschema/myschema.ldif
Insert the schema /etc/ldap/otherschema/myschema.ldif
admin@ldapserver$ ldap-schema-manager -i /etc/ldap/otherschema/myschema.schema
Convert /etc/ldap/otherschema/myschema.schema to ldif and insert it
admin@ldapserver$ ldap-schema-manager -i myschema
Insert the schema myschema.ldif from default directory (/etc/ldap/schema/)
admin@ldapserver$ ldap-schema-manager -i myschema.schema
Insert the schema myschema.schema from default directory (/etc/ldap/schema/)
admin@ldapserver$ ldap-schema-manager -m /etc/ldap/otherschema/myschema.schema
Convert /etc/ldap/otherschema/myschema.schema to ldif and replace the existing schema by this one
admin@ldapserver$ ldap-schema-manager -e myschema
Empty the schema myschema
admin@ldapserver$ ldap-schema-manager -o "-H ldap://my.ldap.com -ZZ -D 'cn=admin,cn=config' -w password -x" -l
Connect to another ldap server and list schemas
LICENCE AND COPYRIGHT¶
This code is part of FusionDirectory <http://www.fusiondirectory.org>
- Copyright (C) 2011-2017 FusionDirectory Project
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.