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

📄 slapdconf2.sdf

📁 OpenLdap是LDAP的开源项目
💻 SDF
📖 第 1 页 / 共 4 页
字号:
on how to use this directive.H4: olcUpdateref: <URL>This directive is only applicable in a slave slapd. Itspecifies the URL to return to clients which submit updaterequests upon the replica.If specified multiple times, each {{TERM:URL}} is provided.\Example:>	olcUpdateref:	ldap://master.example.netH4: Sample Entries>dn: olcDatabase=frontend,cn=config>objectClass: olcDatabaseConfig>objectClass: olcFrontendConfig>olcDatabase: frontend>olcReadOnly: FALSE>>dn: olcDatabase=config,cn=config>objectClass: olcDatabaseConfig>olcDatabase: config>olcRootDN: cn=Manager,dc=example,dc=comH3: BDB and HDB Database DirectivesDirectives in this category apply to both the {{TERM:BDB}}and the {{TERM:HDB}} database.They are used in an olcDatabase entry in addition to the genericdatabase directives defined above.  For a complete referenceof BDB/HDB configuration directives, see {{slapd-bdb}}(5). Inaddition to the {{EX:olcDatabaseConfig}} objectClass, BDB and HDBdatabase entries must have the {{EX:olcBdbConfig}} and{{EX:olcHdbConfig}} objectClass, respectively.H4: olcDbDirectory: <directory>This directive specifies the directory where the BDB filescontaining the database and associated indices live.\Default:>	olcDbDirectory: /usr/local/var/openldap-dataH4: olcDbCachesize: <integer>This directive specifies the size in entries of the in-memorycache maintained by the BDB backend database instance.\Default:>	olcDbCachesize: 1000H4: olcDbCheckpoint: <kbyte> <min>This directive specifies how often to checkpoint the BDB transaction log.A checkpoint operation flushes the database buffers to disk and writes acheckpoint record in the log.The checkpoint will occur if either <kbyte> data has been written or<min> minutes have passed since the last checkpont. Both arguments defaultto zero, in which case they are ignored. When the <min> argument isnon-zero, an internal task will run every <min> minutes to perform thecheckpoint. See the Berkeley DB reference guide for more details.\Example:>	olcDbCheckpoint: 1024 10H4: olcDbConfig: <DB_CONFIG setting>This attribute specifies a configuration directive to be placed in the{{EX:DB_CONFIG}} file of the database directory. At server startup time, ifno such file exists yet, the {{EX:DB_CONFIG}} file will be created and thesettings in this attribute will be written to it. If the file exists,its contents will be read and displayed in this attribute. The attributeis multi-valued, to accomodate multiple configuration directives. No defaultis provided, but it is essential to use proper settings here to get thebest server performance.\Example:>	olcDbConfig: set_cachesize 0 10485760 0>	olcDbConfig: set_lg_bsize 2097512>	olcDbConfig: set_lg_dir /var/tmp/bdb-log>	olcDbConfig: set_flags DB_LOG_AUTOREMOVEIn this example, the BDB cache is set to 10MB, the BDB transaction logbuffer size is set to 2MB, and the transaction log files are to be storedin the /var/tmp/bdb-log directory. Also a flag is set to tell BDB todelete transaction log files as soon as their contents have beencheckpointed and they are no longer needed. Without this setting thetransaction log files will continue to accumulate until some othercleanup procedure removes them. See the SleepyCat documentation for the{{EX:db_archive}} command for details.Ideally the BDB cache must beat least as large as the working set of the database, the log buffer sizeshould be large enough to accomodate most transactions without overflowing,and the log directory must be on a separate physical disk from the maindatabase files. And both the database directory and the log directoryshould be separate from disks used for regular system activities such asthe root, boot, or swap filesystems. See the FAQ-o-Matic and the SleepyCatdocumentation for more details.H4: olcDbNosync: { TRUE | FALSE }This option causes on-disk database contents to not be immediatelysynchronized with in memory changes upon change.  Setting this optionto {{EX:TRUE}} may improve performance at the expense of data integrity. Thisdirective has the same effect as using>	olcDbConfig: set_flags DB_TXN_NOSYNCH4: olcDbIDLcacheSize: <integer>Specify the size of the in-memory index cache, in index slots. Thedefault is zero. A larger value will speed up frequent searches ofindexed entries. The optimal size will depend on the data and searchcharacteristics of the database, but using a number three timesthe entry cache size is a good starting point.\Example:>	olcDbIDLcacheSize: 3000H4: olcDbIndex: {<attrlist> | default} [pres,eq,approx,sub,none]This directive specifies the indices to maintain for the givenattribute. If only an {{EX:<attrlist>}} is given, the defaultindices are maintained.\Example:>	olcDbIndex: default pres,eq>	olcDbIndex: uid>	olcDbIndex: cn,sn pres,eq,sub>	olcDbIndex: objectClass eqThe first line sets the default set of indices to maintain topresent and equality.  The second line causes the default (pres,eq)set of indices to be maintained for the {{EX:uid}} attribute type.The third line causes present, equality, and substring indices tobe maintained for {{EX:cn}} and {{EX:sn}} attribute types.  Thefourth line causes an equality index for the {{EX:objectClass}}attribute type.By default, no indices are maintained.  It is generally advisedthat minimally an equality index upon objectClass be maintained.>	olcDbindex: objectClass eqIf this setting is changed while slapd is running, an internal taskwill be run to generate the changed index data. All server operationscan continue as normal while the indexer does its work.  If slapd isstopped before the index task completes, indexing will have to bemanually completed using the slapindex tool.H4: olcDbLinearIndex: { TRUE | FALSE }If this setting is {{EX:TRUE}} slapindex will index one attributeat a time. The default settings is {{EX:FALSE}} in which case allindexed attributes of an entry are processed at the same time. Whenenabled, each indexed attribute is processed individually, usingmultiple passes through the entire database. This option improvesslapindex performance when the database size exceeds the BDB cachesize. When the BDB cache is large enough, this option is not neededand will decrease performance. Also by default, slapadd performsfull indexing and so a separate slapindex run is not needed. Withthis option, slapadd does no indexing and slapindex must be used.H4: olcDbMode: <integer>This directive specifies the file protection mode that newlycreated database index files should have.\Default:>	olcDbMode: 0600H4: olcDbSearchStack: <integer>Specify the depth of the stack used for search filter evaluation.Search filters are evaluated on a stack to accomodate nested {{EX:AND}} /{{EX:OR}} clauses. An individual stack is allocated for each server thread.The depth of the stack determines how complex a filter can be evaluatedwithout requiring any additional memory allocation. Filters that arenested deeper than the search stack depth will cause a separate stack tobe allocated for that particular search operation. These separate allocationscan have a major negative impact on server performance, but specifyingtoo much stack will also consume a great deal of memory. Each searchuses 512K bytes per level on a 32-bit machine, or 1024K bytes per levelon a 64-bit machine. The default stack depth is 16, thus 8MB or 16MBper thread is used on 32 and 64 bit machines, respectively. Also the512KB size of a single stack slot is set by a compile-time constant whichmay be changed if needed; the code must be recompiled for the changeto take effect.\Default:>	olcDbSearchStack: 16H4: olcDbShmKey: <integer>Specify a key for a shared memory BDB environment. By default the BDBenvironment uses memory mapped files. If a non-zero value is specified,it will be used as the key to identify a shared memory region that willhouse the environment.\Example:>	olcDbShmKey: 42H4: Sample Entry>dn: olcDatabase=hdb,cn=config>objectClass: olcDatabaseConfig>objectClass: olcHdbConfig>olcDatabase: hdb>olcSuffix: "dc=example,dc=com">olcDbDirectory: /usr/local/var/openldap-data>olcDbCacheSize: 1000>olcDbCheckpoint: 1024 10>olcDbConfig: set_cachesize 0 10485760 0>olcDbConfig: set_lg_bsize 2097152>olcDbConfig: set_lg_dir /var/tmp/bdb-log>olcDbConfig: set_flags DB_LOG_AUTOREMOVE>olcDbIDLcacheSize: 3000>olcDbIndex: objectClass eqH2: Access ControlAccess to slapd entries and attributes is controlled by theolcAccess attribute, whose values are a sequence of access directives.The general form of the olcAccess configuration is:>	olcAccess: <access directive>>	<access directive> ::= to <what>>		[by <who> <access> <control>]+>	<what> ::= * |>		[dn[.<basic-style>]=<regex> | dn.<scope-style>=<DN>]>		[filter=<ldapfilter>] [attrs=<attrlist>]>	<basic-style> ::= regex | exact>	<scope-style> ::= base | one | subtree | children>	<attrlist> ::= <attr> [val[.<basic-style>]=<regex>] | <attr> , <attrlist>>	<attr> ::= <attrname> | entry | children>	<who> ::= * | [anonymous | users | self>			| dn[.<basic-style>]=<regex> | dn.<scope-style>=<DN>] >		[dnattr=<attrname>]>		[group[/<objectclass>[/<attrname>][.<basic-style>]]=<regex>]>		[peername[.<basic-style>]=<regex>]>		[sockname[.<basic-style>]=<regex>]>		[domain[.<basic-style>]=<regex>]>		[sockurl[.<basic-style>]=<regex>]>		[set=<setspec>]>		[aci=<attrname>]>	<access> ::= [self]{<level>|<priv>}>	<level> ::= none | auth | compare | search | read | write>	<priv> ::= {=|+|-}{w|r|s|c|x|0}+>	<control> ::= [stop | continue | break]where the <what> part selects the entries and/or attributes to whichthe access applies, the {{EX:<who>}} part specifies which entitiesare granted access, and the {{EX:<access>}} part specifies theaccess granted. Multiple {{EX:<who> <access> <control>}} tripletsare supported, allowing many entities to be granted different accessto the same set of entries and attributes. Not all of these accesscontrol options are described here; for more details see the{{slapd.access}}(5) man page.H3: What to control access toThe <what> part of an access specification determines the entriesand attributes to which the access control applies.  Entries arecommonly selected in two ways: by DN and by filter.  The followingqualifiers select entries by DN:>	to *>	to dn[.<basic-style>]=<regex>>	to dn.<scope-style>=<DN>The first form is used to select all entries.  The second form maybe used to select entries by matching a regular expression againstthe target entry's {{normalized DN}}.   (The second form is notdiscussed further in this document.)  The third form is used toselect entries which are within the requested scope of DN.  The<DN> is a string representation of the Distinguished Name, asdescribed in {{REF:RFC2253}}.The scope can be either {{EX:base}}, {{EX:one}}, {{EX:subtree}},or {{EX:children}}.  Where {{EX:base}} matches only the entry withprovided DN, {{EX:one}} matches the entries whose parent is theprovided DN, {{EX:subtree}} matches all entries in the subtree whoseroot is the provided DN, and {{EX:children}} matches all entriesunder the DN (but not the entry named by the DN).For example, if the directory contained entries named:>	0: o=suffix>	1: cn=Manager,o=suffix>	2: ou=people,o=suffix>	3: uid=kdz,ou=people,o=suffix>	4: cn=addresses,uid=kdz,ou=people,o=suffix>	5: uid=hyc,ou=people,o=suffix\Then:. {{EX:dn.base="ou=people,o=suffix"}} match 2;. {{EX:dn.one="ou=people,o=suffix"}} match 3, and 5;. {{EX:dn.subtree="ou=people,o=suffix"}} match 2, 3, 4, and 5; and. {{EX:dn.children="ou=people,o=suffix"}} match 3, 4, and 5.Entries may also be selected using a filter:>	to filter=<ldap filter>where <ldap filter> is a string representation of an LDAPsearch filter, as described in {{REF:RFC2254}}.  For example:>	to filter=(objectClass=person)Note that entries may be selected by both DN and filter byincluding both qualifiers in the <what> clause.>	to dn.one="ou=people,o=suffix" filter=(objectClass=person)Attributes within an entry are selected by including a comma-separatedlist of attribute names in the <what> selector:>	attrs=<attribute list>A specific value of an attribute is selected by using a singleattribute name and also using a value selector:>	attrs=<attribute> val[.<style>]=<regex>There are two special {{pseudo}} attributes {{EX:entry}} and{{EX:children}}.  To read (and hence return) a target entry, thesubject must have {{EX:read}} access to the target's {{entry}}attribute.  To add or delete an entry, the subject must have{{EX:write}} access to the entry's {{EX:entry}} attribute AND musthave {{EX:write}} access to the entry's parent's {{EX:children}}attribute.  To rename an entry, the subject must have {{EX:write}}access to entry's {{EX:entry}} attribute AND have {{EX:write}}access to both the old parent's and new parent's {{EX:children}}attributes.  The complete examples at the end of this section shouldhelp clear things up.Lastly, there is a special entry selector {{EX:"*"}} that is used toselect any entry.  It is used when no other {{EX:<what>}}selector has been provided.  It's equivalent to "{{EX:dn=.*}}"H3: Who to grant access toThe <who> part identifies the entity or entities being grantedaccess. Note that access is granted to "entities" not "entries."The following table summarizes entity specifiers:!block table; align=Center; coltags="EX,N"; \	title="Table 5.3: Access Entity Specifiers"Specifier|Entities*|All, including anonymous and authenticated usersanonymous|Anonymous (non-authenticated) usersusers|Authenticated usersself|User associated with target entrydn[.<basic-style>]=<regex>|Users matching a regular expressiondn.<scope-style>=<DN>|Users within scope of a DN!endblock

⌨️ 快捷键说明

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