- Merge the following from the English version:

r11372 -> r17963	head/ja_JP.eucJP/books/handbook/users/chapter.sgml

Submitted by:	Hiroo Ono <hiroo _at_ jp dot FreeBSD dot org>
References:	[doc-jp-work 1892-1894]
This commit is contained in:
Ryusuke SUZUKI 2012-08-13 10:16:10 +00:00
parent 0ceeffb2fb
commit 2e969f6888
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=39370

View file

@ -2,7 +2,7 @@
The FreeBSD Documentation Project The FreeBSD Documentation Project
The FreeBSD Japanese Documentation Project The FreeBSD Japanese Documentation Project
Original revision: r11372 Original revision: r17963
$FreeBSD$ $FreeBSD$
--> -->
@ -68,7 +68,7 @@
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>Unix FreeBSD の基礎知識 (<xref linkend="basics">) <para>&unix; FreeBSD の基礎知識 (<xref linkend="basics">)
を理解しておいてください。</para> を理解しておいてください。</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
@ -353,7 +353,7 @@
<secondary>変更</secondary> <secondary>変更</secondary>
</indexterm> </indexterm>
<para>Unix 環境では、 <para>&unix; 環境では、
ユーザアカウントを操作するのにさまざまなコマンドが使えます。 ユーザアカウントを操作するのにさまざまなコマンドが使えます。
もっとも一般的なコマンドを以下に示し、 もっとも一般的なコマンドを以下に示し、
それに続いて詳しい使用例を示します。</para> それに続いて詳しい使用例を示します。</para>
@ -368,23 +368,23 @@
</thead> </thead>
<tbody> <tbody>
<row> <row>
<entry><command>adduser</command></entry> <entry>&man.adduser.8;</entry>
<entry>コマンドラインからユーザを追加するための推奨アプリケーション</entry> <entry>コマンドラインからユーザを追加するための推奨アプリケーション</entry>
</row> </row>
<row> <row>
<entry><command>rmuser</command></entry> <entry>&man.rmuser.8;</entry>
<entry>コマンドラインからユーザを削除するための推奨アプリケーション</entry> <entry>コマンドラインからユーザを削除するための推奨アプリケーション</entry>
</row> </row>
<row> <row>
<entry><command>chpass</command></entry> <entry>&man.chpass.1;</entry>
<entry>ユーザデータベースの情報を変更するための柔軟なツール</entry> <entry>ユーザデータベースの情報を変更するための柔軟なツール</entry>
</row> </row>
<row> <row>
<entry><command>passwd</command></entry> <entry>&man.passwd.1;</entry>
<entry>ユーザのパスワードを変更する簡単なコマンドラインツール</entry> <entry>ユーザのパスワードを変更する簡単なコマンドラインツール</entry>
</row> </row>
<row> <row>
<entry><command>pw</command></entry> <entry>&man.pw.8;</entry>
<entry>ユーザアカウントのあらゆる箇所を変更する強力で柔軟なツール</entry> <entry>ユーザアカウントのあらゆる箇所を変更する強力で柔軟なツール</entry>
</row> </row>
</tbody> </tbody>
@ -392,7 +392,7 @@
</informaltable> </informaltable>
<sect2 id="users-adduser"> <sect2 id="users-adduser">
<title>adduser</title> <title><command>adduser</command></title>
<indexterm> <indexterm>
<primary>アカウント</primary> <primary>アカウント</primary>
@ -405,7 +405,7 @@
<primary><filename class=directory>/usr/share/skel</filename></primary> <primary><filename class=directory>/usr/share/skel</filename></primary>
</indexterm> </indexterm>
<indexterm><primary>スケルトンディレクトリ</primary></indexterm> <indexterm><primary>スケルトンディレクトリ</primary></indexterm>
<para><command>adduser</command> は、 <para>&man.adduser.8; は、
新しいユーザを登録するためのシンプルなプログラムです。 新しいユーザを登録するためのシンプルなプログラムです。
このプログラムは、システムの <filename>passwd</filename> と このプログラムは、システムの <filename>passwd</filename> と
<filename>group</filename> ファイルに新しい項目を作成します。 <filename>group</filename> ファイルに新しい項目を作成します。
@ -422,16 +422,16 @@
とします<footnote> とします<footnote>
<para>オプション <option>-s</option> をつけると、 <para>オプション <option>-s</option> をつけると、
デフォルトで詳細を表示しないように デフォルトで詳細を表示しないように
<command>adduser</command> を設定します。 &man.adduser.8; を設定します。
この後に詳細を表示させるようにしたい場合は、 この後に詳細を表示させるようにしたい場合は、
オプション <option>-v</option> を指定してください。</para> オプション <option>-v</option> を指定してください。</para>
</footnote>。 </footnote>。
そして次に <application>adduser</application> そして次に &man.adduser.8;
のデフォルト設定を行ない、最初のユーザアカウントを作成します。 のデフォルト設定を行ない、最初のユーザアカウントを作成します。
システムを日常利用する際に <username>root</username> を用いるのは最悪です。</para> システムを日常利用する際に <username>root</username> を用いるのは最悪です。</para>
<example> <example>
<title>adduser の設定</title> <title><command>adduser</command> の設定</title>
<screen>&prompt.root; <userinput>adduser -v</userinput> <screen>&prompt.root; <userinput>adduser -v</userinput>
Use option ``-silent'' if you don't want to see all warnings and questions. Use option ``-silent'' if you don't want to see all warnings and questions.
@ -486,7 +486,7 @@ Goodbye!
新しいユーザにウェルカムメッセージのメールを送付しないようにしました。 新しいユーザにウェルカムメッセージのメールを送付しないようにしました。
そしてその設定を保存し、 そしてその設定を保存し、
<username>jru</username> 用のアカウントを作成し、 <username>jru</username> 用のアカウントを作成し、
<username>jru</username> が (彼女が <command>su</command> <username>jru</username> が (彼女が &man.su.1;
コマンドで <username>root</username> の役割を果たせるように) コマンドで <username>root</username> の役割を果たせるように)
<username>wheel</username> <username>wheel</username>
グループに所属することを確認しました。</para> グループに所属することを確認しました。</para>
@ -498,7 +498,7 @@ Goodbye!
</note> </note>
<note> <note>
<para>これ以降はオプション引数をつけず単に <command>adduser</command> <para>これ以降はオプション引数をつけず単に &man.adduser.8;
を起動します。 を起動します。
デフォルト設定を変更する必要はありません。 デフォルト設定を変更する必要はありません。
もし、adduser がデフォルト設定を変更するかどうか尋ねてきたら、 もし、adduser がデフォルト設定を変更するかどうか尋ねてきたら、
@ -508,7 +508,7 @@ Goodbye!
</sect2> </sect2>
<sect2 id="users-rmuser"> <sect2 id="users-rmuser">
<title><application>rmuser</application></title> <title><command>rmuser</command></title>
<indexterm><primary><command>rmuser</command></primary></indexterm> <indexterm><primary><command>rmuser</command></primary></indexterm>
<indexterm> <indexterm>
@ -516,9 +516,9 @@ Goodbye!
<secondary>削除</secondary> <secondary>削除</secondary>
</indexterm> </indexterm>
<para><command>rmuser</command> を使えば、 <para>&man.rmuser.8; を使えば、
システムから完全にユーザを削除できます。 システムから完全にユーザを削除できます。
<command>rmuser</command> は、次の手順を実行します。</para> &man.rmuser.8; は、次の手順を実行します。</para>
<procedure> <procedure>
<step> <step>
@ -574,7 +574,7 @@ Goodbye!
</procedure> </procedure>
<para>スーパユーザアカウントの削除に <para>スーパユーザアカウントの削除に
<command>rmuser</command> を利用することはできません。 &man.rmuser.8; を利用することはできません。
スーパユーザアカウントの削除はほとんどすべての場合、 スーパユーザアカウントの削除はほとんどすべての場合、
大規模なシステムの破壊を意味するからです。 大規模なシステムの破壊を意味するからです。
</para> </para>
@ -584,11 +584,11 @@ Goodbye!
</para> </para>
<example> <example>
<title>rmuser による対話的なアカウントの削除</title> <title><command>rmuser</command> による対話的なアカウントの削除</title>
<screen>&prompt.root; <userinput>rmuser jru</userinput> <screen>&prompt.root; <userinput>rmuser jru</userinput>
Matching password entry: Matching password entry:
jru:*:1001:1001::0:0:J. Random User:/home/jru:/usr/local/bin/tcsh jru:*:1001:1001::0:0:J. Random User:/home/jru:/usr/local/bin/zsh
Is this the entry you wish to remove? <userinput>y</userinput> Is this the entry you wish to remove? <userinput>y</userinput>
Remove user's home directory (/home/jru)? <userinput>y</userinput> Remove user's home directory (/home/jru)? <userinput>y</userinput>
Updating password file, updating databases, done. Updating password file, updating databases, done.
@ -602,37 +602,36 @@ Removing files belonging to jru from /var/tmp/vi.recover: done.
</sect2> </sect2>
<sect2 id="users-chpass"> <sect2 id="users-chpass">
<title><application>chpass</application></title> <title><command>chpass</command></title>
<indexterm><primary><command>chpass</command></primary></indexterm> <indexterm><primary><command>chpass</command></primary></indexterm>
<para><command>chpass</command> は、 <para>&man.chpass.1; は、
パスワード、シェル、その他の個人情報といった、 パスワード、シェル、その他の個人情報といった、
ユーザデータベース情報を変更します。 ユーザデータベース情報を変更します。
</para> </para>
<para>システム管理者に限りスーパユーザ権限で <para>システム管理者に限りスーパユーザ権限で
<command>chpass</command> を用い、 &man.chpass.1; を用い、
他のユーザの情報やパスワードを変更できます。</para> 他のユーザの情報やパスワードを変更できます。</para>
<para>ユーザ名の他にオプションを指定しないと、 <para>ユーザ名の他にオプションを指定しないと、
<command>chpass</command> &man.chpass.1; はユーザ情報を編集するエディタを表示します。
はユーザ情報を編集するエディタを表示します。
ユーザがエディタを終了すると、 ユーザがエディタを終了すると、
ユーザデータベースが新しい情報に更新されます。</para> ユーザデータベースが新しい情報に更新されます。</para>
<example> <example>
<title>スーパユーザによる対話的な chpass</title> <title>スーパユーザによる対話的な <command>chpass</command></title>
<screen>#Changing user database information for jru. <screen>#Changing user database information for jru.
Login: jru Login: jru
Password: * Password: *
Uid [#]: 1000 Uid [#]: 1001
Gid [# or name]: 1000 Gid [# or name]: 1001
Change [month day year]: Change [month day year]:
Expire [month day year]: Expire [month day year]:
Class: Class:
Home directory: /home/jru Home directory: /home/jru
Shell: /usr/local/bin/tcsh Shell: /usr/local/bin/zsh
Full Name: J. Random User Full Name: J. Random User
Office Location: Office Location:
Office Phone: Office Phone:
@ -645,10 +644,10 @@ Other information:</screen>
</para> </para>
<example> <example>
<title>通常のユーザによる対話的な chpass</title> <title>通常のユーザによる対話的な <command>chpass</command></title>
<screen>#Changing user database information for jru. <screen>#Changing user database information for jru.
Shell: /usr/local/bin/tcsh Shell: /usr/local/bin/zsh
Full Name: J. Random User Full Name: J. Random User
Office Location: Office Location:
Office Phone: Office Phone:
@ -657,13 +656,9 @@ Other information:</screen>
</example> </example>
<note> <note>
<para><command>chfn</command>、 <para>&man.chfn.1;, &man.chsh.1; はいずれも、単に &man.chpass.1;
<command>chsh</command> はいずれも、
単に <command>chpass</command>
へのハードリンクになっています。 へのハードリンクになっています。
また、<command>ypchpass</command>、 また、&man.ypchpass.1;, &man.ypchfn.1; および &man.ypchsh.1; も同様です。
<command>ypchfn</command> および
<command>ypchsh</command> も同様です。
NIS のサポートは自動的に行なわれますので、 NIS のサポートは自動的に行なわれますので、
コマンドの先頭に <literal>yp</literal> コマンドの先頭に <literal>yp</literal>
をつける必要はありません。 をつける必要はありません。
@ -674,14 +669,14 @@ Other information:</screen>
</sect2> </sect2>
<sect2 id="users-passwd"> <sect2 id="users-passwd">
<title>パスワードの変更</title> <title><command>passwd</command></title>
<indexterm><primary><command>passwd</command></primary></indexterm> <indexterm><primary><command>passwd</command></primary></indexterm>
<indexterm> <indexterm>
<primary>アカウント</primary> <primary>アカウント</primary>
<secondary>パスワードの変更</secondary> <secondary>パスワードの変更</secondary>
</indexterm> </indexterm>
<para><command>passwd</command> は、 <para>&man.passwd.1; は、
ユーザが自分のパスワードを変更する通常の方法です。 ユーザが自分のパスワードを変更する通常の方法です。
スーパユーザ権限では、 スーパユーザ権限では、
他のユーザのパスワードを変更するのに使われます。 他のユーザのパスワードを変更するのに使われます。
@ -719,22 +714,20 @@ passwd: done</screen>
</example> </example>
<note> <note>
<para><command>chpass</command> 同様、 <para>&man.chpass.1; 同様、&man.yppasswd.1; は、単に
<command>yppasswd</command> は、単に &man.passwd.1; へのハードリンクになっていますので、
<command>passwd</command>
へのハードリンクになっていますので、
NIS はどちらのコマンドでも動作します。</para> NIS はどちらのコマンドでも動作します。</para>
</note> </note>
</sect2> </sect2>
<sect2 id="users-pw"> <sect2 id="users-pw">
<title><application>pw</application></title> <title><command>pw</command></title>
<indexterm><primary><command>pw</command></primary></indexterm> <indexterm><primary><command>pw</command></primary></indexterm>
<para>&man.pw.8; は、ユーザやグループの作成、削除、 <para>&man.pw.8; は、ユーザやグループの作成、削除、
変更および表示を行なうコマンドラインのユーティリティです。 変更および表示を行なうコマンドラインのユーティリティです。
これは、システムユーザファイルやシステムグループファイルの これは、システムユーザファイルやシステムグループファイルの
フロントエンドとして働きます。<command>pw</command> フロントエンドとして働きます。&man.pw.8;
はとても強力な一連のコマンドラインオプションを有しており、 はとても強力な一連のコマンドラインオプションを有しており、
シェルスクリプトで使うのに向いていますが、新しいユーザは、 シェルスクリプトで使うのに向いていますが、新しいユーザは、
ここで紹介されている他のコマンドに比べて難しいと感じるかもしれません。</para> ここで紹介されている他のコマンドに比べて難しいと感じるかもしれません。</para>
@ -750,11 +743,11 @@ passwd: done</screen>
<primary>アカウント</primary> <primary>アカウント</primary>
<secondary>制限</secondary> <secondary>制限</secondary>
</indexterm> </indexterm>
<para>あなたがマルチユーザシステムを運用しているのなら、 <para>ユーザがいるなら、
どのユーザもシステムに損害を与えないという信頼はおいていないのではないでしょうか。 彼らに対してシステムの利用を制限できないか考えたことがあるのではないでしょうか。
FreeBSD は、 FreeBSD は、
個々のユーザが利用できるシステムのリソースをシステム管理者が制限する方法をいくつも用意しています。 個々のユーザが利用できるシステム資源の量を管理者が制限できる方法をいくつも用意しています。
その種の制限は一般的には、ディスククォータ (quota) その種の制限は、ディスククォータ (quota) とその他の資源の制限の
とその他のリソースの制限の 2 つに分けられます。</para> とその他のリソースの制限の 2 つに分けられます。</para>
<indexterm><primary>クォータ (quotas)</primary></indexterm> <indexterm><primary>クォータ (quotas)</primary></indexterm>
@ -762,10 +755,9 @@ passwd: done</screen>
<primary>ユーザに対する制限</primary> <primary>ユーザに対する制限</primary>
<secondary>クォータ</secondary> <secondary>クォータ</secondary>
</indexterm> </indexterm>
<indexterm><primary>disk quotas</primary></indexterm> <indexterm><primary>ディスククォータ</primary></indexterm>
<para>ディスククォータは、 <para>ディスククォータは、ユーザのディスクの利用を制限し、
システム管理者がファイルシステムにユーザが使用できるディスク領域の量を指示する手段です。 その都度計算しなくてもユーザのディスク使用量を簡単に確認できる手段も提供しています。
さらに、その都度測定しなくてもユーザのディスク使用量を簡単に確認できる手段も提供しています。
クォータについては、<xref linkend="quotas"> で解説しています。</para> クォータについては、<xref linkend="quotas"> で解説しています。</para>
<para>その他のリソースの制限とは、ユーザが消費できる <para>その他のリソースの制限とは、ユーザが消費できる
@ -885,7 +877,7 @@ passwd: done</screen>
</indexterm> </indexterm>
<para>ユーザが実行できるプロセス数の上限です。 <para>ユーザが実行できるプロセス数の上限です。
フォアグラウンドプロセスとバックグラウンドプロセスの両方を平等に扱います。 フォアグラウンドプロセスとバックグラウンドプロセスの両方を平等に扱います。
自明な理由から、<command>sysctl</command> 変数 自明な理由から、&man.sysctl.8; 変数
<varname>kern.maxproc</varname> <varname>kern.maxproc</varname>
で指定されたシステムの制限を超えることはできません。 で指定されたシステムの制限を超えることはできません。
また、同時に複数ログインすることや、 また、同時に複数ログインすることや、
@ -948,7 +940,7 @@ passwd: done</screen>
IPC チャンネルを表わすのにも使われています。 IPC チャンネルを表わすのにも使われています。
ですから、あまり低い値に設定しないよう注意してください。 ですから、あまり低い値に設定しないよう注意してください。
これに対応するシステム全体の制限は これに対応するシステム全体の制限は
<command>sysctl</command> 変数 &man.sysctl.8; 変数
<varname>kern.maxfiles</varname> で定義されています。</para> <varname>kern.maxfiles</varname> で定義されています。</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -1057,12 +1049,12 @@ passwd: done</screen>
<secondary>グループ</secondary> <secondary>グループ</secondary>
</indexterm> </indexterm>
<para>グループとは、単にユーザを羅列したものです。 <para>グループとは、単にユーザを羅列したものです。
グループは、グループ名と gid (グループ ID) で識別されます。 グループは、グループ名と GID (グループ ID) で識別されます。
FreeBSD (と他の Unix システムのほとんど) では、 FreeBSD (と他の &unix; システムのほとんど) では、
あるプロセスが何かするのを許可するかどうかをカーネルが判断する際に利用する あるプロセスが何かするのを許可するかどうかをカーネルが判断する際に利用する
2 つの因子は、ユーザ ID とそのユーザが所属するグループの一覧です。 2 つの因子は、ユーザ ID とそのユーザが所属するグループの一覧です。
ユーザ ID と異なり、プロセスはそのプロセスに関係付けられたグループの一覧を持ちます。 ユーザ ID と異なり、プロセスはそのプロセスに関係付けられたグループの一覧を持ちます。
どこかで "グループ ID" に触れているのを聞くことがあるでしょうが、 どこかで <quote>グループ ID</quote> に触れているのを聞くことがあるでしょうが、
ほとんどの場合は、これは単に一覧の最初のグループを指しています。</para> ほとんどの場合は、これは単に一覧の最初のグループを指しています。</para>
<para>グループ名からグループ ID への写像は <para>グループ名からグループ ID への写像は
@ -1085,8 +1077,8 @@ passwd: done</screen>
<example> <example>
<title>&man.pw.8; によるグループの追加</title> <title>&man.pw.8; によるグループの追加</title>
<screen>&prompt.root; <userinput><command>pw</command> groupadd <groupname>teamtwo</groupname></userinput> <screen>&prompt.root; <userinput>pw groupadd teamtwo</userinput>
&prompt.root; <userinput><command>pw</command> groupshow <groupname>teamtwo</groupname></userinput> &prompt.root; <userinput>pw groupshow teamtwo</userinput>
teamtwo:*:1100:</screen> teamtwo:*:1100:</screen>
</example> </example>
@ -1100,8 +1092,8 @@ teamtwo:*:1100:</screen>
<example> <example>
<title>&man.pw.8; によるグループへのユーザ追加</title> <title>&man.pw.8; によるグループへのユーザ追加</title>
<screen>&prompt.root; <userinput><command>pw</command> groupmod <groupname>teamtwo</groupname> <option>-M</option> <username>jru</username></userinput> <screen>&prompt.root; <userinput>pw groupmod teamtwo -M jru</userinput>
&prompt.root; <userinput><command>pw</command> groupshow <groupname>teamtwo</groupname></userinput> &prompt.root; <userinput>pw groupshow teamtwo</userinput>
teamtwo:*:1100:jru</screen> teamtwo:*:1100:jru</screen>
</example> </example>
@ -1110,7 +1102,7 @@ teamtwo:*:1100:jru</screen>
前の節から、 前の節から、
パスワードファイルに各ユーザのグループが記載されていることがわかります。 パスワードファイルに各ユーザのグループが記載されていることがわかります。
前者 (ユーザ) は、システムが自動的にグループ一覧に追加します。 前者 (ユーザ) は、システムが自動的にグループ一覧に追加します。
&man.pw.8; の <command>groupshow</command> コマンドを使った時は、 &man.pw.8; の <option>groupshow</option> コマンドを使った時は、
そのユーザはグループの一員として表示されませんが、&man.id.1; そのユーザはグループの一員として表示されませんが、&man.id.1;
などのツールを使って情報を問い合わせれば、 などのツールを使って情報を問い合わせれば、
その情報を引き出せます。つまり、&man.pw.8; は その情報を引き出せます。つまり、&man.pw.8; は
@ -1120,7 +1112,7 @@ teamtwo:*:1100:jru</screen>
<example> <example>
<title>グループに所属しているユーザを調べるための &man.id.1; の使い方</title> <title>グループに所属しているユーザを調べるための &man.id.1; の使い方</title>
<screen>&prompt.user; <userinput><command>id</command> <username>jru</username></userinput> <screen>&prompt.user; <userinput>id jru</userinput>
uid=1001(jru) gid=1001(jru) groups=1001(jru), 1100(teamtwo)</screen> uid=1001(jru) gid=1001(jru) groups=1001(jru), 1100(teamtwo)</screen>
</example> </example>