<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.archlinux.jp/index.php?action=history&amp;feed=atom&amp;title=LDAP_%E3%83%9B%E3%82%B9%E3%83%88</id>
	<title>LDAP ホスト - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.archlinux.jp/index.php?action=history&amp;feed=atom&amp;title=LDAP_%E3%83%9B%E3%82%B9%E3%83%88"/>
	<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=LDAP_%E3%83%9B%E3%82%B9%E3%83%88&amp;action=history"/>
	<updated>2026-06-13T09:19:40Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.44.3</generator>
	<entry>
		<id>https://wiki.archlinux.jp/index.php?title=LDAP_%E3%83%9B%E3%82%B9%E3%83%88&amp;diff=6899&amp;oldid=prev</id>
		<title>Kusakata: 翻訳</title>
		<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=LDAP_%E3%83%9B%E3%82%B9%E3%83%88&amp;diff=6899&amp;oldid=prev"/>
		<updated>2017-01-03T04:41:01Z</updated>

		<summary type="html">&lt;p&gt;翻訳&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:ネットワーク]]&lt;br /&gt;
[[en:LDAP Hosts]]&lt;br /&gt;
{{Related articles start}}&lt;br /&gt;
{{Related|OpenLDAP}}&lt;br /&gt;
{{Related|LDAP 認証}}&lt;br /&gt;
{{Related articles end}}&lt;br /&gt;
&lt;br /&gt;
この文章では LDAP サーバーに {{ic|etc/hosts}} を配置する方法を説明します。まずは LDAP サーバーをセットアップして立ち上げてください ([[LDAP 認証]]を参照)。それから {{ic|/etc/hosts}} から適切な ldif ファイルを作成します。例:&lt;br /&gt;
 127.0.0.1 localhost&lt;br /&gt;
 192.168.1.1 gojira.marex.local gojira&lt;br /&gt;
 192.168.1.50 gamera.marex.local gamera&lt;br /&gt;
 192.168.1.51 iris.marex.local iris&lt;br /&gt;
 192.168.1.52 zedan.marex.local zedan&lt;br /&gt;
{{ic|127.0.0.1}} はローカルホスト、{{ic|192.168.1.1}} は LDAP サーバーで、後の3つはワークステーションです (gamera, iris, zedan)。ldif ファイルには ou を作成する必要があります (以下のファイルを {{ic|hosts.ldif}} として保存します):&lt;br /&gt;
 dn: ou=Hosts,dc=marex,dc=local                                                                                              &lt;br /&gt;
 objectClass: organizationalUnit                                                                                             &lt;br /&gt;
 objectClass: top                                                                                                            &lt;br /&gt;
 ou: Hosts&lt;br /&gt;
 &lt;br /&gt;
 dn: cn=gojira+ipHostNumber=192.168.1.1,ou=Hosts,dc=marex,dc=local&lt;br /&gt;
 objectClass: ipHost&lt;br /&gt;
 objectClass: device&lt;br /&gt;
 objectClass: top&lt;br /&gt;
 cn: gojira&lt;br /&gt;
 ipHostNumber: 192.168.1.1&lt;br /&gt;
 &lt;br /&gt;
 dn: cn=gamera+ipHostNumber=192.168.1.50,ou=Hosts,dc=marex,dc=local&lt;br /&gt;
 objectClass: ipHost&lt;br /&gt;
 objectClass: device&lt;br /&gt;
 objectClass: top&lt;br /&gt;
 cn: gamera&lt;br /&gt;
 ipHostNumber: 192.168.1.50&lt;br /&gt;
 &lt;br /&gt;
 dn: cn=iris+ipHostNumber=192.168.1.51,ou=Hosts,dc=marex,dc=local&lt;br /&gt;
 objectClass: ipHost&lt;br /&gt;
 objectClass: device&lt;br /&gt;
 objectClass: top&lt;br /&gt;
 cn: iris&lt;br /&gt;
 ipHostNumber: 192.168.1.51&lt;br /&gt;
 &lt;br /&gt;
 dn: cn=zedan+ipHostNumber=192.168.1.52,ou=Hosts,dc=marex,dc=local&lt;br /&gt;
 objectClass: ipHost&lt;br /&gt;
 objectClass: device&lt;br /&gt;
 objectClass: top&lt;br /&gt;
 cn: zedan&lt;br /&gt;
 ipHostNumber: 192.168.1.52&lt;br /&gt;
そして LDAP サーバーにファイルを配置してください:&lt;br /&gt;
 $ ldapadd -x -W -D &amp;#039;cn=ldapadmin,dc=marex,dc=local&amp;#039; -h 192.168.1.1 -p 389 -f hosts.ldif&lt;br /&gt;
 ...&lt;br /&gt;
 adding new entry &amp;quot;cn=zedan+ipHostNumber=192.168.1.52,ou=Hosts,dc=marex,dc=local&amp;quot;&lt;br /&gt;
全てが完了したら {{ic|/etc/nss_ldap.conf}} を編集して {{ic|nss_base_hosts}} から始まる行を以下のように変更します:&lt;br /&gt;
 nss_base_hosts          ou=Hosts,dc=marex,dc=local?one&lt;br /&gt;
localhost と LDAP サーバー、存在するワークステーションについて {{ic|/etc/hosts}} を変更してください。以下は gamera ワークステーションでの例です:&lt;br /&gt;
 127.0.0.1 localhost&lt;br /&gt;
 192.168.1.1 gojira.marex.local gojira&lt;br /&gt;
 192.168.1.50 gamera.marex.local gamera&lt;br /&gt;
LDAP サーバーではワークステーションは無視してかまいません。最後に {{ic|/etc/hosts}} の hosts エントリを編集:&lt;br /&gt;
 hosts:          files dns ldap&lt;br /&gt;
設定をテスト:&lt;br /&gt;
 $ getent hosts&lt;br /&gt;
 127.0.0.1       localhost&lt;br /&gt;
 192.168.1.1     gojira.marex.local gojira&lt;br /&gt;
 192.168.1.50    gamera.marex.local gamera&lt;br /&gt;
 192.168.1.1     gojira&lt;br /&gt;
 192.168.1.50    gamera&lt;br /&gt;
 192.168.1.51    iris&lt;br /&gt;
 192.168.1.52    zedan&lt;br /&gt;
最初の3行は {{ic|/etc/hosts}} 由来で、後の4行は LDAP サーバー由来です。最後に LDAP に ping が通るか確認してください:&lt;br /&gt;
 $ ping iris&lt;br /&gt;
 PING iris (192.168.1.51) 56(84) bytes of data.&lt;br /&gt;
 ...&lt;/div&gt;</summary>
		<author><name>Kusakata</name></author>
	</entry>
</feed>