Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

12.6. 为主机设置 ethers 信息

NIS 可以托管 ethers 表,它可以用来根据其平台、操作系统、DNS 域和 MAC 地址 - 保存在 IdM 中的主机条目中管理 DHCP 配置文件。
在身份管理中,每个系统都会在目录中使用对应的 ethers 条目创建,位于 ou=ethers 子树中。
cn=server,ou=ethers,dc=example,dc=com
此条目用于为 ethers 服务创建 NIS 映射,该服务可以由 IdM 中的 NIS 兼容性插件管理。
ethers 条目配置 NIS 映射:
  1. 将 MAC 地址属性添加到主机条目。例如:
    [jsmith@server ~]$ kinit admin
    [jsmith@server ~]$ ipa host-mod --macaddress=12:34:56:78:9A:BC server.example.com
  2. 打开 nsswitch.conf 文件。
  3. ethers 服务添加一行,并将其设置为使用 LDAP 进行查找。
    ethers: ldap
  4. 检查 ethers 信息是否可用于客户端。
    [root@server ~]# getent ethers server.example.com