Difference between revisions of "ZH/Documentation/Administration Guide/LDAP Access"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Automated text replacement (-{{PDL1}} +{{InterWiki Languages AdminGuide|articletitle={{PAGENAME}}}}\n{{PDL1}}))
Line 5: Line 5:
 
}}
 
}}
 
{{DISPLAYTITLE:访问 LDAP 服务器上的 {{OOo}} 用户配置文件}}
 
{{DISPLAYTITLE:访问 LDAP 服务器上的 {{OOo}} 用户配置文件}}
{{OOo}} 可以使用 LDAP 用户配置文件后端来访问 LDAP 服务器上的用户配置文件,如名字、姓氏和地址。因此,在网络上安装 {{OOo}} 时,不需要手动输入用户配置文件。
+
{{OOo}} 可以使用 LDAP 用户配置文件后端来访问 LDAP 服务器上的用户配置文件,如名字、姓氏和地址。这样,在网络上安装 {{OOo}} 时,便无需手动输入用户配置文件。
  
 
要从 LDAP 系统信息库中检索 {{OOo}} 用户配置文件,您需要为 LDAP 用户配置文件后端提供以下信息:
 
要从 LDAP 系统信息库中检索 {{OOo}} 用户配置文件,您需要为 LDAP 用户配置文件后端提供以下信息:
  
 
*LDAP 系统信息库位置
 
*LDAP 系统信息库位置
*映射文件,用于指定 LDAP 系统信息库中生成 {{OOo}} 用户配置文件所需的属性
+
*映射文件,用于标识 LDAP 系统信息库中生成 {{OOo}} 用户配置文件所需的属性
  
 
===配置 {{OOo}} 以检索 LDAP 系统信息库中的用户配置文件===
 
===配置 {{OOo}} 以检索 LDAP 系统信息库中的用户配置文件===
Line 19: Line 19:
 
<div class="task">
 
<div class="task">
 
<ol class="task">
 
