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

From Apache OpenOffice Wiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 91: Line 91:
 
<ol class="task">
 
<ol class="task">
 
<li>创建一个名为 <tt>oo-ldap server type-attr.map</tt> 的文本文件。
 
<li>创建一个名为 <tt>oo-ldap server type-attr.map</tt> 的文本文件。
{{Documentation/Tip|编辑现有映射文件的副本,例如,<tt>''install-dir''/share/registry/ldap/oo-ldap-attr.map</tt>。}}</li>
+
{{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>
+
{{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>
 
{{PDL1}}
 
{{PDL1}}
 
{{InterWiki_Languages_AdminGuide|articletitle=Documentation/Administration Guide/LDAP Access}}
 
{{InterWiki_Languages_AdminGuide|articletitle=Documentation/Administration Guide/LDAP Access}}

Latest revision as of 21:30, 14 July 2018

doc OOo

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 配置文件。
    Documentation note.png install-dir/share/registry/data/org/openoffice/LDAP.xcu.sample

    处提供了一个样例 LDAP.xcu 文件

    LDAP.xcu.sample 文件结构为:

     <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)。
    Documentation note.png 只有在 LDAP 服务器不支持匿名访问时,才需要使用此设置。
    SearchPassword
    SearchUser 密码。
    Documentation note.png 只有在 LDAP 服务器不支持匿名访问时,才需要使用此设置。
    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 文件。

Documentation note.png 如果要更改映射文件位置,请编辑 install-dir/program/configmgrrc 文件中的 CFG_LdapMappingUrl 条目,以指向文件的新位置。在 Windows 中,该条目位于 install-dir/program/configmgr.ini 文件中。

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

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

  1. 创建一个名为 oo-ldap server type-attr.map 的文本文件。
    Tip.png 编辑现有映射文件的副本,例如,install-dir/share/registry/ldap/oo-ldap-attr.map
  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/ 目录中。
    Documentation note.png 您需要具有管理员权限,才能将映射文件复制到网络安装的此目录中。
  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
In other languages