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

From Apache OpenOffice Wiki
Jump to: navigation, search
(New page: {{Documentation/AdminGuideTOC/v2 |ShowPrevPage=block |ShowNextPage=none |PrevPage=Documentation/Administration Guide/Restricting functionality }} {{DISPLAYTITLE:访问 LDAP 服务器上的...)
 
m (Robot: Automated text replacement (-{{PDL1}} +{{InterWiki Languages AdminGuide|articletitle={{PAGENAME}}}}\n{{PDL1}}))
Line 98: Line 98:
 
<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 13:47, 20 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 文件结构为:
     <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
In other languages