19.6. 使用 LDAP 存储自动挂载器映射
				配置 autofs 以将自动挂载程序映射存储在 LDAP 配置中,而不是存储在 autofs 映射文件中。
			
先决条件
- 
						必须在所有配置的系统中安装 LDAP 客户端程序库,以便从 LDAP 检索自动挂载程序映射。在 Red Hat Enterprise Linux 上,openldap软件包应作为autofs软件包的依赖项自动安装。
流程
- 
						要配置 LDAP 访问,请修改 /etc/openldap/ldap.conf文件。确保为您的站点正确设置了BASE、URI和schema选项。
- rfc2307bis草案中描述了最近建立的用于在 LDAP 中存储自动映射的模式。要使用此模式,请在- /etc/autofs.conf配置文件中通过删除模式定义中的注释字符来设置它。例如:- 例 19.6. 设置 autofs 配置 - DEFAULT_MAP_OBJECT_CLASS="automountMap" DEFAULT_ENTRY_OBJECT_CLASS="automount" DEFAULT_MAP_ATTRIBUTE="automountMapName" DEFAULT_ENTRY_ATTRIBUTE="automountKey" DEFAULT_VALUE_ATTRIBUTE="automountInformation" - DEFAULT_MAP_OBJECT_CLASS="automountMap" DEFAULT_ENTRY_OBJECT_CLASS="automount" DEFAULT_MAP_ATTRIBUTE="automountMapName" DEFAULT_ENTRY_ATTRIBUTE="automountKey" DEFAULT_VALUE_ATTRIBUTE="automountInformation"- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- 确保配置中所有其他模式条目都被注释了。 - rfc2307bis模式的- automountKey属性替换- rfc2307模式的- cn属性。以下是 LDAP 数据交换格式(LDIF)配置的一个示例:- 例 19.7. LDIF 配置 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow