OSDN Git Service

[lfsja-git] r11.1-117 対応。
[lfsbookja/lfsja-git.git] / src / chapter07 / createfiles.ch
1 %
2 % This is part of LFSbookja package.
3 %
4 % This is a CTIE change file for the original XML source of the LFSbook.
5 %
6 @x
7 <?xml version="1.0" encoding="ISO-8859-1"?>
8 @y
9 <?xml version="1.0" encoding="UTF-8"?>
10 @z
11
12 @x
13   <title>Creating Essential Files and Symlinks</title>
14 @y
15   <title>重要なファイルとシンボリックリンクの生成</title>
16 @z
17
18 @x
19   <para>Historically, Linux maintains a list of the mounted file systems in the
20   file <filename>/etc/mtab</filename>. Modern kernels maintain this list
21   internally and expose it to the user via the <filename
22   class="directory">/proc</filename> filesystem. To satisfy utilities that
23   expect the presence of <filename>/etc/mtab</filename>, create the following
24   symbolic link:</para>
25 @y
26   <para>
27   Linux のこれまでの経緯として、マウントされているファイルシステムの情報は <filename>/etc/mtab</filename> ファイルに保持されています。
28   最新の Linux であれば、内部的にこのファイルを管理し、ユーザーに対しては <filename
29   class="directory">/proc</filename> ファイルシステムを通じて情報提示しています。
30   <filename>/etc/mtab</filename> ファイルの存在を前提としているプログラムが正常動作するように、以下のシンボリックリンクを作成します。
31   </para>
32 @z
33
34 @x
35   <para>Create a basic <filename>/etc/hosts</filename> file to be
36   referenced in some test suites, and in one of Perl's configuration files
37   as well:</para>
38 @y
39   <para>
40   テストスイートの中に <filename>/etc/hosts</filename> ファイルを参照するものがあるので、単純なものをここで生成します。
41   これは Perl の設定ファイルにおいても参照されます。
42   </para>
43 @z
44
45 @x
46   <para>In order for user <systemitem class="username">root</systemitem> to be
47   able to login and for the name <quote>root</quote> to be recognized, there
48   must be relevant entries in the <filename>/etc/passwd</filename> and
49   <filename>/etc/group</filename> files.</para>
50 @y
51   <para>
52   <systemitem class="username">root</systemitem> ユーザーがログインできるように、またその<quote>root</quote>という名称を認識できるように <filename>/etc/passwd</filename> ファイルと <filename>/etc/group</filename> ファイルには該当する情報が登録されている必要があります。
53   </para>
54 @z
55
56 @x
57   <para>Create the <filename>/etc/passwd</filename> file by running the following
58   command:</para>
59 @y
60   <para>
61   以下のコマンドを実行して <filename>/etc/passwd</filename> ファイルを生成します。
62   </para>
63 @z
64
65 @x
66   <para>The actual password for <systemitem class="username">root</systemitem>
67   will be set later.</para>
68 @y
69   <para>
70   <systemitem class="username">root</systemitem> ユーザーに対する本当のパスワードは後に定めます。
71   </para>
72 @z
73
74 @x
75   <para>Create the <filename>/etc/group</filename> file by running the following
76   command:</para>
77 @y
78   <para>
79   以下のコマンドを実行して <filename>/etc/group</filename> ファイルを生成します。
80   </para>
81 @z
82
83 @x
84   <para>The created groups are not part of any standard&mdash;they are groups
85   decided on in part by the requirements of the Udev configuration in Chapter
86   9, and in part by common convention employed by a number of existing Linux
87   distributions. In addition, some test suites rely on specific users or
88   groups.  The Linux Standard Base (LSB, available at <ulink
89   url="http://refspecs.linuxfoundation.org/lsb.shtml"/>) only recommends that,
90   besides the group <systemitem class="groupname">root</systemitem> with a
91   Group ID (GID) of 0, a group <systemitem class="groupname">bin</systemitem>
92   with a GID of 1 be present. The GID of 5 is widely used for
93   <systemitem class="groupname">tty</systemitem> group, and the number 5 is
94   also used in <phrase revision="systemd">systemd</phrase>
95   <phrase revision="sysv"><filename>/etc/fstab</filename></phrase> for the
96   <systemitem class="filesystem">devpts</systemitem> filesystem.
97   All other group names and GIDs can be chosen freely by the system
98   administrator since well-written programs do not depend on GID numbers,
99   but rather use the group's name.</para>
100 @y
101   <para>
102   作成するグループは何かの標準に基づいたものではありません。
103   一部は 9 章の udev の設定に必要となるものですし、一部は既存の Linux ディストリビューションが採用している慣用的なものです。
104   またテストスイートにて特定のユーザーやグループを必要としているものがあります。
105   Linux Standard Base (<ulink url="http://www.linuxbase.org"/> 参照) では <systemitem
106   class="groupname">root</systemitem> グループのグループID (GID) は 0、<systemitem
107   class="groupname">bin</systemitem> グループの GID は 1 を定めているにすぎません。
108   GID 5 は <systemitem class="groupname">tty</systemitem> グループに対して広く用いられています。
109   また数値 5 は <systemitem class="filesystem">devpts</systemitem> ファイルシステムに対して <phrase
110   revision="systemd">systemd</phrase>
111   <phrase revision="sysv"><filename>/etc/fstab</filename></phrase> においても用いられています。
112   他のグループとその GID はシステム管理者が自由に取り決めることができます。
113   というのも通常のプログラムであれば GID の値に依存することはなく、あくまでグループ名を用いてプログラミングされているからです。
114   </para>
115 @z
116
117 @x
118   <para>The ID 65534 is used by the kernel for NFS and separate user
119   namespaces for unmapped users and groups (those exist on the NFS server
120   or the parent user namespace, but <quote>do not exist</quote> on the local
121   machine or in the separate namespace).  We assign
122   <systemitem class="username">nobody</systemitem> and
123   <systemitem class="groupname">nogroup</systemitem> for it to avoid an
124   unnamed ID.  But other distros may treat this ID differently, so any
125   portable program should not depend on this assignment.</para>
126 @y
127   <para>
128   ID 65534 は NFS のカーネルが利用し、マップされていないユーザーやグループに対するユーザー名前空間を切り分けます
129   (これは NFS サーバー上や親のユーザー空間に存在しますが、ローカルマシンや分離された名前空間には存在しません)。
130   未割り当ての ID を避けるために、この ID を <systemitem
131   class="username">nobody</systemitem> と <systemitem
132   class="groupname">nogroup</systemitem> に用いることにします。
133   他のディストリビューションにおいては、この ID を異なる用い方をしている場合があるため、移植性を考慮するプログラムでは、ここでの割り当てに依存しないようにしてください。
134   </para>
135 @z
136
137 @x
138   <para>Some tests in <xref linkend="chapter-building-system"/> need a regular
139   user. We add this user here and delete this account at the end of that
140   chapter.</para>
141 @y
142   <para>
143   <xref linkend="chapter-building-system"/> におけるテストの中には、通常のユーザーを必要とするものがあります。
144   ここでそういったユーザーをここで追加し、その章の最後には削除します。
145   </para>
146 @z
147
148 @x
149   <para>To remove the <quote>I have no name!</quote> prompt, start a new
150   shell. Since the
151   <filename>/etc/passwd</filename> and <filename>/etc/group</filename>
152   files have been created, user name and group name resolution will now
153   work:</para>
154 @y
155   <para>
156   プロンプトの<quote>I have no name!</quote>を取り除くために新たなシェルを起動します。
157   <filename>/etc/passwd</filename> ファイルと <filename>/etc/group</filename> ファイルを作ったので、ユーザー名とグループ名の名前解決が適切に動作します。
158   </para>
159 @z
160
161 @x
162   <para>The <command>login</command>, <command>agetty</command>, and
163   <command>init</command> programs (and others) use a number of log
164   files to record information such as who was logged into the system and
165   when. However, these programs will not write to the log files if they
166   do not already exist. Initialize the log files and give them
167   proper permissions:</para>
168 @y
169   <para>
170   <command>login</command>、<command>agetty</command>、<command>init</command> といったプログラム (あるいは他のプログラム) は、システムに誰がいつログインしたかといった情報を多くのログファイルに記録します。
171   しかしログファイルがあらかじめ存在していない場合は、ログファイルの出力が行われません。
172   そこでそのようなログファイルを作成し、適切なパーミッションを与えます。
173   </para>
174 @z
175
176 @x
177   <para>The <filename>/var/log/wtmp</filename> file records all logins and
178   logouts. The <filename>/var/log/lastlog</filename> file records when each
179   user last logged in. The <filename>/var/log/faillog</filename> file records
180   failed login attempts.  The <filename>/var/log/btmp</filename> file records
181   the bad login attempts.</para>
182 @y
183   <para>
184   <filename>/var/log/wtmp</filename> ファイルはすべてのログイン、ログアウトの情報を保持します。
185   <filename>/var/log/lastlog</filename> ファイルは各ユーザーが最後にログインした情報を保持します。
186   <filename>/var/log/faillog</filename> ファイルはログインに失敗した情報を保持します。
187   <filename>/var/log/btmp</filename> ファイルは不正なログイン情報を保持します。
188   </para>
189 @z
190
191 @x
192   <note><para>The <filename>/run/utmp</filename> file records the users that
193   are currently logged in.  This file is created dynamically in the boot
194   scripts.</para></note>
195 @y
196   <note><para>
197   <filename>/run/utmp</filename> ファイルは現在ログインしているユーザーの情報を保持します。
198   このファイルはブートスクリプトが動的に生成します。
199   </para></note>
200 @z