<ol class="task">
<li>在文本编辑器中,创建一个名为 <tt>LDAP.xcu</tt>
+
<li>在文本编辑器中,创建一个名为 <tt>LDAP.xcu</tt> 的 XML 配置文件。
的 XML 配置文件。
+
                   
 
{{Documentation/Note|<tt>''install-dir''/share/registry/data/org/openoffice/LDAP.xcu.sample</tt>
 
{{Documentation/Note|<tt>''install-dir''/share/registry/data/org/openoffice/LDAP.xcu.sample</tt>
 
处提供了一个样例 <tt>LDAP.xcu</tt> 文件
 
处提供了一个样例 <tt>LDAP.xcu</tt> 文件
Line 27: Line 27:
 
<tt>LDAP.xcu.sample</tt> 文件结构为:
 
<tt>LDAP.xcu.sample</tt> 文件结构为:
  
<source lang="xml">
+
<source language="xml">
 
  <oor:component-data oor:name="LDAP" oor:package="org.openoffice"  
 
  <oor:component-data oor:name="LDAP" oor:package="org.openoffice"  
 
  xmlns:oor="http://openoffice.org/2001/registry"  
 
  xmlns:oor="http://openoffice.org/2001/registry"  
Line 67: Line 67:
 
;<tt>BaseDN</tt>:企业目录的根条目。
 
;<tt>BaseDN</tt>:企业目录的根条目。
 
;<tt>Port</tt>:LDAP 服务器的端口号。默认端口号为 389。
 
;<tt>Port</tt>:LDAP 服务器的端口号。默认端口号为 389。
;<tt>SearchUser</tt>:具有 LDAP 系统信息库的只读访问权限的现有用户的标识名 (Distinguished Name, DN)。
+
;<tt>SearchUser</tt>:LDAP 系统信息库具有只读访问权限的现有用户的标识名 (Distinguished Name, DN)。
 
{{Documentation/Note|只有在 LDAP 服务器不支持匿名访问时,才需要使用此设置。}}
 
{{Documentation/Note|只有在 LDAP 服务器不支持匿名访问时,才需要使用此设置。}}
 
;<tt>SearchPassword</tt>:<tt>SearchUser</tt> 密码。
 
;<tt>SearchPassword</tt>:<tt>SearchUser</tt> 密码。
 
{{Documentation/Note|只有在 LDAP 服务器不支持匿名访问时,才需要使用此设置。}}
 
{{Documentation/Note|只有在 LDAP 服务器不支持匿名访问时,才需要使用此设置。}}
 
;<tt>UserObjectClass</tt>:标识用户实体的对象类。<br>例如,OpenDS 服务器 <tt>inetOrgPerson</tt> 的用户实体。要查找用户的 DN,您需要将该实体与 <tt>UserUniqueAttribute</tt> 属性结合使用。
 
;<tt>UserObjectClass</tt>:标识用户实体的对象类。<br>例如,OpenDS 服务器 <tt>inetOrgPerson</tt> 的用户实体。要查找用户的 DN,您需要将该实体与 <tt>UserUniqueAttribute</tt> 属性结合使用。
;<tt>UserUniqueAttribute</tt>:标识用户实体的属性。<br>例如,OpenDS 服务器上的 LDAP 系统信息库的 <tt>UserUniqueAttribute</tt> 为 <tt>uid</tt>。要查找用户的 DN,您需要将该属性与 <tt>UserObjectClass</tt> 结合使用。服务器将此属性的值与操作系统的登录用户名进行比较。
+
;<tt>UserUniqueAttribute</tt>:标识用户实体的属性。<br>例如,OpenDS 服务器上的 LDAP 系统信息库的 <tt>UserUniqueAttribute</tt> 为 <tt>uid</tt>。要查找用户的 DN,您需要将该属性与 <tt>UserObjectClass</tt> 结合使用。服务器会将此属性的值与操作系统的登录用户名进行比较。
;<tt>Mapping</tt>:指示命名映射文件的字符串,即,<tt>$(Mapping)-attr.map</tt>。<br>例如,如果 LDAP 系统信息库为 OpenDS 服务器,则映射条目为 <tt>oo-ldap</tt>。此条目指示 LDAP 用户配置文件后端将 <tt>oo-ldap-attr.map</tt> 作为映射文件。或者,如果 LDAP 系统信息库为 Active Directory,则映射条目为 <tt>oo-ad-ldap</tt>。此条目指示 LDAP 用户配置文件后端将 <tt>oo-ad-ldap-attr.map</tt> 作为映射文件。
+
;<tt>Mapping</tt>:指示命名映射文件的字符串,即,<tt>$(Mapping)-attr.map</tt>。<br>例如,如果 LDAP 系统信息库为 OpenDS 服务器,则映射条目为 <tt>oo-ldap</tt>。此条目指示 LDAP 用户配置文件后端将 <tt>oo-ldap-attr.map</tt> 用作映射文件。或者,如果 LDAP 系统信息库为 Active Directory,则映射条目为 <tt>oo-ad-ldap</tt>。此条目指示 LDAP 用户配置文件后端将 <tt>oo-ad-ldap-attr.map</tt> 用作映射文件。
 
</li>
 
</li>
 
<li>将 <tt>LDAP.xcu</tt> 文件中的值占位符替换为 LDAP 服务器的必需设置。</li>
 
<li>将 <tt>LDAP.xcu</tt> 文件中的值占位符替换为 LDAP 服务器的必需设置。</li>
Line 83: Line 83:
 
默认情况下,{{OOo}} 安装包含两个元配置映射文件,用于将 {{OOo}} 用户配置文件属性映射到 LDAP 属性。对于 Sun Java System Directory Server,LDAP 用户配置文件后端使用 <tt>''install-dir''/share/registry/ldap/oo-ldap-attr.map</tt> 映射文件;对于 Windows Active Directory Server,它使用 <tt>''install-dir''/share/registry/ldap/oo-ad-ldap-attr.map</tt> 映射文件。<tt>LDAP.xcu</tt> 文件中的映射条目指示要使用的映射文件。例如,<tt>oo-ldap</tt> 指示 <tt>oo-ldap-attr.map</tt> 文件。
 
默认情况下,{{OOo}} 安装包含两个元配置映射文件,用于将 {{OOo}} 用户配置文件属性映射到 LDAP 属性。对于 Sun Java System Directory Server,LDAP 用户配置文件后端使用 <tt>''install-dir''/share/registry/ldap/oo-ldap-attr.map</tt> 映射文件;对于 Windows Active Directory Server,它使用 <tt>''install-dir''/share/registry/ldap/oo-ad-ldap-attr.map</tt> 映射文件。<tt>LDAP.xcu</tt> 文件中的映射条目指示要使用的映射文件。例如,<tt>oo-ldap</tt> 指示 <tt>oo-ldap-attr.map</tt> 文件。
  
{{Documentation/Note|如果要更改映射文件位置,请编辑 <tt>''install-dir''/program/configmgrrc</tt> 文件中的 <tt>CFG_LdapMappingUrl</tt> 条目以指向新文件位置。在 Windows 中,该条目位于 <tt>''install-dir''/program/configmgr.ini</tt> 文件中。}}
+
{{Documentation/Note|如果要更改映射文件位置,请编辑 <tt>''install-dir''/program/configmgrrc</tt> 文件中的 <tt>CFG_LdapMappingUrl</tt> 条目,以指向文件的新位置。在 Windows 中,该条目位于 <tt>''install-dir''/program/configmgr.ini</tt> 文件中。}}
  
 
还可以为备用 LDAP 服务器创建自定义用户配置文件映射文件。
 
还可以为备用 LDAP 服务器创建自定义用户配置文件映射文件。
Line 93: Line 93:
 
{{Documentation/Tip|编辑现有映射文件的副本,例如,<tt>''install-dir''/share/registry/ldap/oo-ldap-attr.map</tt>。}}</li>
 
{{Documentation/Tip|编辑现有映射文件的副本,例如,<tt>''install-dir''/share/registry/ldap/oo-ldap-attr.map</tt>。}}</li>
 
<li>键入映射信息。<br>该文件中的每一行必须具有以下格式:<tt>''user-profile-attribut''=''LDAP-attribute1'',''LDAP-attribute2'',...,''LDAP-attribute-n''</tt>。<br>
 
<li>键入映射信息。<br>该文件中的每一行必须具有以下格式:<tt>''user-profile-attribut''=''LDAP-attribute1'',''LDAP-attribute2'',...,''LDAP-attribute-n''</tt>。<br>
只能映射 {{OOo}} 配置模式中包含的用户配置文件属性。此模式的文件名路径为 <tt>''install-dir''/share/registry/schema/org/openoffice/UserProfile.xcs</tt>。您可以编辑相应 LDAP 属性列表以显示用户条目中保存个人数据的属性。LDAP 服务器将按照列表中显示 LDAP 属性的顺序来查询这些属性。</li>
+
只能映射 {{OOo}} 配置模式中包含的用户配置文件属性。此模式的文件名路径为 <tt>''install-dir''/share/registry/schema/org/openoffice/UserProfile.xcs</tt>。您可以编辑相应 LDAP 属性的列表以显示用户条目中保存个人数据的属性。LDAP 服务器将按照 LDAP 属性在列表中显示的顺序来查询这些属性。</li>
 
<li>将映射文件复制到 <tt>''install-dir''/share/registry/ldap/</tt> 目录中。
 
<li>将映射文件复制到 <tt>''install-dir''/share/registry/ldap/</tt> 目录中。
{{Documentation/Note|要将映射文件复制到网络安装的该目录中,您需要具有管理员权限。}}</li>
+
{{Documentation/Note|您需要具有管理员权限,才能将映射文件复制到网络安装的此目录中。}}</li>
 
<li>在 <tt>''install-dir''/share/registry/data/org/openoffice/LDAP.xcu</tt> 文件中,将 <tt>Mapping</tt> 属性值更改为映射文件名称中 <tt>-attr.map</tt> 前面显示的字符串。<br>例如,该文件的 <tt>Mapping</tt> 属性值。</li>  
 
<li>在 <tt>''install-dir''/share/registry/data/org/openoffice/LDAP.xcu</tt> 文件中,将 <tt>Mapping</tt> 属性值更改为映射文件名称中 <tt>-attr.map</tt> 前面显示的字符串。<br>例如,该文件的 <tt>Mapping</tt> 属性值。</li>  
 
</ol>
 
</ol>
{{InterWiki Languages AdminGuide|articletitle={{PAGENAME}}}}
 
 
{{PDL1}}
 
{{PDL1}}

Revision as of 14:25, 30 October 2008


Apache OpenOffice 可以使用 LDAP 用户配置文件后端来访问 LDAP 服务器上的用户配置文件,如名字、姓氏和地址。这样,在网络上安装 Apache OpenOffice 时,便无需手动输入用户配置文件。

要从 LDAP 系统信息库中检索 Apache OpenOffice 用户配置文件,您需要为 LDAP 用户配置文件后端提供以下信息:

  • LDAP 系统信息库位置
  • 映射文件,用于标识 LDAP 系统信息库中生成 Apache OpenOffice 用户配置文件所需的属性

配置 Apache OpenOffice 以检索 LDAP 系统信息库中的用户配置文件

可以在 XML 文件 LDAP.xcu 中指定 LDAP 用户配置文件后端的设置。Apache OpenOffice 将在启动期间加载这些设置。LDAP.xcu 文件结构是由 org.openoffice.LDAP 组件的配置模式定义的。该模式位于 install-dir/share/registry/schema/org/openoffice/LDAP.xcs 中。

配置 Apache OpenOffice 以访问 LDAP 系统信息库中的用户配置文件

  1. 在文本编辑器中,创建一个名为 LDAP.xcu 的 XML 配置文件。 Template:Documentation/Note LDAP.xcu.sample 文件结构为:

    Invalid language.

    You need to specify a language like this: <source lang="html4strict">...</source>

    Supported languages for syntax highlighting:

    4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, apt_sources, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, j, java, java5, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nsis, oberon2, objc, objeck, ocaml, ocaml-brief, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, php-brief, pic16, pike, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, rails, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, spark, sparql, sql, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic


     <oor:component-data oor:name="LDAP" oor:package="org.openoffice" 
     xmlns:oor="http://openoffice.org/2001/registry" 
     xmlns:xs="http://www.w3.org/2001/XMLSchema" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <node oor:name="UserDirectory">
       <node oor:name="ServerDefinition">
         <prop oor:name="Server" oor:type="xs:string">
           <value>ldapserver.mycorp.com</value>
         </prop>
         <prop oor:name="BaseDN" oor:type="xs:string">
           <value>dc=mycorp,dc=com</value>
         </prop>
         <prop oor:name="Port" oor:type="xs:int">
           <value>389</value>
         </prop>
       </node>
       <!-- The following settings should be omitted if anonymous access is possible -->
         <prop oor:name="SearchUser" oor:type="xs:string"> 
            <value>MyUserLogin</value>
         </prop> 
         <prop oor:name="SearchPassword" oor:type="xs:string"> 
            <value>MyPassword</value> 
         </prop> 
       <!-- End of strings that should be omitted if anonymous access is possible -->
       <prop oor:name="UserObjectClass" oor:type="xs:string">
         <value>inetorgperson</value>
       </prop>
       <prop oor:name="UserUniqueAttribute" oor:type="xs:string">
         <value>uid</value>
       </prop>
       <prop oor:name="Mapping" oor:type="xs:string">
         <value>oo-ldap</value>
       </prop>
     </node>
     </oor:component-data>
    Server
    LDAP 服务器的主机名。
    BaseDN
    企业目录的根条目。
    Port
    LDAP 服务器的端口号。默认端口号为 389。
    SearchUser
    对 LDAP 系统信息库具有只读访问权限的现有用户的标识名 (Distinguished Name, DN)。

    Template:Documentation/Note

    SearchPassword
    SearchUser 密码。

    Template:Documentation/Note

    UserObjectClass
    标识用户实体的对象类。
    例如,OpenDS 服务器 inetOrgPerson 的用户实体。要查找用户的 DN,您需要将该实体与 UserUniqueAttribute 属性结合使用。
    UserUniqueAttribute
    标识用户实体的属性。
    例如,OpenDS 服务器上的 LDAP 系统信息库的 UserUniqueAttributeuid。要查找用户的 DN,您需要将该属性与 UserObjectClass 结合使用。服务器会将此属性的值与操作系统的登录用户名进行比较。
    Mapping
    指示命名映射文件的字符串,即,$(Mapping)-attr.map
    例如,如果 LDAP 系统信息库为 OpenDS 服务器,则映射条目为 oo-ldap。此条目指示 LDAP 用户配置文件后端将 oo-ldap-attr.map 用作映射文件。或者,如果 LDAP 系统信息库为 Active Directory,则映射条目为 oo-ad-ldap。此条目指示 LDAP 用户配置文件后端将 oo-ad-ldap-attr.map 用作映射文件。
  2. LDAP.xcu 文件中的值占位符替换为 LDAP 服务器的必需设置。
  3. LDAP.xcu 文件复制到 install-dir/share/registry/data/org/openoffice/ 中。

映射 LDAP 用户配置文件

默认情况下,Apache OpenOffice 安装包含两个元配置映射文件,用于将 Apache OpenOffice 用户配置文件属性映射到 LDAP 属性。对于 Sun Java System Directory Server,LDAP 用户配置文件后端使用 install-dir/share/registry/ldap/oo-ldap-attr.map 映射文件;对于 Windows Active Directory Server,它使用 install-dir/share/registry/ldap/oo-ad-ldap-attr.map 映射文件。LDAP.xcu 文件中的映射条目指示要使用的映射文件。例如,oo-ldap 指示 oo-ldap-attr.map 文件。

Template:Documentation/Note

还可以为备用 LDAP 服务器创建自定义用户配置文件映射文件。

创建自定义用户配置文件映射文件

  1. 创建一个名为 oo-ldap server type-attr.map 的文本文件。 Template:Documentation/Tip
  2. 键入映射信息。
    该文件中的每一行必须具有以下格式:user-profile-attribut=LDAP-attribute1,LDAP-attribute2,...,LDAP-attribute-n
    只能映射 Apache OpenOffice 配置模式中包含的用户配置文件属性。此模式的文件名路径为 install-dir/share/registry/schema/org/openoffice/UserProfile.xcs。您可以编辑相应 LDAP 属性的列表以显示用户条目中保存个人数据的属性。LDAP 服务器将按照 LDAP 属性在列表中显示的顺序来查询这些属性。
  3. 将映射文件复制到 install-dir/share/registry/ldap/ 目录中。 Template:Documentation/Note
  4. install-dir/share/registry/data/org/openoffice/LDAP.xcu 文件中,将 Mapping 属性值更改为映射文件名称中 -attr.map 前面显示的字符串。
    例如,该文件的 Mapping 属性值。
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools