⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 slapdconf2.sdf

📁 OpenLdap是LDAP的开源项目
💻 SDF
📖 第 1 页 / 共 4 页
字号:
# $OpenLDAP: pkg/openldap-guide/admin/slapdconf2.sdf,v 1.1.2.14 2007/04/06 03:59:58 quanah Exp $# Copyright 2005-2007 The OpenLDAP Foundation, All Rights Reserved.# COPYING RESTRICTIONS APPLY, see COPYRIGHT.H1: Configuring slapdOnce the software has been built and installed, you are readyto configure {{slapd}}(8) for use at your site. Unlike previousOpenLDAP releases, the slapd runtime configuration in 2.3 isfully LDAP-enabled and can be managed using the standard LDAPoperations with data in {{TERM:LDIF}}. The LDAP configuration engineallows all of slapd's configuration options to be changed on the fly,generally without requiring a server restart for the changesto take effect. The old style {{slapd.conf}}(5) file is stillsupported, but must be converted to the new {{slapd.d}}(5) formatto allow runtime changes to be saved. While the old styleconfiguration uses a single file, normally installed as{{F:/usr/local/etc/openldap/slapd.conf}}, the new styleuses a slapd backend database to store the configuration. Theconfiguration database normally resides in the{{F:/usr/local/etc/openldap/slapd.d}} directory.An alternate configuration directory (or file) can be specified via acommand-line option to {{slapd}}(8) or {{slurpd}}(8). This chapterdescribes the general format of the configuration system, followed by adetailed description of commonly used config settings.Note: some of the backends and of the distributed overlaysdo not support runtime configuration yet.  In those cases,the old style {{slapd.conf}}(5) file must be used.Note: the current version of {{slurpd}} has not been updated forcompatibility with this new configuration engine. If you must useslurpd for replication at your site, you will have to maintain anold-style {{slapd.conf}} file for slurpd to use.H2: Configuration LayoutThe slapd configuration is stored as a special LDAP directory witha predefined schema and DIT. There are specific objectClasses used tocarry global configuration options, schema definitions, backend anddatabase definitions, and assorted other items. A sample config treeis shown in Figure 5.1.!import "config_dit.gif"; align="center"; title="Sample configuration tree"FT[align="Center"] Figure 5.1: Sample configuration tree.Other objects may be part of the configuration but were omitted fromthe illustration for clarity.The {{slapd.d}} configuration tree has a very specific structure. Theroot of the tree is named {{EX:cn=config}} and contains global configurationsettings. Additional settings are contained in separate child entries:* Include files.. Usually these are just pathnames left over from a converted{{EX:slapd.conf}} file... Otherwise use of Include files is deprecated.* Dynamically loaded modules.. These may only be used if the {{EX:--enable-modules}} option wasused to configure the software.* Schema definitions.. The {{EX:cn=schema,cn=config}} entry contains the system schema (allthe schema that is hard-coded in slapd)... Child entries of {{EX:cn=schema,cn=config}} contain user schema asloaded from config files or added at runtime.* Backend-specific configuration * Database-specific configuration.. Overlays are defined in children of the Database entry... Databases and Overlays may also have other miscellaneous children.The usual rules for LDIF files apply to the configuration information:Comment lines beginning with a '{{EX:#}}' characterare ignored.  If a line begins with a single space, it is considered acontinuation of the previous line (even if the previous line is acomment) and the single leading space is removed. Entries are separated by blank lines.The general layout of the config LDIF is as follows:>	# global configuration settings>	dn: cn=config>	objectClass: olcGlobal>	cn: config>	<global config settings>>>	# schema definitions>	dn: cn=schema,cn=config>	objectClass: olcSchemaConfig>	cn: schema>	<system schema>>>	dn: cn={X}core,cn=schema,cn=config>	objectClass: olcSchemaConfig>	cn: {X}core>	<core schema>>>	# additional user-specified schema>	...>>	# backend definitions>	dn: olcBackend=<typeA>,cn=config>	objectClass: olcBackendConfig>	olcBackend: <typeA>>	<backend-specific settings>>>	# database definitions>	dn: olcDatabase={X}<typeA>,cn=config>	objectClass: olcDatabaseConfig>	olcDatabase: {X}<typeA>>	<database-specific settings>>>	# subsequent definitions and settings>	...Some of the entries listed above have a numeric index {{EX:"{X}"}} intheir names. While most configuration settings have an inherent orderingdependency (i.e., one setting must take effect before a subsequent onemay be set), LDAP databases are inherently unordered. The numeric indexis used to enforce a consistent ordering in the configuration database,so that all ordering dependencies are preserved. In most cases the indexdoes not have to be provided; it will be automatically generated basedon the order in which entries are created.Configuration directives are specified as values of individualattributes.Most of the attributes and objectClasses used in the slapdconfiguration have a prefix of {{EX:"olc"}} (OpenLDAP Configuration)in their names. Generally there is a one-to-one correspondencebetween the attributes and the old-style {{EX:slapd.conf}} configurationkeywords, using the keyword as the attribute name, with the "olc"prefix attached.A configuration directive may take arguments.  If so, the arguments areseparated by white space.  If an argument contains white space,the argument should be enclosed in double quotes {{EX:"like this"}}.In the descriptions that follow, arguments that should be replacedby actual text are shown in brackets {{EX:<>}}.The distribution contains an example configuration file that willbe installed in the {{F: /usr/local/etc/openldap}} directory.A number of files containing schema definitions (attribute typesand object classes) are also provided in the{{F: /usr/local/etc/openldap/schema}} directory.H2: Configuration DirectivesThis section details commonly used configuration directives.  Fora complete list, see the {{slapd.d}}(5) manual page.  This sectionwill treat the configuration directives in a top-down order, startingwith the global directives in the {{EX:cn=config}} entry. Eachdirective will be described along with its default value (if any) andan example of its use.H3: cn=configDirectives contained in this entry generally apply to the server as a whole.Most of them are system or connection oriented, not database related. Thisentry must have the {{EX:olcGlobal}} objectClass.H4: olcIdleTimeout: <integer>Specify the number of seconds to wait before forcibly closingan idle client connection.  A value of 0, the default,disables this feature.H4: olcLogLevel: <level>This directive specifies the level at which debugging statementsand operation statistics should be syslogged (currently logged tothe {{syslogd}}(8) {{EX:LOG_LOCAL4}} facility). You must haveconfigured OpenLDAP {{EX:--enable-debug}} (the default) for thisto work (except for the two statistics levels, which are alwaysenabled). Log levels may be specified as integers or by keyword.Multiple log levels may be used and the levels are additive.To display what levelscorrespond to what kind of debugging, invoke slapd with {{EX:-?}}or consult the table below. The possible values for <level> are:!block table; colaligns="RL"; align=Center; \	title="Table 5.1: Debugging Levels"Level	Keyword	Description-1	Any	enable all debugging0		no debugging1	Trace	trace function calls2	Packets	debug packet handling4	Args	heavy trace debugging8	Conns	connection management16	BER	print out packets sent and received32	Filter	search filter processing64	Config	configuration processing128	ACL	access control list processing256	Stats	stats log connections/operations/results512	Stats2	stats log entries sent1024	Shell	print communication with shell backends2048	Parse	print entry parsing debugging4096	Cache	database cache processing8192	Index	database indexing16384	Sync	syncrepl consumer processing!endblock\Example:E: olcLogLevel: -1This will cause lots and lots of debugging information to belogged.E: olcLogLevel: Conns FilterJust log the connection and search filter processing.\Default:E: olcLogLevel: StatsH4: olcReferral <URI>This directive specifies the referral to pass back when slapdcannot find a local database to handle a request.\Example:>	olcReferral: ldap://root.openldap.orgThis will refer non-local queries to the global root LDAP serverat the OpenLDAP Project. Smart LDAP clients can re-ask theirquery at that server, but note that most of these clients areonly going to know how to handle simple LDAP URLs thatcontain a host part and optionally a distinguished name part.H4: Sample Entry>dn: cn=config>objectClass: olcGlobal>cn: config>olcIdleTimeout: 30>olcLogLevel: Stats>olcReferral: ldap://root.openldap.orgH3: cn=includeAn include entry holds the pathname of one include file. Include filesare part of the old style slapd.conf configuration system and must be inslapd.conf format. Include files were commonly used to load schemaspecifications. While they are still supported, their use is deprecated.Include entries must have the {{EX:olcIncludeFile}} objectClass.H4: olcInclude: <filename>This directive specifies that slapd should read additionalconfiguration information from the given file. Note: You should be careful when using this directive - there isno small limit on the number of nested include directives, and noloop detection is done.H4: Sample Entries>dn: cn=include{0},cn=config>objectClass: olcIncludeFile>cn: include{0}>olcInclude: ./schema/core.schema>>dn: cn=include{1},cn=config>objectClass: olcIncludeFile>cn: include{1}>olcInclude: ./schema/cosine.schemaH3: cn=moduleIf support for dynamically loaded modules was enabled when configuringslapd, {{EX:cn=module}} entries may be used to specify sets of modules to load.Module entries must have the {{EX:olcModuleList}} objectClass.H4: olcModuleLoad: <filename>Specify the name of a dynamically loadable module to load. The filenamemay be an absolute path name or a simple filename. Non-absolute namesare searched for in the directories specified by the {{EX:olcModulePath}}directive.H4: olcModulePath: <pathspec>Specify a list of directories to search for loadable modules. Typically thepath is colon-separated but this depends on the operating system.H4: Sample Entries>dn: cn=module{0},cn=config>objectClass: olcModuleList>cn: module{0}>olcModuleLoad: /usr/local/lib/smbk5pwd.la>>dn: cn=module{1},cn=config>objectClass: olcModuleList>cn: module{1}>olcModulePath: /usr/local/lib:/usr/local/lib/slapd>olcModuleLoad: accesslog.la>olcModuleLoad: pcache.laH3: cn=schemaThe cn=schema entry holds all of the schema definitions that are hard-codedin slapd. As such, the values in this entry are generated by slapd so noschema values need to be provided in the config file. The entry must stillbe defined though, to serve as a base for the user-defined schema to addin underneath. Schema entries must have the {{EX:olcSchemaConfig}}objectClass.H4: olcAttributeTypes: <{{REF:RFC2252}} Attribute Type Description>This directive defines an attribute type.Please see the {{SECT:Schema Specification}} chapterfor information regarding how to use this directive.H4: olcObjectClasses: <{{REF:RFC2252}} Object Class Description>This directive defines an object class.Please see the {{SECT:Schema Specification}} chapter forinformation regarding how to use this directive.H4: Sample Entries>dn: cn=schema,cn=config>objectClass: olcSchemaConfig>cn: schema>>dn: cn=test,cn=schema,cn=config>objectClass: olcSchemaConfig>cn: test>olcAttributeTypes: ( 1.1.1>  NAME 'testAttr'>  EQUALITY integerMatch>  SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 )>olcAttributeTypes: ( 1.1.2 NAME 'testTwo' EQUALITY caseIgnoreMatch>  SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.44 )>olcObjectClasses: ( 1.1.3 NAME 'testObject'>  MAY ( testAttr $ testTwo ) AUXILIARY )H3: Backend-specific DirectivesBackend directives apply to all database instances of thesame type and, depending on the directive, may be overriddenby database directives. Backend entries must have the{{EX:olcBackendConfig}} objectClass.H4: olcBackend: <type>This directive names a backend-specific configuration entry.{{EX:<type>}} should be one of thesupported backend types listed in Table 5.2.!block table; align=Center; coltags="EX,N"; \	title="Table 5.2: Database Backends"Types	Descriptionbdb	Berkeley DB transactional backendconfig	Slapd configuration backenddnssrv	DNS SRV backendhdb	Hierarchical variant of bdb backendldap	Lightweight Directory Access Protocol (Proxy) backendldbm	Lightweight DBM backendldif	Lightweight Data Interchange Format backendmeta	Meta Directory backendmonitor	Monitor backendpasswd	Provides read-only access to {{passwd}}(5)perl	Perl Programmable backend

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -