OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / gnumaniak / draft / man1 / su.1
1 .\" You may copy, distribute and modify under the terms of the LDP General
2 .\" Public License as specified in the LICENSE file that comes with the
3 .\" gnumaniak distribution
4 .\"
5 .\" The author kindly requests that no comments regarding the "better"
6 .\" suitability or up-to-date notices of any info documentation alternative
7 .\" is added without contacting him first.
8 .\"
9 .\" (C) 1999-2002 Ragnar Hojland Espinosa <ragnar@ragnar-hojland.com>
10 .\"
11 .\"     GNU su man page
12 .\"     man pages are NOT obsolete!
13 .\"     <ragnar@ragnar-hojland.com>
14 .\"
15 .\" Japanese Version Copyright (c) 2000 NAKANO Takeo all rights reserved.
16 .\" Translated Sun 12 Mar 2000 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
17 .\" 
18 .TH su 1 "18 June 2002" "GNU Shell Utilities 2.1"
19 .\"O .SH NAME
20 .\"O su \- run a command with substitute user and group id
21 .SH 名前
22 su \- ユーザー ID とグループ ID を変更してシェルを起動する
23 .\"O .SH SYNOPSIS
24 .SH 書式
25 .B su
26 .BI "[\-] [\-flmp] [\-c " command "] [\-s " shell "] [\-\-fast] [\-\-login]"
27 .B [\-\-preserve-environment]
28 .BI "[\-\-command=" command "] [\-\-shell=" shell "]"
29 .BI [ user " [" arg... ]]
30 .sp
31 .\"O .B su [\-\-help] [\-\-version]
32 .\"O .SH DESCRIPTION
33 .SH 説明
34 .\"O .B su
35 .\"O allows one user to temporarily become another user.  It runs a command
36 .\"O (ofter an interactive shell) with the real and effective user id, group
37 .\"O id, and supplemental groups of 
38 .\"O .IR user . 
39 .B su
40 はあるユーザーが一時的に他のユーザになるために用いられる。
41 .B su
42
43 .I user
44 の実ユーザー ID、実効ユーザー ID、グループ ID、および所属グループ
45 の権限を与えてコマンドを実行する (対話式のシェルであることが多い)。
46 .PP
47 .\"O If no
48 .\"O .I user
49 .\"O is given, the default is root, the super-user.
50 .\"O The shell run is taken from 
51 .\"O .IR user 's 
52 .\"O password entry, or /bin/sh if none is specified there.  If 
53 .\"O .I user 
54 .\"O has a password,
55 .\"O .B su
56 .\"O prompts for the password unless run by a user with real user id 0 (the
57 .\"O super-user).
58 .I user
59 が与えられなかった場合、デフォルトは root すなわちスーパーユーザーである。
60 実行されるシェルは
61 .I user
62 のパスワードエントリから選択される。ここに何も書かれていない場合は
63 /bin/sh が実行される。
64 .I user
65 にパスワードがある場合には、
66 .B su
67 はパスワードを要求するプロンプトを表示する。ただし
68 .B su
69 を実行したのが実ユーザー ID 0 (スーパーユーザー) の場合には
70 パスワード認証は行われない。
71 .PP
72 .\"O By default,
73 .\"O .B su
74 .\"O does not change the current directory.  It sets the environment
75 .\"O variables 
76 .\"O .BR "HOME " and 
77 .\"O .B SHELL
78 .\"O from the password entry for 
79 .\"O .IR user ", and if " user " is not the super-user, sets "
80 .\"O .BR USER " and " LOGNAME " to " 
81 .\"O .IR user .
82 .\"O By default, the shell is not a login shell.
83 .B su
84 はデフォルトではカレントディレクトリを変更しない。また
85 .B su
86
87 環境変数
88 .BR HOME " と " SHELL
89
90 .I user
91 のパスワードエントリの値にセットする。また
92 .I user
93 がスーパーユーザー以外の場合には、環境変数
94 .BR USER " と " LOGNAME
95
96 .I user
97 にセットする。デフォルトでは、
98 起動されるシェルはログインシェルにはならない。
99 .PP
100 .\"O Any additional arguments are passed as additional arguments to the shell.
101 その他に引き数が与えられた場合には、それらはシェルに渡され、
102 引き数としてシェルに付加される。
103 .PP
104 .\"O .B su
105 .\"O does not handle /bin/sh or other shells specially
106 .\"O (setting argv[0] to 
107 .\"O .BR \-su ", passing " \-c " only to certain shells, etc.)."
108 .B su
109 は /bin/sh あるいはそれ以外のいかなるシェルも特別には扱わない
110 (argv[0] に "-su" を設定したり、あるシェルにだけ -c を渡したり、
111 といったことはしない)。
112 .PP
113 .\"O On systems that have 
114 .\"O .RB syslog (3) ,
115 .\"O .B su
116 .\"O can be compiled to report failed, and optionally successful,
117 .\"O .B su
118 .\"O attempts using syslog.
119 .BR syslog (3)
120 に対応しているシステムでは、
121 .B su
122 が失敗したとき
123 syslog にレポートするようにコンパイルすることができる
124 (成功をレポートするようにもできる)。
125 .\"O .SH OPTIONS
126 .SH オプション
127 .TP
128 .BI "\-c " command ", \-\-command=" command
129 .\"O Pass 
130 .\"O .IR command,
131 .\"O a single command line to run, to the shell with a
132 .\"O .B \-c
133 .\"O option instead of starting an interactive shell.
134 対話的なシェルを起動するのではなく、シェルに
135 .I \-c
136 オプションとともに
137 .I command
138 (実行されるコマンドライン一行) を渡す。
139 .TP
140 .B "\-f, \-\-fast"
141 .\"O Pass the
142 .\"O .B \-f
143 .\"O option to the shell.  This probably only makes sense with
144 .\"O .BR csh (1)
145 .\"O and
146 .\"O .BR tcsh (1),
147 .\"O for which the
148 .\"O .B \-f
149 .\"O option prevents reading the startup file (.cshrc).  With Bourne-like
150 .\"O shells, the
151 .\"O .B \-f
152 .\"O option disables filename pattern expansion (globbing), which is not a
153 .\"O generally desirable thing to do.
154 シェルに
155 .I \-f
156 オプションを渡す。これはおそらく
157 .BR csh (1)
158
159 .BR tcsh (1)
160 でのみ意味を持つ。これらのシェルでは
161 .I \-f
162 オプションを指定すると、スタートアップファイル (.cshrc) を読み込まない。
163 Bourne 系のシェルでは
164 .I \-f
165 オプションはファイル名パターンの展開 (glob) を抑制する。
166 これは大抵の場合は望ましい動作ではないだろう。
167 .TP
168 .B "\-, \-l, \-\-login"
169 .\"O Make the shell a login shell.  This means the following.  Unset all
170 .\"O environment variables except 
171 .\"O .BR TERM ", " HOME ", and " SHELL
172 .\"O (which are set as described above), and 
173 .\"O .BR USER " and " LOGNAME
174 .\"O (which are set, even for the super-user, as described above), and set
175 .\"O .B PATH
176 .\"O to a compiled-in default value.  Change to 
177 .\"O .IR user 's 
178 .\"O home directory.  Prepend
179 .\"O .B \- 
180 .\"O to the shell's name, to make it read its login startup file(s).
181 シェルをログインシェルにする。すなわち以下のような取り扱いをする:
182 すべての環境変数を解除する。その上で
183 .BR TERM ", " HOME ", " SHELL
184 を前述のように設定し、
185 .BR USER ", " LOGNAME
186 を同じく前述のように (スーパーユーザーであっても) 設定する。
187 続いて
188 .B PATH
189 をコンパイル時のデフォルト値に設定する。ディレクトリを
190 .I user
191 のホームディレクトリに変更する。シェル名の前に `-' を付加し、
192 シェルにログイン時のスタートアップファイルを読ませる。
193 .TP
194 .B "\-m, \-p, \-\-preserve\-environment"
195 .\"O Do not change the environment variables 
196 .\"O .BR HOME ", " USER ", " LOGNAME ", or " SHELL .
197 .\"O Run the shell given in the environment variable 
198 .\"O .B SHELL
199 .\"O instead of 
200 .\"O .IR user 's 
201 .\"O shell from /etc/passwd, unless the user running
202 .\"O .B su
203 .\"O is not the superuser and 
204 .\"O .IR user 's 
205 .\"O shell is restricted.  A restricted shell is one that is not listed in the
206 .\"O file /etc/shells, or in a compiled-in list if that file does not exist.
207 .\"O Parts of what this option does can be overridden by
208 .\"O .B \-\-login
209 .\"O and
210 .\"O .BR \-\-shell .
211 環境変数
212 .BR  HOME ", " USER ", " LOGNAME ", " SHELL
213 を変更しない。
214 /etc/passwd で指定されている
215 .I user
216 のシェルではなく、現在の環境変数
217 .B SHELL
218 で指定されているシェルを実行する。ただし
219 .B su
220 を実行するユーザーがスーパーユーザではなく、
221 .I user
222 によるシェルの実行が制限されている場合はこの限りではない。
223 実行が制限されているシェルとは、
224 /etc/shells にリストされていないシェル、あるいは
225 /etc/shells がなければコンパイル時の指定リストに存在しないシェルのことである。
226 このオプションが実行する作業の一部は
227 .B \-\-login
228 または
229 .B \-\-shell
230 によって上書きされる。
231 .TP
232 .BI "\-s, \-\-shell " shell
233 .\"O .RI "Run " shell " instead of " user 's
234 .\"O shell from /etc/passwd, unless the user running
235 .\"O .B su
236 .\"O is not the superuser and 
237 .\"O .IR user 's
238 .\"O shell is restricted.
239 /etc/passwd に記述された
240 .I user
241 のシェルの代わりに
242 .I shell
243 を実行する。ただし
244 .B su
245 を実行するユーザーがスーパーユーザではなく、
246 .I user
247 によるシェルの実行が制限されている場合はこの限りではない。
248 .TP
249 .B "\-\-help"
250 .\"O Print a usage message on standard output and exit successfully.
251 標準出力に使用方法のメッセージを出力して正常終了する。
252 .TP
253 .B "\-\-version"
254 .\"O Print version information on standard output then exit successfully.
255 標準出力にバージョン情報を出力して正常終了する。
256 .\"O .SH Why GNU su does not support the wheel group (by Richard Stallman)
257 .SH "GNU su で wheel グループをサポートしないわけ (Richard Stallman)"
258 .\"O Sometimes a few of the users try to hold total power over all the
259 .\"O rest.  For example, in 1984, a few users at the MIT AI lab decided to
260 .\"O seize power by changing the operator password on the Twenex system and
261 .\"O keeping it secret from everyone else.  (I was able to thwart this coup
262 .\"O and give power back to the users by patching the kernel, but I
263 .\"O wouldn't know how to do that in Unix.)
264 ときおり、少数のユーザーによって、
265 他のユーザーに対する全権を掌握しようとする試みがなされることがある。
266 例えば 1984 年、 MIT AI ラボの少数のユーザーは
267 Twenex システムのオペレーターパスワードの変更権限を強奪し、
268 これを他のユーザーから秘匿することに決定した
269 (この際には私はこのクーデターの裏をかき、
270 カーネルにパッチを当てて権限を取り返すことに成功した。
271 しかしこれが Unix であったら、私にはどうすればよいかわからなかっただろう)。
272 .PP
273 .\"O However, occasionally the rulers do tell someone.  Under the usual su
274 .\"O mechanism, once someone learns the root password who sympathizes with
275 .\"O the ordinary users, he can tell the rest.  The "wheel group" feature
276 .\"O would make this impossible, and thus cement the power of the rulers.
277 しかしながら、時には専制者も秘密を漏らすものである。
278 通常の su のメカニズムでは、
279 一般ユーザーの側に立つ者が root のパスワードを知れば、
280 これを他のユーザーにも知らせることができる。
281 しかし "wheel group" 機能はこれを不可能にし、
282 結果として専制者達の権限を強固たるものにしてしまう。
283 .PP
284 .\"O I'm on the side of the masses, not that of the rulers.  If you are
285 .\"O used to supporting the bosses and sysadmins in whatever they do, you
286 .\"O might find this idea strange at first.
287 私は大衆の側に立つものであり、専制的な立場には反対する。
288 あなたはボスやシステム管理者のやり口に従うことに慣れているかも知れないが、
289 その場合はまずそのこと自身を不思議に思うべきではないだろうか。
290 .\"O .SH NOTES
291 .SH 注意
292 .\"O Report bugs to bug-sh-utils@gnu.org.
293 .\"O Page updated by Ragnar Hojland Espinosa <ragnar@ragnar-hojland.com>
294 プログラムのバグについては bug-sh-utils@gnu.org に報告してください。
295 ページの更新は Ragnar Hojland Espinosa <ragnar@ragnar-hojland.com> が行っています。