Difference between revisions of "ZH/Documentation/Administration Guide/LDAP Access"
(New page: {{Documentation/AdminGuideTOC/v2 |ShowPrevPage=block |ShowNextPage=none |PrevPage=Documentation/Administration Guide/Restricting functionality }} {{DISPLAYTITLE:访问 LDAP 服务器上的...) |
|||
(7 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | {{Documentation/AdminGuideTOC/v2 | + | {{ZH/Documentation/AdminGuideTOC/v2 |
|ShowPrevPage=block | |ShowPrevPage=block | ||
|ShowNextPage=none | |ShowNextPage=none | ||
− | |PrevPage=Documentation/Administration Guide/Restricting functionality | + | |PrevPage=ZH/Documentation/Administration Guide/Restricting functionality |
}} | }} | ||
{{DISPLAYTITLE:访问 LDAP 服务器上的 {{OOo}} 用户配置文件}} | {{DISPLAYTITLE:访问 LDAP 服务器上的 {{OOo}} 用户配置文件}} | ||
− | {{OOo}} 可以使用 LDAP 用户配置文件后端来访问 LDAP | + | {{OOo}} 可以使用 LDAP 用户配置文件后端来访问 LDAP 服务器上的用户配置文件,如名字、姓氏和地址。这样,在网络上安装 {{OOo}} 时,便无需手动输入用户配置文件。 |
要从 LDAP 系统信息库中检索 {{OOo}} 用户配置文件,您需要为 LDAP 用户配置文件后端提供以下信息: | 要从 LDAP 系统信息库中检索 {{OOo}} 用户配置文件,您需要为 LDAP 用户配置文件后端提供以下信息: | ||
*LDAP 系统信息库位置 | *LDAP 系统信息库位置 | ||
− | * | + | *映射文件,用于标识 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 配置文件。 |
− | + | ||
− | {{ | + | {{Note|<tt>''install-dir''/share/registry/data/org/openoffice/LDAP.xcu.sample</tt> |
处提供了一个样例 <tt>LDAP.xcu</tt> 文件 | 处提供了一个样例 <tt>LDAP.xcu</tt> 文件 | ||
}} | }} | ||
Line 67: | Line 67: | ||
;<tt>BaseDN</tt>:企业目录的根条目。 | ;<tt>BaseDN</tt>:企业目录的根条目。 | ||
;<tt>Port</tt>:LDAP 服务器的端口号。默认端口号为 389。 | ;<tt>Port</tt>:LDAP 服务器的端口号。默认端口号为 389。 | ||
− | ;<tt>SearchUser</tt>: | + | ;<tt>SearchUser</tt>:对 LDAP 系统信息库具有只读访问权限的现有用户的标识名 (Distinguished Name, DN)。 |
− | {{ | + | {{Note|只有在 LDAP 服务器不支持匿名访问时,才需要使用此设置。}} |
;<tt>SearchPassword</tt>:<tt>SearchUser</tt> 密码。 | ;<tt>SearchPassword</tt>:<tt>SearchUser</tt> 密码。 | ||
− | {{ | + | {{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> | + | ;<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> 文件。 | ||
− | {{ | + | {{Note|如果要更改映射文件位置,请编辑 <tt>''install-dir''/program/configmgrrc</tt> 文件中的 <tt>CFG_LdapMappingUrl</tt> 条目,以指向文件的新位置。在 Windows 中,该条目位于 <tt>''install-dir''/program/configmgr.ini</tt> 文件中。}} |
还可以为备用 LDAP 服务器创建自定义用户配置文件映射文件。 | 还可以为备用 LDAP 服务器创建自定义用户配置文件映射文件。 | ||
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> 的文本文件。 | ||
− | {{ | + | {{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 | + | 只能映射 {{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> 目录中。 | ||
− | {{ | + | {{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}} |
Latest revision as of 21:30, 14 July 2018
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 系统信息库中的用户配置文件
- 在文本编辑器中,创建一个名为 LDAP.xcu 的 XML 配置文件。
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)。
- SearchPassword
- SearchUser 密码。
- UserObjectClass
- 标识用户实体的对象类。
例如,OpenDS 服务器 inetOrgPerson 的用户实体。要查找用户的 DN,您需要将该实体与 UserUniqueAttribute 属性结合使用。 - UserUniqueAttribute
- 标识用户实体的属性。
例如,OpenDS 服务器上的 LDAP 系统信息库的 UserUniqueAttribute 为 uid。要查找用户的 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 用作映射文件。
- 将 LDAP.xcu 文件中的值占位符替换为 LDAP 服务器的必需设置。
- 将 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 文件。
如果要更改映射文件位置,请编辑 install-dir/program/configmgrrc 文件中的 CFG_LdapMappingUrl 条目,以指向文件的新位置。在 Windows 中,该条目位于 install-dir/program/configmgr.ini 文件中。 |
还可以为备用 LDAP 服务器创建自定义用户配置文件映射文件。
创建自定义用户配置文件映射文件
- 创建一个名为 oo-ldap server type-attr.map 的文本文件。
- 键入映射信息。
该文件中的每一行必须具有以下格式:user-profile-attribut=LDAP-attribute1,LDAP-attribute2,...,LDAP-attribute-n。
只能映射 Apache OpenOffice 配置模式中包含的用户配置文件属性。此模式的文件名路径为 install-dir/share/registry/schema/org/openoffice/UserProfile.xcs。您可以编辑相应 LDAP 属性的列表以显示用户条目中保存个人数据的属性。LDAP 服务器将按照 LDAP 属性在列表中显示的顺序来查询这些属性。 - 将映射文件复制到 install-dir/share/registry/ldap/ 目录中。
- 在 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). |