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

📄 ldapsearchprefs.conf.5

📁 开放源码的ldap系统
💻 5
字号:
.TH LDAPSEARCHPREFS.CONF 5 "20 August 2000" "OpenLDAP LDVERSION".\" $OpenLDAP: pkg/ldap/doc/man/man5/ldapsearchprefs.conf.5,v 1.2.12.2 2000/08/20 21:14:30 kurt Exp $.\" Copyright 1998-2000 The OpenLDAP Foundation All Rights Reserved..\" Copying restrictions apply.  See COPYRIGHT/LICENSE..SH NAMEldapsearchprefs.conf \- configuration file for LDAP search preference routines.SH SYNOPSISETCDIR/ldapsearchprefs.conf.SH DESCRIPTION.LPThe file ETCDIR/ldapsearchprefs.conf contains information used bythe LDAP search preference routines (see ldap-searchpref(3)).  Blank linesand lines that have a first character of `#' are treated as comments andignored.  Non-comment lines contain one or more tokens.  Tokens areseparated by white space, and double quotes `"' can be used to includewhite space inside a token..LPSearch preferences are typically used by LDAP-based client programs tospecify what a user may search for, which attributes are searched, andwhich options are available to the user..LPThe first non-commment line specifies the version of the templateinformation and must contain the token.I Versionfollowed by an integer version number.  E.g.,.nf.ft B    Version 1.ft.fiThe current version is.I 1,so the above example is always the correct opening line..LPThe remainder of the file consists of one or more search preferenceconfigurations.The first line of a search preference is a human-readable name for thetype of object being searched for, e.g. "People" or "Organizations".This name is stored in the.I so_objtypepromptmember of the.I ldap_searchobjstructure.E.g.,.nf.ft B    "People".ft.fispecifies a label for a search preference designed to find X.500 entries for People..LPThe next line specifies a list of options for this search object.  Theonly option currently allowed is "internal" which means that this searchobject should not be presented directly to a user.  Options are placed in the.I so_optionsmember of the.I ldap_searchobjstructure and can be tested using the LDAP_IS_SEARCHOBJ_OPTION_SET() macro.Use "" if no special options are desired..LPThe next line specifes a labelto use for "Fewer Choices" (for lack of a better term) searches.  "FewerChoices" searches are those where the user's input is fed to theldap_filter routines to determine an appropriate filter to use.  Thiscontrasts with explicitly-constructed LDAP filters, or "More Choices"searches, where the user can explicitly construct an LDAP filter.  The"Fewer" and "More Choices" terms derive from the maX.500, waX.500 andxax500 directory user agents, which offer two configurations of their"Find Entry" dialogs - one where the user types a search string, and theclient code attempts to find reasonable filter(s) to use in searching("Fewer Choices"), and one where the user can select from several pop-upmenus which allow complete specification of the search to be performed("More Choices")..LPFor example:.nf.ft B    "Search For:".ft.fican be used by LDAP client programs to label the field into which theuser can type a "Fewer Choices" search.  This information is stored inthe.I so_promptmember of the.I ldap_searchobjstructure..LPThe next line specifies an LDAP filter prefix to append to all "More Choices"searched.  This is typically used to limit the types of entries returnedto those containing a specific object class.  For example:.nf.ft B    "(&(objectClass=person)".ft.fiwould cause only entries containing the object class "person" to bereturned by a search.  Note that parentheses may be unbalanced here, sincethis is a filter prefix, not an entire filter.  This information isstored in the.I so_filterprefixmember of the .I ldap_searchobjstructure..LPThe next line is an LDAP filter tag (see ldap-filter(3)) which specifiesthe set of LDAP filters to be applied for "Fewer Choices" searching.The line.nf.ft B    "xax500-People".ft.fiwould tell the client program to use the set of LDAP filters from theldap filter configuration file tagged "xax500-People".  This information isstored in the.I so_filtertagmember of the.I ldap_searchobjstructure..LPThe next line specifies an LDAP attribute to retrieve to help the userchoose when several entries match the search terms specified.  For example:.nf.ft B    "title".ft.fispecifies that if more than one entry matches the search criteria, theclient program should retrieve the "title" attribute that and presentthat to the user to allow them to select the appropriate entry.The next line specifies a label for the above attribute, e.g..nf.ft B    "Title:".ft.fiThe above information is stored in the.I so_defaultselectattrand.I so_defaultselecttextmembers of the.I ldap_searchobjstructure.  Note that these are defaults, and are intended to be overriddenby the sa_selectattr and sa_selecttext fields of the ldap_searchattrdata structure (see below)..LPThe next line specifies the scope of the LDAP search to be performed.Acceptable values are subtree, onelevel, and base.  See ldap(3) formore information..LPThe next section is a list of "More Choices" search options, terminated bya line containing only the string "END".  Example:.nf.ft B  "Common Name"	cn	11111	""	""  "Surname"	sn	11111	""	""  "Business Phone"	"telephoneNumber"	11101	""	""  END.ft.fiEach line represents one method of searching.  In this example, thereare three ways of searching - by Common Name, by Surname, and byBusiness Phone number.  The first field is the text which should bedisplayed to user.  The second field is the attribute which will besearched.  The third field is a bitmap which specifies which of thematch types (discussed below) are permitted for this search type.  A"1" value in a given bit position indicates that a particularmatch type is valid, and a "0" indicates that is it not valid.  Thefourth and fifth fields are, respectively, the select attribute name(corresponding to the sa_selectattr field of the ldap_searchattr datastructure) and on-screen name for the select attribute (correspondingto the sa_selecttext field).  These values are intended to overridethe so_defaultselectattr and so_defaultselecttext values, describedabove.  If blank, the client software should use the default values above..LPThe next section is a list of search match options, terminated by aa line containing only the string "END".  Example:.nf.ft B  "exactly matches"	"(%a=%v))"  "approximately matches"	"(%a~=%v))"  "starts with"	"(%a=%v*))"  "ends with"	"(%a=*%v))"  "contains"	"(%a=*%v*))"  END.ft.fiIn this example, there are five ways of refining the search.  For each method,there is an LDAP filter suffix which is appended to the ldap filter thusfar constructed.  The routine ldap_build_filter() may be used to constructthe whole filter.  It substitutes the appropriate attribute for "%a" in thefilter, and a value (generally, something the user types) for "%v"..SH EXAMPLEThe following example illustrates one possible configuration of searchpreferences for "people"..LP.nf# Version numberVersion 1# Name for this search objectPeople# Label to place before text box user types in"Search For:"# Filter prefix to append to all "More Choices" searches"(&(objectClass=person)"# Tag to use for "Fewer Choices" searches - from ldapfilter.conf file"xax500-People"# If a search results in > 1 match, retrieve this attribute to help# user disambiguate the entries...multilineDescription# ...and label it with this string:"Description"# Search scope to use when searchingsubtree# Follows a list of "More Choices" search options.  Format is:# Label, attribute, select-bitmap, extra attr display name, extra attr ldap name# If last two are null, "Fewer Choices" name/attributes used"Common Name"                   cn                 11111  ""  """Surname"                       sn                 11111  ""  """Business Phone"                "telephoneNumber"  11101  ""  """E-Mail Address"                "mail"             11111  ""  """Uniqname"                      "uid"              11111  ""  ""END# Match types"exactly matches"               "(%a=%v))""approximately matches"         "(%a~=%v))""starts with"                   "(%a=%v*))""ends with"                     "(%a=*%v))""contains"                      "(%a=*%v*))"END.fi.LPIn this example, the user may search for People.  For "fewer choices" searching,the tag for the ldap filter config file is "xax500-People"..SH FILESETCDIR/ldapsearchprefs.conf.SH SEE ALSO.BR ldap (3)..BR ldap-searchprefs (3).SH ACKNOWLEDGEMENTS.B	OpenLDAPis developed and maintained by The OpenLDAP Project (http://www.openldap.org/)..B	OpenLDAPis derived from University of Michigan LDAP 3.3 Release.  

⌨️ 快捷键说明

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