HP-UX Reference (11i v2 07/12) - 1 User Commands A-M (vol 1)
l
ldapschema(1) ldapschema(1)
If port is not specified, the default port number is 389 for regular connections, or 636 for
SSL connections.
Options specified on the command line override the environmental variables. For example, if
-j
/tmp/secret.txt
is specified on the command line, and LDAP_BINDCRED
environmental variable is
set, the password of the LDAP directory server administrator is obtained from file name
/tmp/secret.txt
.
SCHEMA DEFINITION FILE
The
ldapschema utility queries and extends the LDAP directory server based on the XML schema
definition file. The schema argument used with the
-q or -e option must correspond to the XML file con-
taining the appropriate schema definition.
Each schema definition file must adhere to Document Type Definition (DTD) template specified in the
/etc/opt/ldapux/schema/schema.dtd
file. So every XML file used by
ldapschema must
include
/etc/opt/ldapux/schema/schema.dtd
as its DTD. See line 2 in the example below.
WARNING: Every XML file used with the
ldapschema utility must include
/etc/opt/ldapux/schema/schema.dtd
file as its DTD template. Do not modify this file, or
create your own DTD template file. File
/etc/opt/ldapux/schema/schema.dtd
is created
to validate attribute type and object class definitions before they can be added to the LDAP directory
server schema. Altering this file will cause
ldapschema to fail.
The schema definition, enclosed by the <schemaDefinition>
tags, specifies the schema name, schema
description and schema source, followed by any number of attribute type and object class definitions.
There are no restrictions on the schema name, description and source XML tag. See lines 6-8 in the exam-
ple below. These tags are optional. Schema source is used to specify the
X-ORIGIN field of extended
attribute types and object classes, if used.
After general schema information is specified, attribute types, if any, must be specified followed by any
object class definitions. The example below defines two attribute types, printer-name (lines 10-19) and
printer-aliases (lines 21-29), followed by one object class printerLPR (lines 31-38) as specified in RFC 3712.
Line 1: <?xml version="1.0" encoding="UTF-8"?>
Line 2: <!DOCTYPE schemaDefinition SYSTEM "/etc/opt/ldapux/schema/schema.dtd">
Line 3:
Line 4: <schemaDefinition>
Line 5:
Line 6: <schemaName>rfc3712</schemaName>
Line 7: <schemaDescription>Printer Services Schema</schemaDescription>
Line 8: <schemaSource>RFC 3712</schemaSource>
Line 9:
Line 10: <attributeTypeDefinition>
Line 11: <oid>1.3.18.0.2.4.1135</oid>
Line 12: <name>printer-name</name>
Line 13: <desc>A site-specific administrative name of this printer</desc>
Line 14: <equality>caseIgnoreMatch</equality>
Line 15: <substr>caseIgnoreSubstringsMatch</substr>
Line 16: <syntax>1.3.6.1.4.1.1466.115.121.1.15</syntax>
Line 17: <length>127</length>
Line 18: <singleValued/>
Line 19: </attributeTypeDefinition>
Line 20:
Line 21: <attributeTypeDefinition>
Line 22: <oid>1.3.18.0.2.4.1108</oid>
Line 23: <name>printer-aliases</name>
Line 24: <desc>Names in addition to the printer-name value</desc>
Line 25: <equality>caseIgnoreMatch</equality>
Line 26: <substr>caseIgnoreSubstringsMatch</substr>
Line 27: <syntax>1.3.6.1.4.1.1466.115.121.1.15</syntax>
Line 28: <length>127</length>
Line 29: </attributeTypeDefinition>
Line 30:
Line 31: <objectClassDefinition>
Line 32: <oid>1.3.18.0.2.6.253</oid>
548 Hewlett-Packard Company − 4 − HP-UX 11i Version 2: December 2007 Update