OSDN Git Service

sudo: Drafts posted in [JM:00631] to [JM:00635].
[linuxjm/jm.git] / manual / sudo / draft / man5 / sudoers.5
1 .\" Copyright (c) 1994-1996, 1998-2005, 2007-2012
2 .\"     Todd C. Miller <Todd.Miller@courtesan.com>
3 .\" 
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
7 .\" 
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16 .\" 
17 .\" Sponsored in part by the Defense Advanced Research Projects
18 .\" Agency (DARPA) and Air Force Research Laboratory, Air Force
19 .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
20 .\" 
21 .\" Japanese Version Copyright (c) 2000-2002 Yuichi SATO
22 .\"   and 2009 Yoichi Chonan
23 .\"         all rights reserved.
24 .\" Translated Sat Oct  7 14:39:18 JST 2000
25 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
26 .\" Updated & Modified Fri Dec  6 04:40:44 JST 2002 by Yuichi SATO
27 .\" New Translation (sudo-1.6.9p17) Fri Jan 23 10:31:17 JST 2009
28 .\"         by Yoichi Chonan <cyoichi@maple.ocn.ne.jp>
29 .\" Updated & Modified (sudo-1.7.2p1) Sat Nov 14 21:15:16 JST 2009
30 .\"         by Yoichi Chonan
31 .\" Modified Tue Nov 24 20:00:00 JST 2009 by Yoichi Chonan
32 .\" Updated & Modified (sudo-1.8.4p4) Sun Apr  1 15:31:07 JST 2012
33 .\"         by Yoichi Chonan
34 .\"
35 .nr SL 0
36 .nr BA 0
37 .nr LC 0
38 .\"
39 .\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
40 .\"
41 .\" Standard preamble:
42 .\" ========================================================================
43 .de Sp \" Vertical space (when we can't use .PP)
44 .if t .sp .5v
45 .if n .sp
46 ..
47 .de Vb \" Begin verbatim text
48 .ft CW
49 .nf
50 .ne \\$1
51 ..
52 .de Ve \" End verbatim text
53 .ft R
54 .fi
55 ..
56 .\" Set up some character translations and predefined strings.  \*(-- will
57 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
58 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
59 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
60 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
61 .\" nothing in troff, for use with C<>.
62 .tr \(*W-
63 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
64 .ie n \{\
65 .    ds -- \(*W-
66 .    ds PI pi
67 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
68 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
69 .    ds L" ""
70 .    ds R" ""
71 .    ds C` 
72 .    ds C' 
73 'br\}
74 .el\{\
75 .    ds -- \|\(em\|
76 .    ds PI \(*p
77 .    ds L" ``
78 .    ds R" ''
79 'br\}
80 .\"
81 .\" Escape single quotes in literal strings from groff's Unicode transform.
82 .ie \n(.g .ds Aq \(aq
83 .el       .ds Aq '
84 .\"
85 .\" If the F register is turned on, we'll generate index entries on stderr for
86 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
87 .\" entries marked with X<> in POD.  Of course, you'll have to process the
88 .\" output yourself in some meaningful fashion.
89 .ie \nF \{\
90 .    de IX
91 .    tm Index:\\$1\t\\n%\t"\\$2"
92 ..
93 .    nr % 0
94 .    rr F
95 .\}
96 .el \{\
97 .    de IX
98 ..
99 .\}
100 .\"
101 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
102 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
103 .    \" fudge factors for nroff and troff
104 .if n \{\
105 .    ds #H 0
106 .    ds #V .8m
107 .    ds #F .3m
108 .    ds #[ \f1
109 .    ds #] \fP
110 .\}
111 .if t \{\
112 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
113 .    ds #V .6m
114 .    ds #F 0
115 .    ds #[ \&
116 .    ds #] \&
117 .\}
118 .    \" simple accents for nroff and troff
119 .if n \{\
120 .    ds ' \&
121 .    ds ` \&
122 .    ds ^ \&
123 .    ds , \&
124 .    ds ~ ~
125 .    ds /
126 .\}
127 .if t \{\
128 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
129 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
130 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
131 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
132 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
133 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
134 .\}
135 .    \" troff and (daisy-wheel) nroff accents
136 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
137 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
138 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
139 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
140 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
141 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
142 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
143 .ds ae a\h'-(\w'a'u*4/10)'e
144 .ds Ae A\h'-(\w'A'u*4/10)'E
145 .    \" corrections for vroff
146 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
147 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
148 .    \" for low resolution devices (crt and lpr)
149 .if \n(.H>23 .if \n(.V>19 \
150 \{\
151 .    ds : e
152 .    ds 8 ss
153 .    ds o a
154 .    ds d- d\h'-1'\(ga
155 .    ds D- D\h'-1'\(hy
156 .    ds th \o'bp'
157 .    ds Th \o'LP'
158 .    ds ae ae
159 .    ds Ae AE
160 .\}
161 .rm #[ #] #H #V #F C
162 .\" ========================================================================
163 .\"
164 .IX Title "SUDOERS 5"
165 .TH SUDOERS 5 "February  5, 2012" "1.8.4" "MAINTENANCE COMMANDS"
166 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
167 .\" way too many mistakes in technical documents.
168 .if n .ad l
169 .nh
170 .\"O .SH "NAME"
171 .SH "名前"
172 .\"O sudoers \- default sudo security policy module
173 sudoers \- デフォルトの sudo 用セキュリティ・ポリシー・モジュール
174 .\"O .SH "DESCRIPTION"
175 .SH "説明"
176 .IX Header "DESCRIPTION"
177 .\"O The \fIsudoers\fR policy module determines a user's \fBsudo\fR privileges.
178 .\"O It is the default \fBsudo\fR policy plugin.  The policy is driven by
179 .\"O the \fI/etc/sudoers\fR file or, optionally in \s-1LDAP\s0.  The policy
180 .\"O format is described in detail in the \*(L"\s-1SUDOERS\s0 \s-1FILE\s0 \s-1FORMAT\s0\*(R"
181 .\"O section.  For information on storing \fIsudoers\fR policy information
182 .\"O in \s-1LDAP\s0, please see \fIsudoers.ldap\fR\|(5).
183 \&\fIsudoers\fR ポリシー・モジュールは、デフォルトの \fBsudo\fR
184 用ポリシー・プラグインであり、このモジュールによってユーザがどんな
185 \&\fBsudo\fR 権限を持っているかの判定が行われる。ポリシーの運用は
186 \&\fI/etc/sudoers\fR ファイルによって行われるが、
187 \&\s-1LDAP\s0 を使用することも可能である。ポリシーを設定するときの書式は、
188 「SUDOERS ファイルの書式」セクションで詳しく説明している。
189 \&\fIsudoers\fR ポリシーの情報を \s-1LDAP\s0 に格納することについては、
190 \&\fIsudoers.ldap\fR\|(5) をご覧になるとよい。
191 .\"O .SS "Authentication and Logging"
192 .SS "認証とロギング"
193 .IX Subsection "Authentication and Logging"
194 .\"O The \fIsudoers\fR security policy requires that most users authenticate
195 .\"O themselves before they can use \fBsudo\fR.  A password is not required
196 .\"O if the invoking user is root, if the target user is the same as the
197 .\"O invoking user, or if the policy has disabled authentication for the
198 .\"O user or command.  Unlike \fIsu\fR\|(1), when \fIsudoers\fR requires
199 .\"O authentication, it validates the invoking user's credentials, not
200 .\"O the target user's (or root's) credentials.  This can be changed via
201 .\"O the \fIrootpw\fR, \fItargetpw\fR and \fIrunaspw\fR flags, described later.
202 .\"O .PP
203 \&\fIsudoers\fR セキュリティ・ポリシーでは、ユーザはたいていの場合、
204 \&\fBsudo\fR を使用できるようになる前に、本人であることを証明する必要がある。ただし、
205 \&\fBsudo\fR を実行するユーザが root だったり、変身対象ユーザが
206 \&\fBsudo\fR を実行するユーザと同一であったり、
207 ポリシーによってそのユーザやコマンドに対する認証が免除されている場合は、
208 パスワードは要求されない。\fIsu\fR\|(1) とは違って、
209 \&\fIsudoers\fR  ポリシーによる認証でチェックされるのは、
210 \&\fBsudo\fR を実行するユーザの認証情報 (訳注: 通常はパスワード)
211 であって、変身対象ユーザの (あるいは、root の) 認証情報ではない。
212 この動作は、後述する \fIrootpw\fR, \fItargetpw\fR, \fIrunaspw\fR
213 フラグによって変更することができる。
214 .PP
215 .\"O If a user who is not listed in the policy tries to run a command
216 .\"O via \fBsudo\fR, mail is sent to the proper authorities.  The address
217 .\"O used for such mail is configurable via the \fImailto\fR Defaults entry
218 .\"O (described later) and defaults to \f(CW\*(C`root\*(C'\fR.
219 .\"O .PP
220 ポリシーに登録されていないユーザが \fBsudo\fR を使ってコマンドを
221 実行しようとすると、しかるべき権威者にメールが送付される。
222 そうしたメールの宛先は、
223 後述する「デフォルト設定」の \fImailto\fR によって設定できるが、
224 デフォルトでは \f(CW\*(C`root\*(C'\fR になっている。
225 .PP
226 .\"O Note that mail will not be sent if an unauthorized user tries to
227 .\"O run \fBsudo\fR with the \fB\-l\fR or \fB\-v\fR option.  This allows users to
228 .\"O determine for themselves whether or not they are allowed to use
229 .\"O \&\fBsudo\fR.
230 .\"O .PP
231 \&\fBsudo\fR を使用する権限のないユーザが、\fB\-l\fR や \fB\-v\fR
232 オプションを付けて \fBsudo\fR の実行を試みても、
233 メールは送付されないことに注意してほしい。これによって、
234 自分が \fBsudo\fR を使用できるかどうか、
235 ユーザが自分で判断できるようになっているのである。
236 .PP
237 .\"O If \fBsudo\fR is run by root and the \f(CW\*(C`SUDO_USER\*(C'\fR environment variable
238 .\"O is set, the \fIsudoers\fR policy will use this value to determine who
239 .\"O the actual user is.  This can be used by a user to log commands 
240 .\"O through sudo even when a root shell has been invoked.  It also
241 .\"O allows the \fB\-e\fR option to remain useful even when invoked via a
242 .\"O sudo-run script or program.  Note, however, that the \fIsudoers\fR
243 .\"O lookup is still done for root, not the user specified by \f(CW\*(C`SUDO_USER\*(C'\fR.
244 .\"O .PP
245 \&\fBsudo\fR が root によって実行されたとき、環境変数
246 \&\f(CW\*(C`SUDO_USER\*(C'\fR が設定されていると、
247 \&\fIsudoers\fR ポリシーは実際のユーザが誰かを判定するのに、
248 その値を使用する。ユーザとしては、この動作を利用することで、
249 すでに root シェルが起動されている場合でも、
250 自分が \fBsudo\fR を介して実行したコマンドのログを取ることができる。
251 また、この動作のおかげで、
252 \&\fBsudo\fR で実行したスクリプトやプログラムから呼び出される場合でさえ、
253 \&\fB\-e\fR オプションが役に立つものになっている。とは言え、そうした場合でも、
254 \&\fIsudoers\fR の参照はやはり root に対してなされるのであって、
255 \&\f(CW\*(C`SUDO_USER\*(C'\fR が指定しているユーザに対してではないことに気をつけてほしい。
256 .PP
257 .\"O \&\fIsudoers\fR uses time stamp files for credential caching.  Once a
258 .\"O user has been authenticated, a time stamp is updated and the user
259 .\"O may then use sudo without a password for a short period of time
260 .\"O (\f(CW\*(C`5\*(C'\fR minutes unless overridden by the \fItimeout\fR option.
261 .\"O By default, \fIsudoers\fR uses a tty-based time stamp which means that
262 .\"O there is a separate time stamp for each of a user's login sessions.
263 .\"O The \fItty_tickets\fR option can be disabled to force the use of a
264 .\"O single time stamp for all of a user's sessions.
265 .\"O .PP
266 \&\fIsudoers\fR は認証情報の一時保存 (credential caching) のために
267 タイムスタンプ・ファイルを使用する。ユーザの認証が済むと、
268 タイムスタンプが更新され、ユーザはしばらくの間 (\fItimeout\fR
269 オプションによって変更されていなければ、\f(CW\*(C`5\*(C'\fR 分間)
270 パスワードなしで \fBsudo\fR を使うことができるようになる。\fIsudoers\fR は
271 デフォルトでは、tty ごとのタイムスタンプを使用する。すなわち、
272 ユーザの各ログイン・セッションごとに別のタイムスタンプが存在するわけだ。
273 \&\fItty_tickets\fR オプションを無効にすれば、
274 ユーザのすべてのセッションに対して単一のタイムスタンプの使用を強制することができる。
275 .PP
276 .\"O \&\fIsudoers\fR can log both successful and unsuccessful attempts (as well
277 .\"O as errors) to \fIsyslog\fR\|(3), a log file, or both.  By default, \fIsudoers\fR
278 .\"O will log via \fIsyslog\fR\|(3) but this is changeable via the \fIsyslog\fR
279 .\"O and \fIlogfile\fR Defaults settings.
280 .\"O .PP
281 \&\fIsudoers\fR は \fBsudo\fR の実行が成功したときも失敗したときも、
282 その事実を (エラー内容とともに)  \fIsyslog\fR\|(3) や 独自のログファイル、
283 あるいはその両方に記録することができる。\fIsudoers\fR はデフォルトでは、
284 \&\fIsyslog\fR\|(3) 経由でログを記録することになっているが、
285 この動作はデフォルト設定の \fIsyslog\fR と \fIlogfile\fR
286 を使って変更することが可能だ。
287 .PP
288 .\"O \&\fIsudoers\fR also supports logging a command's input and output
289 .\"O streams.  I/O logging is not on by default but can be enabled using
290 .\"O the \fIlog_input\fR and \fIlog_output\fR Defaults flags as well as the
291 .\"O \&\f(CW\*(C`LOG_INPUT\*(C'\fR and \f(CW\*(C`LOG_OUTPUT\*(C'\fR command tags.
292 \&\fIsudoers\fR はコマンドの入出力ストリームのロギングもサポートしている。
293 入出力ロギングは、デフォルトでは ON になっていないが、デフォルト設定の
294 \&\fIlog_input\fR や \fIlog_output\fR フラグを使って有効にすることができる。
295 コマンド・タグの \f(CW\*(C`LOG_INPUT\*(C'\fR や \f(CW\*(C`LOG_OUTPUT\*(C'\fR
296 を使って有効にすることも可能だ。
297 .\"O .SS "Command Environment"
298 .SS "コマンド環境"
299 .IX Subsection "Command Environment"
300 .\"O Since environment variables can influence program behavior, \fIsudoers\fR
301 .\"O provides a means to restrict which variables from the user's
302 .\"O environment are inherited by the command to be run.  There are two
303 .\"O distinct ways \fIsudoers\fR can deal with environment variables.
304 .\"O .PP
305 環境変数はプログラムの動作に影響を与えることがあるので、\fIsudoers\fR は、
306 実行されるコマンドがユーザの環境からどんな変数を引き継ぐかについて、
307 制御する手段を用意している。すなわち、\fIsudoers\fR は二つの異なった方法で、
308 環境変数を処理することができる。
309 .PP
310 .\"O By default, the \fIenv_reset\fR option is enabled.  This causes commands
311 .\"O to be executed with a minimal environment containing the \f(CW\*(C`TERM\*(C'\fR,
312 .\"O \&\f(CW\*(C`PATH\*(C'\fR, \f(CW\*(C`HOME\*(C'\fR, \f(CW\*(C`MAIL\*(C'\fR, \f(CW\*(C`SHELL\*(C'\fR, \f(CW\*(C`LOGNAME\*(C'\fR, \f(CW\*(C`USER\*(C'\fR, \f(CW\*(C`USERNAME\*(C'\fR
313 .\"O and \f(CW\*(C`SUDO_*\*(C'\fR variables in addition to variables from the
314 .\"O invoking process permitted by the \fIenv_check\fR and \fIenv_keep\fR
315 .\"O options.  This is effectively a whitelist for environment variables.
316 .\"O .PP
317 デフォルトでは \fIenv_reset\fR オプションが有効になっている。
318 この場合、コマンドは最小限の環境で実行されることになるが、その環境には、
319 \&\f(CW\*(C`TERM\*(C'\fR, \f(CW\*(C`PATH\*(C'\fR, \f(CW\*(C`HOME\*(C'\fR,
320 \&\f(CW\*(C`MAIL\*(C'\fR, \f(CW\*(C`SHELL\*(C'\fR, \f(CW\*(C`LOGNAME\*(C'\fR,
321 \&\f(CW\*(C`USER\*(C'\fR, \f(CW\*(C`USERNAME\*(C'\fR、
322 及び \f(CW\*(C`SUDO_*\*(C'\fR という変数、
323 それに、呼び出し側のプロセスから来た変数で、\fIenv_check\fR や
324 \&\fIenv_keep\fR オプションによって許可されたものが含まれている。
325 これは、言わば、環境変数のホワイトリストである。
326 .PP
327 .\"O If, however, the \fIenv_reset\fR option is disabled, any variables not
328 .\"O explicitly denied by the \fIenv_check\fR and \fIenv_delete\fR options are
329 .\"O inherited from the invoking process.  In this case, \fIenv_check\fR
330 .\"O and \fIenv_delete\fR behave like a blacklist.  Since it is not possible
331 .\"O to blacklist all potentially dangerous environment variables, use
332 .\"O of the default \fIenv_reset\fR behavior is encouraged.
333 .\"O .PP
334 これに対して、\fIenv_reset\fR オプションが無効になっている場合は、
335 \&\fIenv_check\fR や \fIenv_delete\fR オプションによって明示的に拒否されていないかぎり、
336 いかなる環境変数も呼び出し側のプロセスから継承される。この場合、
337 \&\fIenv_check\fR や \fIenv_delete\fR はブラックリストのように振舞うわけだ。
338 危険性のある環境変数のすべてをブラックリストに載せることは不可能なので、
339 \&\fIenv_reset\fR を有効にしておくデフォルトの動作を採用することをお勧めする。
340 .PP
341 .\"O In all cases, environment variables with a value beginning with
342 .\"O \&\f(CW\*(C`()\*(C'\fR are removed as they could be interpreted as \fBbash\fR functions.
343 .\"O The list of environment variables that \fBsudo\fR allows or denies is
344 .\"O contained in the output of \f(CW\*(C`sudo \-V\*(C'\fR when run as root.
345 .\"O .PP
346 どんな場合でも、値が \f(CW\*(C`()\*(C'\fR で始まる変数は除去されるが、
347 それは \fBbash\fR の関数として解釈される恐れがあるからである。
348 \&\fBsudo\fR が許可、または拒否する環境変数のリストは、
349 \&\f(CW\*(C`sudo \-V\*(C'\fR を root の資格で実行したときの出力中に表示される。
350 .PP
351 .\"O Note that the dynamic linker on most operating systems will remove
352 .\"O variables that can control dynamic linking from the environment of
353 .\"O setuid executables, including \fBsudo\fR.  Depending on the operating 
354 .\"O system this may include \f(CW\*(C`_RLD*\*(C'\fR, \f(CW\*(C`DYLD_*\*(C'\fR, \f(CW\*(C`LD_*\*(C'\fR, \f(CW\*(C`LDR_*\*(C'\fR,
355 .\"O \&\f(CW\*(C`LIBPATH\*(C'\fR, \f(CW\*(C`SHLIB_PATH\*(C'\fR, and others.  These type of variables are
356 .\"O removed from the environment before \fBsudo\fR even begins execution
357 .\"O and, as such, it is not possible for \fBsudo\fR to preserve them.
358 .\"O .PP
359 たいていのオペレーティングシステムのダイナミック・リンカは、
360 ダイナミック・リンキングを制御する働きがある環境変数を、\fBsudo\fR もその一つである
361 setuid プログラムの環境から除去するようになっていることに注意してほしい。
362 オペレーティングシステムによって名前は様々だが、
363 \&\f(CW\*(C`_RLD*\*(C'\fR, \f(CW\*(C`DYLD_*\*(C'\fR, \f(CW\*(C`LD_*\*(C'\fR, 
364 \&\f(CW\*(C`LDR_*\*(C'\fR, \f(CW\*(C`LIBPATH\*(C'\fR,
365 \&\f(CW\*(C`SHLIB_PATH\*(C'\fR などが、この範疇に含まれるだろう。
366 こうした変数は、\fBsudo\fR の実行が始まるよりも前に、環境から除去されるので、
367 \&\fBsudo\fR がそうした変数を保持することは不可能である。
368 .PP
369 .\"O As a special case, if \fBsudo\fR's \fB\-i\fR option (initial login) is
370 .\"O specified, \fIsudoers\fR will initialize the environment regardless
371 .\"O of the value of \fIenv_reset\fR.  The \fI\s-1DISPLAY\s0\fR, \fI\s-1PATH\s0\fR and \fI\s-1TERM\s0\fR
372 .\"O variables remain unchanged; \fI\s-1HOME\s0\fR, \fI\s-1MAIL\s0\fR, \fI\s-1SHELL\s0\fR, \fI\s-1USER\s0\fR,
373 .\"O and \fI\s-1LOGNAME\s0\fR are set based on the target user.  On Linux and \s-1AIX\s0
374 .\"O systems the contents of \fI/etc/environment\fR are also included.  All
375 .\"O other environment variables are removed.
376 特例として、\fBsudo\fR に \fB\-i\fR オプション (initial login)
377 が指定されている場合は、\fIsudoers\fR は \fIenv_reset\fR
378 の有効・無効にかかわらず、環境を初期化する。
379 環境変数 \fI\s-1DISPLAY\s0\fR, \fI\s-1PATH\s0\fR,
380 \&\fI\s-1TERM\s0\fR は変更されないが、\fI\s-1HOME\s0\fR, \fI\s-1MAIL\s0\fR,
381 \&\fI\s-1SHELL\s0\fR, \fI\s-1USER\s0\fR, \fI\s-1LOGNAME\s0\fR は、
382 変身対象ユーザのそれにセットされるのである。Linux や \s-1AIX\s0 システムでは、
383 \&\fI/etc/environment\fR の内容も取り込まれる。
384 それ以外の環境変数はすべて捨てられる。
385 .\"O .PP
386 .\"O Lastly, if the \fIenv_file\fR option is defined, any variables present
387 .\"O in that file will be set to their specified values.
388 .PP
389 最後に。\fIenv_file\fR が設定されている場合は、
390 そのファイルに記載されたいかなる変数も、そこで指定されている値にセットされることになる。
391 .\"O .SH "SUDOERS FILE FORMAT"
392 .SH "SUDOERS ファイルの書式"
393 .IX Header "SUDOERS FILE FORMAT"
394 .\"O The \fIsudoers\fR file is composed of two types of entries: aliases
395 .\"O (basically variables) and user specifications (which specify who
396 .\"O may run what).
397 .\"O .PP
398 \&\fIsudoers\fR ファイルは二種類のエントリから構成されている。
399 (要するに変数である) エイリアスと (誰が何を実行できるかを指定している)
400 ユーザ設定だ。
401 .IP "[\fB訳注\fR]:" 8
402 .IX Item "footnote1"
403 訳者としては、「エイリアス、デフォルト設定、ユーザ設定の三種類の
404 エントリから構成されている」と言った方が実態に合っているのではないかと思う。
405 .PP
406 .\"O When multiple entries match for a user, they are applied in order.
407 .\"O Where there are multiple matches, the last match is used (which is
408 .\"O not necessarily the most specific match).
409 .\"O .PP
410 一人のユーザに複数のエントリがマッチするときは、順番に適用される。
411 複数の指定がマッチしている箇所については、最後にマッチしたものが使用される
412 (それが一番明示的なマッチだとはかぎらないが)。
413 .PP
414 .\"O The \fIsudoers\fR grammar will be described below in Extended Backus-Naur
415 .\"O Form (\s-1EBNF\s0).  Don't despair if you don't know what \s-1EBNF\s0 is; it is
416 .\"O fairly simple, and the definitions below are annotated.
417 以下では \fIsudoers\fR の文法を拡張 Backus-Naur 記法 (\s-1EBNF\s0)
418 を用いて記述する。\s-1EBNF\s0 がどんなものか御存じないからといって、
419 あきらめないでいただきたい。わりと簡単なものだし、
420 以下に出てくる定義には詳しい説明を付けておきますから。
421 .\"O .SS "Quick guide to \s-1EBNF\s0"
422 .SS "\s-1EBNF\s0 の基礎の基礎"
423 .IX Subsection "Quick guide to EBNF"
424 .\"O \&\s-1EBNF\s0 is a concise and exact way of describing the grammar of a language.
425 .\"O Each \s-1EBNF\s0 definition is made up of \fIproduction rules\fR.  E.g.,
426 .\"O .PP
427 \&\s-1EBNF\s0 は言語の文法を記述する簡潔で厳密な方法である。
428 \&\s-1EBNF\s0 の個々の定義は生成規則からできている。たとえば、
429 .PP
430 .Vb 1
431 .\"O \& symbol ::= definition | alternate1 | alternate2 ...
432 \& シンボル ::= 定義 | 別の定義 1 | 別の定義 2 ...
433 .Ve
434 .PP
435 .\"O Each \fIproduction rule\fR references others and thus makes up a
436 .\"O grammar for the language.  \s-1EBNF\s0 also contains the following
437 .\"O operators, which many readers will recognize from regular
438 .\"O expressions.  Do not, however, confuse them with \*(L"wildcard\*(R"
439 .\"O characters, which have different meanings.
440 個々の生成規則は、ほかの生成規則を参照し、そのようにして言語の文法を作り上げている。
441 また \s-1EBNF\s0 には以下の演算子が含まれるが、
442 正規表現で御存じの読者も多いだろう。
443 だが、いわゆる「ワイルドカード」文字と混同しないでいただきたい。
444 あれは別の意味を持っている。
445 .ie n .IP "\*(C`?\*(C'" 4
446 .el .IP "\f(CW\*(C`?\*(C'\fR" 4
447 .IX Item "?"
448 .\"O Means that the preceding symbol (or group of symbols) is optional.
449 .\"O That is, it may appear once or not at all.
450 直前のシンボル (または、シンボルのグループ) が、あってもなくてもよいことを意味する。
451 すなわちそのシンボルは、1 回現れてもよいし、1 回も現れないでもよい。
452 .ie n .IP "\*(C`*\*(C'" 4
453 .el .IP "\f(CW\*(C`*\*(C'\fR" 4
454 .IX Item "*"
455 .\"O Means that the preceding symbol (or group of symbols) may appear
456 .\"O zero or more times.
457 直前のシンボル (または、シンボルのグループ) が 0 回以上現れる。
458 .ie n .IP "\*(C`+\*(C'" 4
459 .el .IP "\f(CW\*(C`+\*(C'\fR" 4
460 .IX Item "+"
461 .\"O Means that the preceding symbol (or group of symbols) may appear
462 .\"O one or more times.
463 .\"O .PP
464 直前のシンボル (または、シンボルのグループ) が 1 回以上現れる。
465 .PP
466 .\"O Parentheses may be used to group symbols together.  For clarity,
467 .\"O we will use single quotes ('') to designate what is a verbatim character
468 .\"O string (as opposed to a symbol name).
469 丸カッコを使うと、複数のシンボルをグループにまとめることができる。
470 なお混乱を避けるため、以下の定義で (シンボル名ではなく)
471 文字どおりの文字列や記号を示す場合は、それをシングルクォート ('')
472 で囲むことにする。
473 .\"O .SS "Aliases"
474 .SS "エイリアス"
475 .IX Subsection "Aliases"
476 .\"O There are four kinds of aliases: \f(CW\*(C`User_Alias\*(C'\fR, \f(CW\*(C`Runas_Alias\*(C'\fR,
477 .\"O \&\f(CW\*(C`Host_Alias\*(C'\fR and \f(CW\*(C`Cmnd_Alias\*(C'\fR.
478 .\"O .PP
479 エイリアスには四種類ある。\f(CW\*(C`User_Alias\*(C'\fR,
480 \&\f(CW\*(C`Runas_Alias\*(C'\fR, \f(CW\*(C`Host_Alias\*(C'\fR,
481 \&\f(CW\*(C`Cmnd_Alias\*(C'\fR である。
482 .PP
483 .Vb 4
484 \& Alias ::= \*(AqUser_Alias\*(Aq  User_Alias (\*(Aq:\*(Aq User_Alias)* |
485 \&           \*(AqRunas_Alias\*(Aq Runas_Alias (\*(Aq:\*(Aq Runas_Alias)* |
486 \&           \*(AqHost_Alias\*(Aq  Host_Alias (\*(Aq:\*(Aq Host_Alias)* |
487 \&           \*(AqCmnd_Alias\*(Aq  Cmnd_Alias (\*(Aq:\*(Aq Cmnd_Alias)*
488 \&
489 \& User_Alias ::= NAME \*(Aq=\*(Aq User_List
490 \&
491 \& Runas_Alias ::= NAME \*(Aq=\*(Aq Runas_List
492 \&
493 \& Host_Alias ::= NAME \*(Aq=\*(Aq Host_List
494 \&
495 \& Cmnd_Alias ::= NAME \*(Aq=\*(Aq Cmnd_List
496 \&
497 \& NAME ::= [A\-Z]([A\-Z][0\-9]_)*
498 .Ve
499 .PP
500 .\"O Each \fIalias\fR definition is of the form
501 .\"O .PP
502 個々のエイリアスの定義は、次の形をとる。
503 .PP
504 .Vb 1
505 \& Alias_Type NAME = item1, item2, ...
506 .Ve
507 .PP
508 .\"O where \fIAlias_Type\fR is one of \f(CW\*(C`User_Alias\*(C'\fR, \f(CW\*(C`Runas_Alias\*(C'\fR, \f(CW\*(C`Host_Alias\*(C'\fR,
509 .\"O or \f(CW\*(C`Cmnd_Alias\*(C'\fR.  A \f(CW\*(C`NAME\*(C'\fR is a string of uppercase letters, numbers,
510 .\"O and underscore characters ('_').  A \f(CW\*(C`NAME\*(C'\fR \fBmust\fR start with an
511 .\"O uppercase letter.  It is possible to put several alias definitions
512 .\"O of the same type on a single line, joined by a colon (':').  E.g.,
513 .\"O .PP
514 上記において、\fIAlias_Type\fR は \f(CW\*(C`User_Alias\*(C'\fR,
515 \&\f(CW\*(C`Runas_Alias\*(C'\fR, \f(CW\*(C`Host_Alias\*(C'\fR,
516 \&\f(CW\*(C`Cmnd_Alias\*(C'\fR のうちの一つである。
517 \&\f(CW\*(C`NAME\*(C'\fR はアルファベットの大文字、数字、
518 アンダースコア ('_') からなる文字列であるが、
519 \&\fB先頭の文字は大文字\fRでなければならない。同じタイプのエイリアス定義を、
520 コロンで (':') つないで、
521 一行に複数書くこともできる。たとえば、
522 .PP
523 .Vb 1
524 \& Alias_Type NAME = item1, item2, item3 : NAME = item4, item5
525 .Ve
526 .PP
527 .\"O The definitions of what constitutes a valid \fIalias\fR member follow.
528 .\"O .PP
529 以下では、エイリアスの有効な要素となるものを定義する。
530 .PP
531 .Vb 2
532 \& User_List ::= User |
533 \&               User \*(Aq,\*(Aq User_List
534 \&
535 \& User ::= \*(Aq!\*(Aq* user name |
536 \&          \*(Aq!\*(Aq* #uid |
537 \&          \*(Aq!\*(Aq* %group |
538 \&          \*(Aq!\*(Aq* %#gid |
539 \&          \*(Aq!\*(Aq* +netgroup |
540 \&          \*(Aq!\*(Aq* %:nonunix_group |
541 \&          \*(Aq!\*(Aq* %:#nonunix_gid |
542 \&          \*(Aq!\*(Aq* User_Alias
543 .Ve
544 .PP
545 .\"O A \f(CW\*(C`User_List\*(C'\fR is made up of one or more user names, user ids
546 .\"O (prefixed with '#'), system group names and ids (prefixed with '%'
547 .\"O and '%#' respectively), netgroups (prefixed with '+'), non-Unix
548 .\"O group names and IDs (prefixed with '%:' and '%:#' respectively) and
549 .\"O \&\f(CW\*(C`User_Alias\*(C'\fRes.  Each list item may be prefixed with zero or more
550 .\"O \&'!' operators.  An odd number of '!' operators negate the value of
551 .\"O the item; an even number just cancel each other out.
552 .\"O .PP
553 \&\f(CW\*(C`User_List\*(C'\fR を構成するのは、一個以上の次のものである。
554 ユーザ名、ユーザ ID (接頭辞 '#' が付く)、システムグループ名やその ID
555 (それぞれ、接頭辞 '%' と '%#' が付く)、ネットグループ名 (接頭辞 '+' が付く)、
556 非 Unix グループ名やその ID (それぞれ、接頭辞 '%:' と '%:#' が付く)、
557 それに \f(CW\*(C`User_Alias\*(C'\fR。
558 リストの各項目の前には一個以上の '!' 演算子を付けてもよい。 
559 奇数個の '!' はその項目の値を否定する。偶数個の場合は互い相殺されるだけだ。
560 .PP
561 .\"O A \f(CW\*(C`user name\*(C'\fR, \f(CW\*(C`uid\*(C'\fR, \f(CW\*(C`group\*(C'\fR, \f(CW\*(C`gid\*(C'\fR, \f(CW\*(C`netgroup\*(C'\fR, \f(CW\*(C`nonunix_group\*(C'\fR
562 .\"O or \f(CW\*(C`nonunix_gid\*(C'\fR may be enclosed in double quotes to avoid the
563 .\"O need for escaping special characters.  Alternately, special characters
564 .\"O may be specified in escaped hex mode, e.g. \ex20 for space.  When
565 .\"O using double quotes, any prefix characters must be included inside
566 .\"O the quotes.
567 .\"O .PP
568 ユーザ名、\f(CW\*(C`uid\*(C'\fR、グループ名、\f(CW\*(C`gid\*(C'\fR、
569 ネットグループ名、非 Unix グループ名、非 Unix グループ の
570 \&\f(CW\*(C`gid\*(C'\fR は、ダブルクォートで囲めば、
571 特殊文字をエスケープしないですむ。
572 ダブルクォートで囲まずに特殊文字を使いたいなら、
573 エスケープした 16 進数を指定してやればよい。たとえば、
574 スペースなら \ex20 という具合だ。ダブルクォートを使用する場合は、
575 接頭辞があれば、それをダブルクォートの内側に入れなければならない。
576 .PP
577 .\"O The actual \f(CW\*(C`nonunix_group\*(C'\fR and \f(CW\*(C`nonunix_gid\*(C'\fR syntax depends on
578 .\"O the underlying group provider plugin (see the \fIgroup_plugin\fR
579 .\"O description below).  For instance, the \s-1QAS\s0 \s-1AD\s0 plugin supports the
580 .\"O following formats:
581 非 Unix グループやその \f(CW\*(C`gid\*(C'\fR の書式が、
582 実際にどんなものになるかは、利用するグループ・プロバイダ・プラグイン
583 (group provider plugin) 次第である (後述する \fIgroup_plugin\fR
584 オプションの説明も見てほしい)。たとえば、
585 \&\s-1QAS\s0 (\s-1Quest Authentication Services\s0) の \s-1AD\s0 プラグインは、
586 以下の書式をサポートしている。
587 .IP "\(bu" 4
588 .\"O Group in the same domain: \*(L"Group Name\*(R"
589 同じドメインのグループ: \*(L"Group Name\*(R"
590 .IP "\(bu" 4
591 .\"O Group in any domain: \*(L"Group Name@FULLY.QUALIFIED.DOMAIN\*(R"
592 任意のドメインのグループ: \*(L"Group Name@FULLY.QUALIFIED.DOMAIN\*(R"
593 .IP "\(bu" 4
594 .\"O Group \s-1SID:\s0 \*(L"S\-1\-2\-34\-5678901234\-5678901234\-5678901234\-567\*(R"
595 グループ \s-1SID:\s0 \*(L"S\-1\-2\-34\-5678901234\-5678901234\-5678901234\-567\*(R"
596 .PP
597 .\"O Note that quotes around group names are optional.  Unquoted strings
598 .\"O must use a backslash (\e) to escape spaces and special characters.
599 .\"O See \*(L"Other special characters and reserved words\*(R" for a list of
600 .\"O characters that need to be escaped.
601 .\"O .PP
602 グループ名を囲む引用符は任意であることに注意してほしい。
603 文字列を引用符で囲まない場合は、スペースや特殊文字をエスケープするために、
604 バックスラッシュ (\e) を使わなければならない。
605 エスケープする必要がある文字のリストについては、
606 「ほかの特殊文字と予約語」のセクションをご覧になってほしい。
607 .PP
608 .Vb 2
609 \& Runas_List ::= Runas_Member |
610 \&                Runas_Member \*(Aq,\*(Aq Runas_List
611 \&
612 \& Runas_Member ::= \*(Aq!\*(Aq* user name |
613 \&                  \*(Aq!\*(Aq* #uid |
614 \&                  \*(Aq!\*(Aq* %group |
615 \&                  \*(Aq!\*(Aq* %#gid |
616 \&                  \*(Aq!\*(Aq* %:nonunix_group |
617 \&                  \*(Aq!\*(Aq* %:#nonunix_gid |
618 \&                  \*(Aq!\*(Aq* +netgroup |
619 \&                  \*(Aq!\*(Aq* Runas_Alias
620 .Ve
621 .PP
622 .\"O A \f(CW\*(C`Runas_List\*(C'\fR is similar to a \f(CW\*(C`User_List\*(C'\fR except that instead
623 .\"O of \f(CW\*(C`User_Alias\*(C'\fRes it can contain \f(CW\*(C`Runas_Alias\*(C'\fRes.  Note that
624 .\"O user names and groups are matched as strings.  In other words, two
625 .\"O users (groups) with the same uid (gid) are considered to be distinct.
626 .\"O If you wish to match all user names with the same uid (e.g.\ root
627 .\"O and toor), you can use a uid instead (#0 in the example given).
628 .\"O .PP
629 \&\f(CW\*(C`Runas_List\*(C'\fR は \f(CW\*(C`User_List\*(C'\fR に似ている。
630 違うのは、\f(CW\*(C`User_Alias\*(C'\fR ではなく、
631 \&\f(CW\*(C`Runas_Alias\*(C'\fR が使えることだ。
632 ユーザ名やグループ名のマッチは文字列として行われることに気を付けてほしい。
633 言い換えると、二つのユーザ名 (あるいはグループ名) は、かりに同じ uid (gid)
634 を持っていても、別個のものと見なされるのである。
635 だから、もし同じ uid を持ったすべてのユーザ名にマッチさせたかったら 
636 (たとえば、root と toor がそうだとしよう)、ユーザ名の代わりに
637 uid を使えばよい (この例なら、#0 である)。
638 .PP
639 .Vb 2
640 \& Host_List ::= Host |
641 \&               Host \*(Aq,\*(Aq Host_List
642 \&
643 \& Host ::= \*(Aq!\*(Aq* host name |
644 \&          \*(Aq!\*(Aq* ip_addr |
645 \&          \*(Aq!\*(Aq* network(/netmask)? |
646 \&          \*(Aq!\*(Aq* +netgroup |
647 \&          \*(Aq!\*(Aq* Host_Alias
648 .Ve
649 .PP
650 .\"O A \f(CW\*(C`Host_List\*(C'\fR is made up of one or more host names, \s-1IP\s0 addresses,
651 .\"O network numbers, netgroups (prefixed with '+') and other aliases.
652 .\"O Again, the value of an item may be negated with the '!' operator.
653 .\"O If you do not specify a netmask along with the network number,
654 .\"O \&\fBsudo\fR will query each of the local host's network interfaces and,
655 .\"O if the network number corresponds to one of the hosts's network
656 .\"O interfaces, the corresponding netmask will be used.  The netmask
657 .\"O may be specified either in standard \s-1IP\s0 address notation
658 .\"O (e.g.\ 255.255.255.0 or ffff:ffff:ffff:ffff::),
659 .\"O or \s-1CIDR\s0 notation (number of bits, e.g.\ 24 or 64).  A host name may
660 .\"O include shell-style wildcards (see the Wildcards section below),
661 .\"O but unless the \f(CW\*(C`host name\*(C'\fR command on your machine returns the fully
662 .\"O qualified host name, you'll need to use the \fIfqdn\fR option for
663 .\"O wildcards to be useful.  Note \fBsudo\fR only inspects actual network
664 .\"O interfaces; this means that \s-1IP\s0 address 127.0.0.1 (localhost) will
665 .\"O never match.  Also, the host name \*(L"localhost\*(R" will only match if
666 .\"O that is the actual host name, which is usually only the case for
667 .\"O non-networked systems.
668 .\"O .PP
669 \&\f(CW\*(C`Host_List\*(C'\fR は一個以上の、ホスト名、\s-1IP\s0 アドレス、
670 ネットワークアドレス、ネットグループ名 (接頭辞 '+' が付く)、
671 および他のエイリアスからなる。ここでもまた、'!' 演算子を付けて、
672 項目の値を否定することができる。
673 ネットワークアドレスにネットマスクを指定しなかった場合は、
674 \&\fBsudo\fR がローカルホストのネットワークインターフェースを一つ一つ参照し、
675 指定されたネットワークアドレスと同じアドレスを持つインターフェースがあれば、
676 そのネットマスクを使用することになる。ネットマスクの指定は、
677 標準の \s-1IP\s0 アドレス表記 (たとえば 255.255.255.0 とか 
678 ffff:ffff:ffff:ffff:: とか) でもよく、\&\s-1CIDR\s0 表記 (ビット数、
679 たとえば 24 とか 64 とか) でもよい。
680 ホスト名の一部にシェル風のワイルドカードを使用することができるが
681 (下記のワイルドカードのセクションを参照)、使用マシンの
682 \&\f(CW\*(C`hostname\*(C'\fR コマンドが完全修飾ドメイン名 (FQDN) を返さない場合、
683 ワイルドカードを利用するには \fIfqdn\fR オプションを使う必要がある。
684 なお、\fBsudo\fR がチェックするのは、
685 実在のネットワークインターフェースだけだということに留意してほしい。
686 すなわち、\s-1IP\s0 アドレス 127.0.0.1 (localhost) がマッチすることは、
687 絶対にないのである。また、
688 \&\*(L"localhost\*(R" というホスト名がマッチするのは、
689 それが実際のホスト名であるときだけであり、
690 それは通常、ネットワークにつながっていないシステムの場合にしか当てはまらない。
691 .PP
692 .Vb 2
693 \& Cmnd_List ::= Cmnd |
694 \&               Cmnd \*(Aq,\*(Aq Cmnd_List
695 \&
696 \& commandname ::= file name |
697 \&                 file name args |
698 \&                 file name \*(Aq""\*(Aq
699 \&
700 \& Cmnd ::= \*(Aq!\*(Aq* commandname |
701 \&          \*(Aq!\*(Aq* directory |
702 \&          \*(Aq!\*(Aq* "sudoedit" |
703 \&          \*(Aq!\*(Aq* Cmnd_Alias
704 .Ve
705 .PP
706 .\"O A \f(CW\*(C`Cmnd_List\*(C'\fR is a list of one or more commandnames, directories, and other
707 .\"O aliases.  A commandname is a fully qualified file name which may include
708 .\"O shell-style wildcards (see the Wildcards section below).  A simple
709 .\"O file name allows the user to run the command with any arguments he/she
710 .\"O wishes.  However, you may also specify command line arguments (including
711 .\"O wildcards).  Alternately, you can specify \f(CW""\fR to indicate that the command
712 .\"O may only be run \fBwithout\fR command line arguments.  A directory is a
713 .\"O fully qualified path name ending in a '/'.  When you specify a directory
714 .\"O in a \f(CW\*(C`Cmnd_List\*(C'\fR, the user will be able to run any file within that directory
715 .\"O (but not in any subdirectories therein).
716 .\"O .PP
717 \&\f(CW\*(C`Cmnd_List\*(C'\fR は一個以上の、コマンド名、ディレクトリ、
718 他のエイリアスからなるリストである。コマンド名は絶対パスのファイル名であり、
719 シェル風のワイルドカードを含んでいても構わない
720 (下記のワイルドカードのセクションを参照)。単にファイル名だけ指定した場合、
721 ユーザはお望みのどんな引き数でも付けてそのコマンドを実行することができる。
722 とは言え、コマンドライン引き数を (ワイルドカードを含めて)
723 指定しても構わないし、また、引き数に \f(CW""\fR を指定して、そのコマンドは
724 \&\fBコマンドライン引き数なし\fRの実行のみが可能だと指示することもできる。
725 ディレクトリは '/' で終わる絶対パス名である。
726 \&\f(CW\*(C`Cmnd_List\*(C'\fR にディレクトリを指定すると、
727 ユーザーはそのディレクトリ内の任意のファイルを実行できるようになる
728 (だが、そのサブディレクトリにあるファイルは実行できない)。
729 .PP
730 .\"O If a \f(CW\*(C`Cmnd\*(C'\fR has associated command line arguments, then the arguments
731 .\"O in the \f(CW\*(C`Cmnd\*(C'\fR must match exactly those given by the user on the command line
732 .\"O (or match the wildcards if there are any).  Note that the following
733 .\"O characters must be escaped with a '\e' if they are used in command
734 .\"O arguments: ',', ':', '=', '\e'.  The special command \f(CW"sudoedit"\fR
735 .\"O is used to permit a user to run \fBsudo\fR with the \fB\-e\fR option (or
736 .\"O as \fBsudoedit\fR).  It may take command line arguments just as
737 .\"O a normal command does.
738 \&\f(CW\*(C`Cmnd\*(C'\fR がコマンドライン引き数を伴っている場合は、
739 \&\f(CW\*(C`Cmnd\*(C'\fR 中の引き数は、
740 ユーザがコマンドラインに打ち込む引き数と正確に一致しなければならない
741 (Cmnd 中の引き数にワイルドカードがあるならば、
742 それがコマンドラインの引き数とマッチしなければならない)。
743 以下に挙げる文字をコマンド引き数の中で用いるときは、
744 \&'\e' によってエスケープしなければならないことに注意してほしい。
745 \&',', ':', '=', '\e' がそれである。
746 \&\f(CW"sudoedit"\fR という特別なコマンド名は、ユーザが \fBsudo\fR を
747 \&\fB-e\fR オプション付きで (あるいは、\fBsudoedit\fR というコマンド名で)
748 実行することを許可するために使用される。この場合、
749 コマンドライン引き数を取ることができるのは、普通のコマンドとまったく同様である。
750 .\"O .SS "Defaults"
751 .SS "デフォルト設定 (Defaults)"
752 .IX Subsection "Defaults"
753 .\"O Certain configuration options may be changed from their default
754 .\"O values at runtime via one or more \f(CW\*(C`Default_Entry\*(C'\fR lines.  These
755 .\"O may affect all users on any host, all users on a specific host, a
756 .\"O specific user, a specific command, or commands being run as a specific user.
757 .\"O Note that per-command entries may not include command line arguments.
758 .\"O If you need to specify arguments, define a \f(CW\*(C`Cmnd_Alias\*(C'\fR and reference
759 .\"O that instead.
760 .\"O .PP
761 かなりの設定オプションが、一行以上の \f(CW\*(C`Default_Entry\*(C'\fR
762 行を使うことで実行時にデフォルトの値から変更可能だ。その効果の及ぶ範囲は、
763 任意のホストのすべてのユーザにすることもできるし、
764 ある特定のホストのすべてのユーザ、ある特定のユーザ、ある特定のコマンド、
765 ある特定のユーザとして実行するコマンドなどに限定することもできる。
766 気を付けてほしいのは、コマンドに限定した
767 Defaults 行にコマンドライン引き数まで書くことができないことだ。
768 引き数を指定する必要がある場合は、\f(CW\*(C`Cmnd_Alias\*(C'\fR を定義して、
769 代わりにそれを参照すればよい。
770 .PP
771 .Vb 5
772 \& Default_Type ::= \*(AqDefaults\*(Aq |
773 \&                  \*(AqDefaults\*(Aq \*(Aq@\*(Aq Host_List |
774 \&                  \*(AqDefaults\*(Aq \*(Aq:\*(Aq User_List |
775 \&                  \*(AqDefaults\*(Aq \*(Aq!\*(Aq Cmnd_List |
776 \&                  \*(AqDefaults\*(Aq \*(Aq>\*(Aq Runas_List
777 \&
778 \& Default_Entry ::= Default_Type Parameter_List
779 \&
780 \& Parameter_List ::= Parameter |
781 \&                    Parameter \*(Aq,\*(Aq Parameter_List
782 \&
783 \& Parameter ::= Parameter \*(Aq=\*(Aq Value |
784 \&               Parameter \*(Aq+=\*(Aq Value |
785 \&               Parameter \*(Aq\-=\*(Aq Value |
786 \&               \*(Aq!\*(Aq* Parameter
787 .Ve
788 .PP
789 .\"O Parameters may be \fBflags\fR, \fBinteger\fR values, \fBstrings\fR, or \fBlists\fR.
790 .\"O Flags are implicitly boolean and can be turned off via the '!'
791 .\"O operator.  Some integer, string and list parameters may also be
792 .\"O used in a boolean context to disable them.  Values may be enclosed
793 .\"O in double quotes (\f(CW\*(C`"\*(C'\fR) when they contain multiple words.  Special
794 .\"O characters may be escaped with a backslash (\f(CW\*(C`\e\*(C'\fR).
795 .\"O .PP
796 パラメータは\fBフラグ\fR、\fB整数値\fR、\fB文字列\fR、
797 \&\fBリスト\fRのどれでもよい。フラグは要するにブーリアン (真偽値) であり、
798 \&'!' 演算子で off にできる。整数値、文字列、リストのパラメータにも、
799 真偽値として使用して、それを無効にできるものがいくつか存在する。
800 パラメータの値が複数の単語を含むときは、値をダブルクオート
801 (\f(CW\*(C`"\*(C'\fR) で囲むとよい。特殊文字はバックスラッシュ
802 (\f(CW\*(C`\e\*(C'\fR) でエスケープすることができる。
803 .PP
804 .\"O Lists have two additional assignment operators, \f(CW\*(C`+=\*(C'\fR and \f(CW\*(C`\-=\*(C'\fR.
805 .\"O These operators are used to add to and delete from a list respectively.
806 .\"O It is not an error to use the \f(CW\*(C`\-=\*(C'\fR operator to remove an element
807 .\"O that does not exist in a list.
808 .\"O .PP
809 リストには代入演算子が \f(CW\*(C`\=\*(C'\fR のほかにもう二つある。
810 \&\f(CW\*(C`+=\*(C'\fR と \f(CW\*(C`\-=\*(C'\fR である。こうした演算子は、
811 それぞれ、リストに付け加えたり、リストから削除したりするのに使用する。
812 \&\f(CW\*(C`\-=\*(C'\fR 演算子を使って、
813 リストに存在しない要素を消去しようとしても、エラーにはならない。
814 .PP
815 .\"O Defaults entries are parsed in the following order: generic, host
816 .\"O and user Defaults first, then runas Defaults and finally command
817 .\"O defaults.
818 .\"O .PP
819 Defaults 行の解析は、次の順序で行われる。最初に汎用、Host、
820 User の Defaults が解析され、それから Runas の Defaults、最後にコマンドの
821 Defaults の順番になる。
822 .PP
823 .\"O See \*(L"\s-1SUDOERS\s0 \s-1OPTIONS\s0\*(R" for a list of supported Defaults parameters.
824 Defaults 行で使用できるパラメータのリストについては、
825 「SUDOERS のオプション」を御覧いただきたい。
826 .\"O .SS "User Specification"
827 .SS "ユーザ設定 (User Specification)"
828 .IX Subsection "User Specification"
829 .Vb 2
830 \& User_Spec ::= User_List Host_List \*(Aq=\*(Aq Cmnd_Spec_List \e
831 \&               (\*(Aq:\*(Aq Host_List \*(Aq=\*(Aq Cmnd_Spec_List)*
832 \&
833 \& Cmnd_Spec_List ::= Cmnd_Spec |
834 \&                    Cmnd_Spec \*(Aq,\*(Aq Cmnd_Spec_List
835 \&
836 .ie \n(SL \& Cmnd_Spec ::= Runas_Spec? SELinux_Spec? Tag_Spec* Cmnd
837 .el \& Cmnd_Spec ::= Runas_Spec? Tag_Spec* Cmnd
838 \&
839 \& Runas_Spec ::= \*(Aq(\*(Aq Runas_List? (\*(Aq:\*(Aq Runas_List)? \*(Aq)\*(Aq
840 \&
841 .if \n(SL \{\
842 \& SELinux_Spec ::= (\*(AqROLE=role\*(Aq | \*(AqTYPE=type\*(Aq)
843 \&
844 \}
845 \& Tag_Spec ::= (\*(AqNOPASSWD:\*(Aq | \*(AqPASSWD:\*(Aq | \*(AqNOEXEC:\*(Aq | \*(AqEXEC:\*(Aq |
846 \&               \*(AqSETENV:\*(Aq | \*(AqNOSETENV:\*(Aq | \*(AqLOG_INPUT:\*(Aq | \*(AqNOLOG_INPUT:\*(Aq |
847 \&               \*(AqLOG_OUTPUT:\*(Aq | \*(AqNOLOG_OUTPUT:\*(Aq)
848 .Ve
849 .PP
850 .\"O A \fBuser specification\fR determines which commands a user may run
851 .\"O (and as what user) on specified hosts.  By default, commands are
852 .\"O run as \fBroot\fR, but this can be changed on a per-command basis.
853 .\"O .PP
854 \&\fBユーザ設定\fRは、あるユーザが、指定されたホストで (どのユーザに変身して)
855 どのコマンドを実行できるかを決定する。デフォルトでは、コマンドは \fBroot\fR
856 に変身して実行されるが、これはコマンドごとに変更することができる。
857 .PP
858 .\"O The basic structure of a user specification is `who where = (as_whom)
859 .\"O what'.  Let's break that down into its constituent parts:
860 ユーザ設定の基本構造は、
861 .PP
862 .Vb 2
863 \&      who     where     = (as_whom)      what 
864 \&     [誰が どのホストで = (誰に変身して) 何を]
865 .Ve
866 .PP
867 である。構成部分に分けて説明しよう。
868 .\"O .SS "Runas_Spec"
869 .SS "Runas_Spec (どのユーザやグループに変身できるか)"
870 .IX Subsection "Runas_Spec"
871 .\"O A \f(CW\*(C`Runas_Spec\*(C'\fR determines the user and/or the group that a command
872 .\"O may be run as.  A fully-specified \f(CW\*(C`Runas_Spec\*(C'\fR consists of two
873 .\"O \&\f(CW\*(C`Runas_List\*(C'\fRs (as defined above) separated by a colon (':') and
874 .\"O enclosed in a set of parentheses.  The first \f(CW\*(C`Runas_List\*(C'\fR indicates
875 .\"O which users the command may be run as via \fBsudo\fR's \fB\-u\fR option.
876 .\"O The second defines a list of groups that can be specified via
877 .\"O \&\fBsudo\fR's \fB\-g\fR option.  If both \f(CW\*(C`Runas_List\*(C'\fRs are specified, the
878 .\"O command may be run with any combination of users and groups listed
879 .\"O in their respective \f(CW\*(C`Runas_List\*(C'\fRs.  If only the first is specified,
880 .\"O the command may be run as any user in the list but no \fB\-g\fR option
881 .\"O may be specified.  If the first \f(CW\*(C`Runas_List\*(C'\fR is empty but the
882 .\"O second is specified, the command may be run as the invoking user
883 .\"O with the group set to any listed in the \f(CW\*(C`Runas_List\*(C'\fR.  If no
884 .\"O \&\f(CW\*(C`Runas_Spec\*(C'\fR is specified the command may be run as \fBroot\fR and
885 .\"O no group may be specified.
886 .\"O .PP
887 \&\f(CW\*(C`Runas_Spec\*(C'\fR は変身の対象となるユーザやグループを規定している。
888 完全な形の \f(CW\*(C`Runas_Spec\*(C'\fR は、(上で定義しているように)
889 コロン (':') で区切られ、
890 カッコで囲まれた、二つの \f(CW\*(C`Runas_List\*(C'\fR からなっている。
891 一つ目の \f(CW\*(C`Runas_List\*(C'\fR は、\fBsudo\fR で
892 \&\fB\-u\fR オプションを使ったときに変身できるユーザを指している。
893 二番目の方が規定しているのは、\fBsudo\fR の \fB\-g\fR
894 オプションによって指定できるグループのリストだ。
895 両方の \f(CW\*(C`Runas_List\*(C'\fR が指定されている場合は、
896 それぞれの \f(CW\*(C`Runas_List\*(C'\fR
897 にリストされているユーザとグループの任意の組み合わせで、
898 コマンドを実行することができる。
899 一つ目の \f(CW\*(C`Runas_List\*(C'\fR だけが指定されているときは、
900 リスト中のいかなるユーザにでも変身してコマンドを実行できるが、
901 \&\fB\-g\fR オプションを指定することはできない。
902 一つ目の \f(CW\*(C`Runas_List\*(C'\fR が空で、二番目だけ指定されている場合は、
903 \&\fBsudo\fR を実行するユーザの資格で、グループを
904 \&\f(CW\*(C`Runas_List\*(C'\fR にリストされている任意のグループに設定して、
905 コマンドを実行することができる。
906 \&\f(CW\*(C`Runas_Spec\*(C'\fR がまったく指定されていないときは、
907 \&\fBroot\fR としてコマンドを実行できるが、グループを指定することはできない。
908 .PP
909 .\"O A \f(CW\*(C`Runas_Spec\*(C'\fR sets the default for the commands that follow it.
910 .\"O What this means is that for the entry:
911 .\"O .PP
912 \&\f(CW\*(C`Runas_Spec\*(C'\fR は、
913 それに続くコマンドに対してデフォルトを定める。それはどういうことかと言うと、
914 次のようなエントリがあったとしよう。
915 .PP
916 .Vb 1
917 \& dgb    boulder = (operator) /bin/ls, /bin/kill, /usr/bin/lprm
918 .Ve
919 .PP
920 .\"O The user \fBdgb\fR may run \fI/bin/ls\fR, \fI/bin/kill\fR, and
921 .\"O \&\fI/usr/bin/lprm\fR \*(-- but only as \fBoperator\fR.  E.g.,
922 .\"O .PP
923 ユーザ \fBdgb\fR は \fI/bin/ls\fR, \fI/bin/kill\fR,
924 \&\fI/usr/bin/lprm\fR を実行することができる。ただし、\fBoperator\fR 
925 として実行できるだけだ。たとえば、次のようにである。
926 .PP
927 .Vb 1
928 \& $ sudo \-u operator /bin/ls
929 .Ve
930 .PP
931 .\"O It is also possible to override a \f(CW\*(C`Runas_Spec\*(C'\fR later on in an
932 .\"O entry.  If we modify the entry like so:
933 .\"O .PP
934 エントリの後ろの方の \f(CW\*(C`Runas_Spec\*(C'\fR を変更することも可能だ。
935 上のエントリをこんなふうに書き変えたとしよう。
936 .PP
937 .Vb 1
938 \& dgb    boulder = (operator) /bin/ls, (root) /bin/kill, /usr/bin/lprm
939 .Ve
940 .PP
941 .\"O Then user \fBdgb\fR is now allowed to run \fI/bin/ls\fR as \fBoperator\fR,
942 .\"O but  \fI/bin/kill\fR and \fI/usr/bin/lprm\fR as \fBroot\fR.
943 .\"O .PP
944 すると、ユーザ \fBdgb\fR は、\fI/bin/ls\fR こそ \fBoperator\fR としてだが、
945 \&\fI/bin/kill\fR や \fI/usr/bin/lprm\fR は
946 \&\fBroot\fR の資格で実行できるようになる。
947 .PP
948 .\"O We can extend this to allow \fBdgb\fR to run \f(CW\*(C`/bin/ls\*(C'\fR with either
949 .\"O the user or group set to \fBoperator\fR:
950 .\"O .PP
951 \&\fBdgb\fR が \f(CW\*(C`/bin/ls\*(C'\fR を実行するとき、
952 変身対象ユーザとグループのどちらでも \fBoperator\fR にできるように、
953 この記述を拡張することもできる。
954 .PP
955 .Vb 2
956 \& dgb    boulder = (operator : operator) /bin/ls, (root) /bin/kill, \e
957 \&        /usr/bin/lprm
958 .Ve
959 .PP
960 .\"O Note that while the group portion of the \f(CW\*(C`Runas_Spec\*(C'\fR permits the
961 .\"O user to run as command with that group, it does not force the user
962 .\"O to do so.  If no group is specified on the command line, the command
963 .\"O will run with the group listed in the target user's password database
964 .\"O entry.  The following would all be permitted by the sudoers entry above:
965 .\"O .PP
966 注意してほしいが、\f(CW\*(C`Runas_Spec\*(C'\fR のグループの部分は、
967 コマンドをそのグループとして実行することをユーザに許可しているのであって、
968 そうすることをユーザに強制しているのではない。コマンドラインで
969 グループを指定しない場合は、コマンドは、パスワード・データベースにある
970 変身対象ユーザのエントリに登録されているグループとして
971 実行されることになるのだ。以下のコマンドはすべて、上記の sudoers
972 エントリによって許可されることになるだろう。
973 .PP
974 .Vb 3
975 \& $ sudo \-u operator /bin/ls
976 \& $ sudo \-u operator \-g operator /bin/ls
977 \& $ sudo \-g operator /bin/ls
978 .Ve
979 .PP
980 .\"O In the following example, user \fBtcm\fR may run commands that access
981 .\"O a modem device file with the dialer group.
982 .\"O .PP
983 次の例では、ユーザ \fBtcm\fR が
984 モデムのデバイスファイルにアクセスするコマンドを
985 dialer グループとして実行できるようにしている。
986 .PP
987 .Vb 2
988 \& tcm    boulder = (:dialer) /usr/bin/tip, /usr/bin/cu, \e
989 \&        /usr/local/bin/minicom
990 .Ve
991 .PP
992 .\"O Note that in this example only the group will be set, the command
993 .\"O still runs as user \fBtcm\fR.  E.g.
994 .\"O .PP
995 この例では、グループしか指定できないことに注意してほしい。コマンドは
996 ユーザ \fBtcm\fR の資格のまま実行されるのである。たとえば、次のように。
997 .PP
998 .Vb 1
999 \& $ sudo \-g dialer /usr/bin/cu
1000 .Ve
1001 .PP
1002 .\"O Multiple users and groups may be present in a \f(CW\*(C`Runas_Spec\*(C'\fR, in
1003 .\"O which case the user may select any combination of users and groups
1004 .\"O via the \fB\-u\fR and \fB\-g\fR options.  In this example:
1005 .\"O .PP
1006 \&\f(CW\*(C`Runas_Spec\*(C'\fR には複数のユーザやグループが存在してもよい。
1007 その場合、ユーザは \fB\-u\fR や \fB\-g\fR オプションを使って、
1008 ユーザとグループのどんな組み合わせでも選択することができる。
1009 .PP
1010 .Vb 1
1011 \& alan   ALL = (root, bin : operator, system) ALL
1012 .Ve
1013 .PP
1014 .\"O user \fBalan\fR may run any command as either user root or bin,
1015 .\"O optionally setting the group to operator or system.
1016 この例では、ユーザ \fBalan\fR は root と bin ユーザのどちらに変身して、
1017 任意のコマンドを実行することもできる。また、グループを
1018 operator や system に設定することも自由である。
1019 .if \n(SL \{\
1020 .SS "SELinux_Spec"
1021 .IX Subsection "SELinux_Spec"
1022 .\"O On systems with SELinux support, \fIsudoers\fR entries may optionally have
1023 .\"O an SELinux role and/or type associated with a command.  If a role or
1024 .\"O type is specified with the command it will override any default values
1025 .\"O specified in \fIsudoers\fR.  A role or type specified on the command line,
1026 .\"O however, will supercede the values in \fIsudoers\fR.
1027 SELinux をサポートするシステムでは、\fIsudoers\fR のエントリで
1028 SELinux の role や type をコマンドに関連付けることも可能である。
1029 コマンドについて指定した role や type は、\fIsudoers\fR 中で
1030 role や type にデフォルトの値が設定されていても、それよりも優先される。
1031 もっとも、role や type をコマンドラインで指定すれば、
1032 そちらが \fIsudoers\fR 中の値よりさらに優先されることになる。
1033 \}
1034 .SS "Tag_Spec"
1035 .IX Subsection "Tag_Spec"
1036 .\"O A command may have zero or more tags associated with it.  There are
1037 .\"O eight possible tag values, \f(CW\*(C`NOPASSWD\*(C'\fR, \f(CW\*(C`PASSWD\*(C'\fR, \f(CW\*(C`NOEXEC\*(C'\fR,
1038 .\"O \&\f(CW\*(C`EXEC\*(C'\fR, \f(CW\*(C`SETENV\*(C'\fR, \f(CW\*(C`NOSETENV\*(C'\fR, \f(CW\*(C`LOG_INPUT\*(C'\fR, \f(CW\*(C`NOLOG_INPUT\*(C'\fR,
1039 .\"O \&\f(CW\*(C`LOG_OUTPUT\*(C'\fR and \f(CW\*(C`NOLOG_OUTPUT\*(C'\fR.  Once a tag is set on a \f(CW\*(C`Cmnd\*(C'\fR,
1040 .\"O subsequent \f(CW\*(C`Cmnd\*(C'\fRs in the \f(CW\*(C`Cmnd_Spec_List\*(C'\fR, inherit the tag unless
1041 .\"O it is overridden by the opposite tag (i.e.: \f(CW\*(C`PASSWD\*(C'\fR overrides
1042 .\"O \&\f(CW\*(C`NOPASSWD\*(C'\fR and \f(CW\*(C`NOEXEC\*(C'\fR overrides \f(CW\*(C`EXEC\*(C'\fR).
1043 .\"O .PP
1044 コマンドは 0 個以上のタグを伴うことができる。使用できるタグの値は 10 個あり、 
1045 \&\f(CW\*(C`NOPASSWD\*(C'\fR, \f(CW\*(C`PASSWD\*(C'\fR,
1046 \&\f(CW\*(C`NOEXEC\*(C'\fR, \f(CW\*(C`EXEC\*(C'\fR,
1047 \&\f(CW\*(C`SETENV\*(C'\fR, \f(CW\*(C`NOSETENV\*(C'\fR,
1048 \&\f(CW\*(C`LOG_INPUT\*(C'\fR, \f(CW\*(C`NOLOG_INPUT\*(C'\fR,
1049 \&\f(CW\*(C`LOG_OUTPUT\*(C'\fR, \f(CW\*(C`NOLOG_OUTPUT\*(C'\fR
1050 が、それである。ある \f(CW\*(C`Cmnd\*(C'\fR にタグをセットすると、
1051 \&\f(CW\*(C`Cmnd_Spec_List\*(C'\fR 中のそれ以後の 
1052 \&\f(CW\*(C`Cmnd\*(C'\fR は、反対の意味を持つタグによって変更されないかぎり、
1053 そのタグを継承することになる (すなわち、\f(CW\*(C`PASSWD\*(C'\fR は 
1054 \&\f(CW\*(C`NOPASSWD\*(C'\fR を上書きし、\f(CW\*(C`NOEXEC\*(C'\fR は 
1055 \&\f(CW\*(C`EXEC\*(C'\fR を上書きする)。
1056 .PP
1057 .\"O \fI\s-1NOPASSWD\s0 and \s-1PASSWD\s0\fR
1058 \fI\s-1NOPASSWD\s0 と \s-1PASSWD\s0\fR
1059 .IX Subsection "NOPASSWD and PASSWD"
1060 .PP
1061 .\"O By default, \fBsudo\fR requires that a user authenticate him or herself
1062 .\"O before running a command.  This behavior can be modified via the
1063 .\"O \&\f(CW\*(C`NOPASSWD\*(C'\fR tag.  Like a \f(CW\*(C`Runas_Spec\*(C'\fR, the \f(CW\*(C`NOPASSWD\*(C'\fR tag sets
1064 .\"O a default for the commands that follow it in the \f(CW\*(C`Cmnd_Spec_List\*(C'\fR.
1065 .\"O Conversely, the \f(CW\*(C`PASSWD\*(C'\fR tag can be used to reverse things.
1066 .\"O For example:
1067 .\"O .PP
1068 デフォルトでは、\fBsudo\fR はコマンドを実行する前に、
1069 ユーザが本人であることを証明するように求める。この振舞いは 
1070 \&\f(CW\*(C`NOPASSWD\*(C'\fR タグによって変更することができる。
1071 \&\f(CW\*(C`Runas_Spec\*(C'\fR と同様、\f(CW\*(C`NOPASSWD\*(C'\fR タグも 
1072 \&\f(CW\*(C`Cmnd_Spec_List\*(C'\fR 中のそれに続くコマンドに対して
1073 デフォルトを定める。
1074 \&\f(CW\*(C`PASSWD\*(C'\fR の働きは反対であり、
1075 振舞いを元に戻したいときに使える。たとえば、
1076 .PP
1077 .Vb 1
1078 \& ray    rushmore = NOPASSWD: /bin/kill, /bin/ls, /usr/bin/lprm
1079 .Ve
1080 .PP
1081 .\"O would allow the user \fBray\fR to run \fI/bin/kill\fR, \fI/bin/ls\fR, and
1082 .\"O \&\fI/usr/bin/lprm\fR as \fBroot\fR on the machine rushmore without
1083 .\"O authenticating himself.  If we only want \fBray\fR to be able to
1084 .\"O run \fI/bin/kill\fR without a password the entry would be:
1085 .\"O .PP
1086 とすれば、ユーザ \fBray\fR はマシン rushmore 上で認証をしないでも 
1087 \&\fBroot\fR として \fI/bin/kill\fR, \fI/bin/ls\fR,
1088 \&\fI/usr/bin/lprm\fR を実行できるようになる。もし \fBray\fR
1089 がパスワードなしで実行できるコマンドを \fI/bin/kill\fR だけに絞りたいのなら、
1090 エントリはこうなるだろう。
1091 .PP
1092 .Vb 1
1093 \& ray    rushmore = NOPASSWD: /bin/kill, PASSWD: /bin/ls, /usr/bin/lprm
1094 .Ve
1095 .PP
1096 .\"O Note, however, that the \f(CW\*(C`PASSWD\*(C'\fR tag has no effect on users who are
1097 .\"O in the group specified by the \fIexempt_group\fR option.
1098 .\"O .PP
1099 ただし、ユーザが \fIexempt_group\fR オプションで指定されているグループに属する場合は、
1100 \&\f(CW\*(C`PASSWD\*(C'\fR タグが効果を持たないことに注意してほしい。
1101 .PP
1102 .\"O By default, if the \f(CW\*(C`NOPASSWD\*(C'\fR tag is applied to any of the entries
1103 .\"O for a user on the current host, he or she will be able to run
1104 .\"O \&\f(CW\*(C`sudo \-l\*(C'\fR without a password.  Additionally, a user may only run
1105 .\"O \&\f(CW\*(C`sudo \-v\*(C'\fR without a password if the \f(CW\*(C`NOPASSWD\*(C'\fR tag is present
1106 .\"O for all a user's entries that pertain to the current host.
1107 .\"O This behavior may be overridden via the verifypw and listpw options.
1108 .\"O .PP
1109 デフォルトでは、現在使用中のホストに関するユーザのエントリのうちに 
1110 \&\f(CW\*(C`NOPASSWD\*(C'\fR タグが指定されているものが一つでもあれば、
1111 そのユーザはパスワードなしで \f(CW\*(C`sudo \-l\*(C'\fR を実行できる。
1112 なお、ユーザがパスワードなしで \f(CW\*(C`sudo \-v\*(C'\fR を実行できるのは、
1113 現在使用中のホストに関するそのユーザのエントリのすべてで
1114 \&\f(CW\*(C`NOPASSWD\*(C'\fR タグが生きているときのみである。この動作は、
1115 \&\fIverifypw\fR や \fIlistpw\fR オプションによって変更できる。
1116 .PP
1117 .\"O \fI\s-1NOEXEC\s0 and \s-1EXEC\s0\fR
1118 \fI\s-1NOEXEC\s0 と \s-1EXEC\s0\fR
1119 .IX Subsection "NOEXEC and EXEC"
1120 .PP
1121 .\"O If \fBsudo\fR has been compiled with \fInoexec\fR support and the underlying
1122 .\"O operating system supports it, the \f(CW\*(C`NOEXEC\*(C'\fR tag can be used to prevent
1123 .\"O a dynamically-linked executable from running further commands itself.
1124 .\"O .PP
1125 \&\fBsudo\fR が \fInoexec\fR サポートつきでコンパイルされ、
1126 使用しているオペレーティングシステムがそれに対応している場合、
1127 \&\f(CW\*(C`NOEXEC\*(C'\fR タグを利用すれば、動的にリンクされた実行ファイルが
1128 そこからさらにコマンドを実行するのを防ぐことができる。
1129 .PP
1130 .\"O In the following example, user \fBaaron\fR may run \fI/usr/bin/more\fR
1131 .\"O and \fI/usr/bin/vi\fR but shell escapes will be disabled.
1132 .\"O .PP
1133 次の例では、ユーザ \fBaaron\fR は \fI/usr/bin/more\fR と 
1134 \&\fI/usr/bin/vi\fR を実行できるが、シェル・エスケープは利用できない。
1135 .PP
1136 .Vb 1
1137 \& aaron  shanty = NOEXEC: /usr/bin/more, /usr/bin/vi
1138 .Ve
1139 .PP
1140 .\"O See the \*(L"\s-1PREVENTING\s0 \s-1SHELL\s0 \s-1ESCAPES\s0\*(R" section below for more details
1141 .\"O on how \f(CW\*(C`NOEXEC\*(C'\fR works and whether or not it will work on your system.
1142 .\"O .PP
1143 \&\f(CW\*(C`NOEXEC\*(C'\fR がどんなふうに働くのか、お使いのシステムで利用できるかどうか、
1144 などについてさらに詳しく知りたかったら、
1145 「シェル・エスケープを防止する」のセクションを御覧になるとよい。
1146 .PP
1147 .\"O \fI\s-1SETENV\s0 and \s-1NOSETENV\s0\fR
1148 \fI\s-1SETENV\s0 と \s-1NOSETENV\s0\fR
1149 .IX Subsection "SETENV and NOSETENV"
1150 .PP
1151 .\"O These tags override the value of the \fIsetenv\fR option on a per-command
1152 .\"O basis.  Note that if \f(CW\*(C`SETENV\*(C'\fR has been set for a command, the user
1153 .\"O may disable the \fIenv_reset\fR option from the command line via the
1154 .\"O \&\fB\-E\fR option.  Additionally, environment variables set on the command
1155 .\"O line are not subject to the restrictions imposed by \fIenv_check\fR,
1156 .\"O \&\fIenv_delete\fR, or \fIenv_keep\fR.  As such, only trusted users should
1157 .\"O be allowed to set variables in this manner.  If the command matched
1158 .\"O is \fB\s-1ALL\s0\fR, the \f(CW\*(C`SETENV\*(C'\fR tag is implied for that command; this
1159 .\"O default may be overridden by use of the \f(CW\*(C`NOSETENV\*(C'\fR tag.
1160 .\"O .PP
1161 上記のタグは \fIsetenv\fR オプションの値をコマンドごとに変更する。
1162 あるコマンドに対して \f(CW\*(C`SETENV\*(C'\fR を設定すると、
1163 ユーザがコマンドラインから \fB\-E\fR オプションを使用して、
1164 \fIenv_reset\fR オプションを無効にできるようになることに注意してほしい。
1165 それだけではない。コマンドラインから設定する環境変数が \fIenv_check\fR,
1166 \&\fIenv_delete\fR, \fIenv_keep\fR による規制を受けないようにもなる。
1167 それ故、こうした形で環境変数を設定することを許可するのは、
1168 信用できるユーザだけに限るべきである。なお、マッチするコマンドが
1169 \&\fB\s-1ALL\s0\fR だった場合は、暗黙のうちに \f(CW\*(C`SETENV\*(C'\fR
1170 タグがそのコマンドに付けられるが、このデフォルトの動作は
1171 \&\f(CW\*(C`UNSETENV\*(C'\fR タグを使えば打ち消すことができる。
1172 .PP
1173 .\"O \fI\s-1LOG_INPUT\s0 and \s-1NOLOG_INPUT\s0\fR
1174 \fI\s-1LOG_INPUT\s0 と \s-1NOLOG_INPUT\s0\fR
1175 .IX Subsection "LOG_INPUT and NOLOG_INPUT"
1176 .PP
1177 .\"O These tags override the value of the \fIlog_input\fR option on a
1178 .\"O per-command basis.  For more information, see the description of
1179 .\"O \&\fIlog_input\fR in the \*(L"\s-1SUDOERS\s0 \s-1OPTIONS\s0\*(R" section below.
1180 .\"O .PP
1181 この二つのタグは \fIlog_input\fR オプションの値をコマンドごとに変更する。
1182 詳しい情報については、後述する「SUDOERS のオプション」セクションの
1183 \&\fIlog_input\fR の説明をご覧になっていただきたい。
1184 .PP
1185 .\"O \fI\s-1LOG_OUTPUT\s0 and \s-1NOLOG_OUTPUT\s0\fR
1186 \fI\s-1LOG_OUTPUT\s0 と \s-1NOLOG_OUTPUT\s0\fR
1187 .IX Subsection "LOG_OUTPUT and NOLOG_OUTPUT"
1188 .PP
1189 .\"O These tags override the value of the \fIlog_output\fR option on a
1190 .\"O per-command basis.  For more information, see the description of
1191 .\"O \&\fIlog_output\fR in the \*(L"\s-1SUDOERS\s0 \s-1OPTIONS\s0\*(R" section below.
1192 この二つのタグは \fIlog_output\fR オプションの値をコマンドごとに変更する。
1193 詳しい情報については、後述する「SUDOERS のオプション」セクションの
1194 \&\fIlog_output\fR の説明をご覧になっていただきたい。
1195 .\"O .SS "Wildcards"
1196 .SS "ワイルドカード"
1197 .IX Subsection "Wildcards"
1198 .\"O \&\fBsudo\fR allows shell-style \fIwildcards\fR (aka meta or glob characters)
1199 .\"O to be used in host names, path names and command line arguments in
1200 .\"O the \fIsudoers\fR file.  Wildcard matching is done via the \fB\s-1POSIX\s0\fR
1201 .\"O \&\fIglob\fR\|(3) and \fIfnmatch\fR\|(3) routines.  Note that these are \fInot\fR
1202 .\"O regular expressions.
1203 \&\fIsudoers\fR ファイルでは、ホスト名、コマンドラインのパス名、
1204 コマンドラインの引き数にシェル形式のワイルドカード (メタ文字とか
1205 glob キャラクタとも言う) が使用できる。ワイルドカードのマッチングは
1206 \&\fB\s-1POSIX\s0\fR の \fIglob\fR\|(3) と \fIfnmatch\fR\|(3)
1207 ルーティンを用いて行われる。
1208 \&\fB以下のものは正規表現ではない\fRことに注意してほしい。
1209 .ie n .IP "\*(C`*\*(C'" 8
1210 .el .IP "\f(CW\*(C`*\*(C'\fR" 8
1211 .IX Item "*"
1212 .\"O Matches any set of zero or more characters.
1213 ゼロ個以上の任意の文字にマッチする。
1214 .ie n .IP "\*(C`?\*(C'" 8
1215 .el .IP "\f(CW\*(C`?\*(C'\fR" 8
1216 .IX Item "?"
1217 .\"O Matches any single character.
1218 任意の一文字にマッチする。
1219 .ie n .IP "\*(C`[...]\*(C'" 8
1220 .el .IP "\f(CW\*(C`[...]\*(C'\fR" 8
1221 .IX Item "[...]"
1222 .\"O Matches any character in the specified range.
1223 指定された範囲の任意の一文字にマッチする。
1224 .ie n .IP "\*(C`[!...]\*(C'" 8
1225 .el .IP "\f(CW\*(C`[!...]\*(C'\fR" 8
1226 .IX Item "[!...]"
1227 .\"O Matches any character \fBnot\fR in the specified range.
1228 指定された範囲\fB以外\fRの任意の一文字にマッチする。
1229 .ie n .IP "\*(C`\ex\*(C'" 8
1230 .el .IP "\f(CW\*(C`\ex\*(C'\fR" 8
1231 .IX Item "x"
1232 .\"O For any character \*(L"x\*(R", evaluates to \*(L"x\*(R".  This is used to
1233 .\"O escape special characters such as: \*(L"*\*(R", \*(L"?\*(R", \*(L"[\*(R", and \*(L"}\*(R".
1234 .\"O .PP
1235 \&\*(L"x\*(R" がどんな文字であっても、\*(L"x\*(R" そのものとして評価する。
1236 この表記法は \*(L"*\*(R", \*(L"?\*(R", \*(L"[\*(R", \*(L"}\*(R"
1237 といった特殊文字をエスケープするために使用される。
1238 .PP
1239 .\"O \&\s-1POSIX\s0 character classes may also be used if your system's \fIglob\fR\|(3)
1240 .\"O and \fIfnmatch\fR\|(3) functions support them.  However, because the
1241 .\"O \&\f(CW\*(Aq:\*(Aq\fR character has special meaning in \fIsudoers\fR, it must be
1242 .\"O escaped.  For example:
1243 .\"O .PP
1244 使用システムの \fIglob\fR\|(3) や \fIfnmatch\fR\|(3) 関数が
1245 \&\s-1POSIX\s0 の文字クラスに対応しているなら、文字クラスも使用できる。
1246 ただし、\f(CW\*(Aq:\*(Aq\fR 文字は、
1247 \&\fIsudoers\fR で特別な意味を持っているので、エスケープしなければならない。
1248 一例を上げると、
1249 .PP
1250 .Vb 1
1251 \&    /bin/ls [[\e:alpha\e:]]*
1252 .Ve
1253 .PP
1254 .\"O Would match any file name beginning with a letter.
1255 .\"O .PP
1256 上記は、文字で始まるどんなファイル名にもマッチするだろう。
1257 .PP
1258 .\"O Note that a forward slash ('/') will \fBnot\fR be matched by
1259 .\"O wildcards used in the path name.  When matching the command
1260 .\"O line arguments, however, a slash \fBdoes\fR get matched by
1261 .\"O wildcards.  This is to make a path like:
1262 コマンドのパス名に使われたワイルドカードはフォワードスラッシュ ('/') 
1263 に\fBマッチしない\fRことに注意してほしい。
1264 だが、コマンドライン引き数とのマッチングでは、
1265 ワイルドカードはスラッシュと\fBしっかりマッチする\fR。そこで、
1266 .PP
1267 .Vb 1
1268 \&    /usr/bin/*
1269 .Ve
1270 .PP
1271 .\"O match \fI/usr/bin/who\fR but not \fI/usr/bin/X11/xterm\fR.
1272 というコマンドパスは、\fI/usr/bin/who\fR とマッチするが、
1273 \&\fI/usr/bin/X11/xterm\fR とはマッチしないことになる。
1274 .\"O .SS "Exceptions to wildcard rules"
1275 .SS "ワイルドカード・ルールの例外"
1276 .IX Subsection "Exceptions to wildcard rules"
1277 .\"O The following exceptions apply to the above rules:
1278 上記ルールには次の例外がある。
1279 .ie n .IP """""" 8
1280 .el .IP "\f(CW``''\fR" 8
1281 .IX Item """"""
1282 .\"O If the empty string \f(CW""\fR is the only command line argument in the
1283 .\"O \&\fIsudoers\fR entry it means that command is not allowed to be run
1284 .\"O with \fBany\fR arguments.
1285 \&\fIsudoers\fR ファイルのエントリにおいて、空文字列 \f(CW""\fR
1286 が唯一のコマンドライン引き数だった場合は、そのコマンドは引数を\fB付けずに\fR
1287 実行しなければならないことを意味する。
1288 .\"O .SS "Including other files from within sudoers"
1289 .SS "sudoers に他のファイルをインクルードする"
1290 .IX Subsection "Including other files from within sudoers"
1291 .\"O It is possible to include other \fIsudoers\fR files from within the
1292 .\"O \&\fIsudoers\fR file currently being parsed using the \f(CW\*(C`#include\*(C'\fR and
1293 .\"O \&\f(CW\*(C`#includedir\*(C'\fR directives.
1294 .\"O .PP
1295 \&\f(CW\*(C`#include\*(C'\fR 命令や \f(CW\*(C`#includedir\*(C'\fR
1296 命令を使えば、現在解析中の \fIsudoers\fR ファイルに、外部にあるほかの
1297 \&\fIsudoers\fR ファイルをインクルードすることができる。
1298 .PP
1299 .\"O This can be used, for example, to keep a site-wide \fIsudoers\fR file
1300 .\"O in addition to a local, per-machine file.  For the sake of this
1301 .\"O example the site-wide \fIsudoers\fR will be \fI/etc/sudoers\fR and the
1302 .\"O per-machine one will be \fI/etc/sudoers.local\fR.  To include
1303 .\"O \&\fI/etc/sudoers.local\fR from within \fI/etc/sudoers\fR we would use the
1304 .\"O following line in \fI/etc/sudoers\fR:
1305 この方法を使えば、たとえば、
1306 サイト全体で使用する \fIsudoers\fR ファイルのほかに、
1307 マシンごとのローカルな \fIsudoers\fR ファイルを持つことができる。
1308 ここでは、サイト全体の \fIsudoers\fR を \fI/etc/sudoers\fR とし、
1309 マシンごとの方は \fI/etc/sudoers.local\fR とすることにしよう。
1310 \&\fI/etc/sudoers\fR に \fI/etc/sudoers.local\fR をインクルードするには、
1311 \&\fI/etc/sudoers\fR 中に次の行を書き込む。
1312 .Sp
1313 .RS 4
1314 \&\f(CW\*(C`#include /etc/sudoers.local\*(C'\fR
1315 .RE
1316 .PP
1317 .\"O When \fBsudo\fR reaches this line it will suspend processing of the
1318 .\"O current file (\fI/etc/sudoers\fR) and switch to \fI/etc/sudoers.local\fR.
1319 .\"O Upon reaching the end of \fI/etc/sudoers.local\fR, the rest of
1320 .\"O \&\fI/etc/sudoers\fR will be processed.  Files that are included may
1321 .\"O themselves include other files.  A hard limit of 128 nested include
1322 .\"O files is enforced to prevent include file loops.
1323 .\"O .PP
1324 \&\fBsudo\fR は解析中この行に出会うと、カレントファイル
1325 (\fI/etc/sudoers\fR だ) の処理を一時中止し、処理の対象を
1326 \&\fI/etc/sudoers.local\fR に切り替える。そして、
1327 \&\fI/etc/sudoers.local\fR の末尾まで達したら、\fI/etc/sudoers\fR
1328 の残りを処理するのだ。
1329 インクルードされたファイルがさらに他のファイルをインクルードしてもよい。
1330 インクルートのネストには 128 ファイルまでというハード・リミットがあって、
1331 インクルードファイルのループが起きないようになっている。
1332 .PP
1333 .\"O If the path to the include file is not fully-qualified (does not
1334 .\"O begin with a \fI/\fR), it must be located in the same directory as the
1335 .\"O sudoers file it was included from.  For example, if \fI/etc/sudoers\fR
1336 .\"O contains the line:
1337 .\"O .Sp
1338 .\"O .RS 4
1339 .\"O \&\f(CW\*(C`#include sudoers.local\*(C'\fR
1340 .\"O .RE
1341 .\"O .PP
1342 .\"O the file that will be included is \fI/etc/sudoers.local\fR.
1343 .\"O .PP
1344 インクルードファイルのパスが絶対パスでない場合は (すなわち、パスが
1345 \&\fI/\fR で始まっていない場合は)、インクルードを指定する sudoers
1346 ファイルと同じディレクトリにインクルードファイルも存在しなければならない。
1347 たとえば、
1348 \&\fI/etc/sudoers\fR に次のような行があったら、
1349 .Sp
1350 .RS 4
1351 \&\f(CW\*(C`#include sudoers.local\*(C'\fR
1352 .RE
1353 .PP
1354 インクルードされるファイルは、\fI/etc/sudoers.local\fR である。
1355 (訳注: インクルードファイルのディレクトリ部分を省略できるのは、
1356 sudo-1.8.4 以上である。sudo-1.8.3 以前では、絶対パスで指定しなければならない。) 
1357 .PP
1358 .\"O The file name may also include the \f(CW%h\fR escape, signifying the short form
1359 .\"O of the host name.  I.e., if the machine's host name is \*(L"xerxes\*(R", then
1360 .\"O .PP
1361 なお、ファイル名には \f(CW%h\fR エスケープが使える。
1362 これはホスト名の短縮形を示している。
1363 たとえば、マシンのホスト名が \*(L"xerxes\*(R" のとき、
1364 .Sp
1365 .RS 4
1366 \&\f(CW\*(C`#include /etc/sudoers.%h\*(C'\fR
1367 .RE
1368 .PP
1369 .\"O will cause \fBsudo\fR to include the file \fI/etc/sudoers.xerxes\fR.
1370 .\"O .PP
1371 と書けば、\fBsudo\fR はファイル \fI/etc/sudoers.xerxes\fR
1372 をインクルードすることになる。
1373 .PP
1374 .\"O The \f(CW\*(C`#includedir\*(C'\fR directive can be used to create a \fIsudo.d\fR
1375 .\"O directory that the system package manager can drop \fIsudoers\fR rules
1376 .\"O into as part of package installation.  For example, given:
1377 .\"O .PP
1378 \&\f(CW\*(C`#includedir\*(C'\fR 命令を使えば、
1379 \&\fIsudo.d\fR ディレクトリを作っておいて、
1380 システムのパッケージ管理者がパッケージをインストールする際に
1381 \&\fIsudoers\fR のルールを記したファイルをそこに入れてやる、
1382 といったことが可能になる。たとえば、次のように書くと、
1383 .Sp
1384 .RS 4
1385 \&\f(CW\*(C`#includedir /etc/sudoers.d\*(C'\fR
1386 .RE
1387 .PP
1388 .\"O \&\fBsudo\fR will read each file in \fI/etc/sudoers.d\fR, skipping file
1389 .\"O names that end in \f(CW\*(C`~\*(C'\fR or contain a \f(CW\*(C`.\*(C'\fR character to avoid causing
1390 .\"O problems with package manager or editor temporary/backup files.
1391 .\"O Files are parsed in sorted lexical order.  That is,
1392 .\"O \&\fI/etc/sudoers.d/01_first\fR will be parsed before
1393 .\"O \&\fI/etc/sudoers.d/10_second\fR.  Be aware that because the sorting is
1394 .\"O lexical, not numeric, \fI/etc/sudoers.d/1_whoops\fR would be loaded
1395 .\"O \&\fBafter\fR \fI/etc/sudoers.d/10_second\fR.  Using a consistent number
1396 .\"O of leading zeroes in the file names can be used to avoid such
1397 .\"O problems.
1398 .\"O .PP
1399 \&\fBsudo\fR は \fI/etc/sudoers.d\fR にあるファイルを一つづつ読み込む。
1400 ただし、末尾が \f(CW\*(C`~\*(C'\fR だったり、
1401 \&\f(CW\*(C`.\*(C'\fR 文字を含んでいたりするファイル名はスキップするが、
1402 これは、パッケージマネージャやエディタが作った、
1403 テンポラリファイルやバックアップファイルを読み込むような問題を起こさないためである。
1404 ファイルは辞書順にソートされて、解析される。
1405 すなわち、\fI/etc/sudoers.d/01_first\fR は \fI/etc/sudoers.d/10_second\fR
1406 より前に解析されるということだ。ソートは辞書順であって、数値の順ではないので、
1407 \&\fI/etc/sudoers.d/1_whoops\fR というファイルがあっても、
1408 \&\fI/etc/sudoers.d/10_second\fR
1409 \&\fBより後で\fRロードされることに注意してほしい。
1410 ファイル名の先頭を 0 で埋めて数字の桁を揃えれば、
1411 こうした問題を回避することができる。
1412 .PP
1413 .\"O Note that unlike files included via \f(CW\*(C`#include\*(C'\fR, \fBvisudo\fR will not
1414 .\"O edit the files in a \f(CW\*(C`#includedir\*(C'\fR directory unless one of them
1415 .\"O contains a syntax error.  It is still possible to run \fBvisudo\fR
1416 .\"O with the \f(CW\*(C`\-f\*(C'\fR flag to edit the files directly.
1417 気を付けてほしいが、
1418 \&\f(CW\*(C`#include\*(C'\fR でインクルードされたファイルとは違って
1419 (訳注: \fBvisudo\fR は \fI/etc/sudoers\fR を編集するとき、
1420 \&\f(CW\*(C`#include\*(C'\fR で指定したファイルがあれば、続けてそれも編集する)、
1421 \&\fBvisudo\fR が \f(CW\*(C`#includedir\*(C'\fR
1422 で指定したディレクトリのファイルまで編集するのは、
1423 シンタクスエラーを含むものがあるときだけである。
1424 とは言え、\fBvisudo\fR を \f(CW\*(C`\-f\*(C'\fR オプション付きで実行して、
1425 ディレクトリ中のファイルを直接編集することは可能だ。
1426 .\"O .SS "Other special characters and reserved words"
1427 .SS "ほかの特殊文字と予約語"
1428 .IX Subsection "Other special characters and reserved words"
1429 .\"O The pound sign ('#') is used to indicate a comment (unless it is
1430 .\"O part of a #include directive or unless it occurs in the context of
1431 .\"O a user name and is followed by one or more digits, in which case
1432 .\"O it is treated as a uid).  Both the comment character and any text
1433 .\"O after it, up to the end of the line, are ignored.
1434 .\"O .PP
1435 パウンド記号 ('#') はコメントを示すのに使用される
1436 (例外は、#include 命令の一部であるときや、ユーザ名に関連して現れ、
1437 その後に一個以上の数字が続くときであり、後者の場合は uid と見なされる)。
1438 コメント記号とそれに続くテキストは、行末にいたるまで無視される。
1439 .PP
1440 .\"O The reserved word \fB\s-1ALL\s0\fR is a built-in \fIalias\fR that always causes
1441 .\"O a match to succeed.  It can be used wherever one might otherwise
1442 .\"O use a \f(CW\*(C`Cmnd_Alias\*(C'\fR, \f(CW\*(C`User_Alias\*(C'\fR, \f(CW\*(C`Runas_Alias\*(C'\fR, or \f(CW\*(C`Host_Alias\*(C'\fR.
1443 .\"O You should not try to define your own \fIalias\fR called \fB\s-1ALL\s0\fR as the
1444 .\"O built-in alias will be used in preference to your own.  Please note
1445 .\"O that using \fB\s-1ALL\s0\fR can be dangerous since in a command context, it
1446 .\"O allows the user to run \fBany\fR command on the system.
1447 .\"O .PP
1448 予約語 \fB\s-1ALL\s0\fR は組込みのエイリアスであり、何に対してでもマッチする。
1449 \&\fB\s-1ALL\s0\fR は、\f(CW\*(C`Cmnd_Alias\*(C'\fR,
1450 \&\f(CW\*(C`User_Alias\*(C'\fR, \f(CW\*(C`Runas_Alias\*(C'\fR,
1451 \&\f(CW\*(C`Host_Alias\*(C'\fR を代わりに使えるところなら、
1452 どこでも使用できる。\fB\s-1ALL\s0\fR
1453 という名前のエイリアスを自分で定義しようとしてはいけない。
1454 組込みのエイリアスの方が、自分で作ったエイリアスより優先して使われるからだ。
1455 \&\fB\s-1ALL\s0\fR の使用には危険が伴うことがあるのを忘れないでいただきたい。
1456 なぜなら、\fB\s-1ALL\s0\fR をコマンドに関して使うと、
1457 ユーザにシステム上の\fBどんな\fRコマンドでも実行することを許してしまうからである。
1458 .PP
1459 .\"O An exclamation point ('!') can be used as a logical \fInot\fR operator
1460 .\"O both in an \fIalias\fR and in front of a \f(CW\*(C`Cmnd\*(C'\fR.  This allows one to
1461 .\"O exclude certain values.  Note, however, that using a \f(CW\*(C`!\*(C'\fR in
1462 .\"O conjunction with the built-in \f(CW\*(C`ALL\*(C'\fR alias to allow a user to
1463 .\"O run \*(L"all but a few\*(R" commands rarely works as intended (see \s-1SECURITY\s0
1464 .\"O \&\s-1NOTES\s0 below).
1465 .\"O .PP
1466 エクスクラメーションマーク ('!') は、エイリアスでも 
1467 \&\f(CW\*(C`Cmnd\*(C'\fR の前でも論理 \fInot\fR 演算子として使用できる。
1468 これによってある値を除外することが可能だ。しかしながら、
1469 組込みエイリアス \f(CW\*(C`ALL\*(C'\fR と \f(CW\*(C`!\*(C'\fR
1470 を組み合わせて、「二三のコマンド以外のすべての」コマンドの実行を
1471 あるユーザに許可しようとしても、
1472 思いどおりの動きになることはめったにないことに気を付けてほしい
1473 (下記の「セキュリティに関する注意点」を参照)。
1474 .PP
1475 .\"O Long lines can be continued with a backslash ('\e') as the last
1476 .\"O character on the line.
1477 .\"O .PP
1478 長い行は、行末にバックスラッシュ ('\e') を置けば、継続することができる。
1479 .PP
1480 .\"O Whitespace between elements in a list as well as special syntactic
1481 .\"O characters in a \fIUser Specification\fR ('=', ':', '(', ')') is optional.
1482 .\"O .PP
1483 リストにおける要素間やユーザ設定における構文用特殊文字 
1484 ('=', ':', '(', ')') の前後に空白文字 (whitespace)を入れることは、
1485 任意である。
1486 .PP
1487 .\"O The following characters must be escaped with a backslash ('\e') when
1488 .\"O used as part of a word (e.g.\ a user name or host name):
1489 .\"O \&'!', '=', ':', ',', '(', ')', '\e'.
1490 次の文字を単語 (ユーザ名とかホスト名とか) の一部として使うときは、
1491 バックスラッシュ ('\e') でエスケープしなければならない。
1492 \&'!', '=', ':', ',', '(', ')', '\e' がそれである。
1493 .\"O .SH "SUDOERS OPTIONS"
1494 .SH "SUDOERS のオプション"
1495 .IX Header "SUDOERS OPTIONS"
1496 .\"O \&\fBsudo\fR's behavior can be modified by \f(CW\*(C`Default_Entry\*(C'\fR lines, as
1497 .\"O explained earlier.  A list of all supported Defaults parameters,
1498 .\"O grouped by type, are listed below.
1499 .\"O .PP
1500 すでに説明したように、\fBsudo\fR の動作は 
1501 \&\f(CW\*(C`Default_Entry\*(C'\fR 行によって変更することができる。
1502 Defaults に与えることのできるパラメータについて、
1503 サポートされているもののすべてを、タイプ別にまとめて以下に列挙する。
1504 .PP
1505 .\"O \&\fBBoolean Flags\fR:
1506 \&\fBフラグ (真偽値)\fR:
1507 .IP "always_set_home" 16
1508 .IX Item "always_set_home"
1509 .\"O If enabled, \fBsudo\fR will set the \f(CW\*(C`HOME\*(C'\fR environment variable to the
1510 .\"O home directory of the target user (which is root unless the \fB\-u\fR
1511 .\"O option is used).  This effectively means that the \fB\-H\fR option is
1512 .\"O always implied.  Note that \f(CW\*(C`HOME\*(C'\fR is already set when the the
1513 .\"O \&\fIenv_reset\fR option is enabled, so \fIalways_set_home\fR is only
1514 .\"O effective for configurations where either \fIenv_reset\fR is disabled
1515 .\"O or \f(CW\*(C`HOME\*(C'\fR is present in the \fIenv_keep\fR list.
1516 .\"O This flag is \fIoff\fR by default.
1517 これを有効にすると、\fBsudo\fR は環境変数 \f(CW\*(C`HOME\*(C'\fR
1518 を変身対象ユーザの (\fB\-u\fR オプションが使用されないかぎり、root である)
1519 ホームディレクトリに設定する。事実上、暗黙のうちに
1520 \&\fBsudo\fR に \fB\-H\fR オプションが常に指定されることになるわけだ。
1521 気をつけてほしいのは、\fIenv_reset\fR オプションが有効になっている場合、
1522 \&\f(CW\*(C`HOME\*(C'\fR の値は (訳注: 変身対象ユーザのホームディレクトリに)
1523 すでに設定済みだということだ。だから、
1524 \&\fIalways_set_home\fR の指定に意味があるのは、
1525 \&\fIenv_reset\fR を無効に設定している場合か、
1526 \&\fIenv_keep\fR のリストに \f(CW\*(C`HOME\*(C'\fR が存在する場合のみである。
1527 このフラグはデフォルトでは \fIoff\fR である。
1528 .IP "authenticate" 16
1529 .IX Item "authenticate"
1530 .\"O If set, users must authenticate themselves via a password (or other
1531 .\"O means of authentication) before they may run commands.  This default
1532 .\"O may be overridden via the \f(CW\*(C`PASSWD\*(C'\fR and \f(CW\*(C`NOPASSWD\*(C'\fR tags.
1533 .\"O This flag is \fIon\fR by default.
1534 これをセットすると、ユーザはコマンドの実行を許可される前に、パスワードで
1535 (あるいは、ほかの認証方法で) 自分が本人であることを証明しなければならなくなる。
1536 このデフォルト値は
1537 \&\f(CW\*(C`PASSWD\*(C'\fR や \f(CW\*(C`NOPASSWD\*(C'\fR タグで変更できる。
1538 このフラグはデフォルトでは \fIon\fR である。
1539 .IP "closefrom_override" 16
1540 .IX Item "closefrom_override"
1541 .\"O If set, the user may use \fBsudo\fR's \fB\-C\fR option which
1542 .\"O overrides the default starting point at which \fBsudo\fR begins
1543 .\"O closing open file descriptors.  This flag is \fIoff\fR by default.
1544 これをセットすると、ユーザが \fBsudo\fR の \fB\-C\fR
1545 オプションを使用できるようになる。\fB\-C\fR オプションというのは、
1546 \&\fBsudo\fR が開いているファイルを閉じていくとき、
1547 どのファイル・ディスクリプタから閉じていくかという、
1548 デフォルトの始点を変更するものだ。このフラグはデフォルトでは \fIoff\fR である。
1549 .IP "compress_io" 16
1550 .IX Item "compress_io"
1551 .\"O If set, and \fBsudo\fR is configured to log a command's input or output,
1552 .\"O the I/O logs will be compressed using \fBzlib\fR.  This flag is \fIon\fR
1553 .\"O by default when \fBsudo\fR is compiled with \fBzlib\fR support.
1554 これをセットすると、
1555 \&\fBsudo\fR がコマンドの入出力のログを取るように設定されている場合に、
1556 入出力のログを \fBzlib\fR を使って、圧縮することになる。
1557 \&\fBsudo\fR が \fBzlib\fR をサポートするようにコンパイルされている場合、
1558 このフラグはデフォルトで \fIon\fR である。
1559 .IP "env_editor" 16
1560 .IX Item "env_editor"
1561 .\"O If set, \fBvisudo\fR will use the value of the \s-1EDITOR\s0 or \s-1VISUAL\s0
1562 .\"O environment variables before falling back on the default editor list.
1563 .\"O Note that this may create a security hole as it allows the user to
1564 .\"O run any arbitrary command as root without logging.  A safer alternative
1565 .\"O is to place a colon-separated list of editors in the \f(CW\*(C`editor\*(C'\fR
1566 .\"O variable.  \fBvisudo\fR will then only use the \s-1EDITOR\s0 or \s-1VISUAL\s0 if
1567 .\"O they match a value specified in \f(CW\*(C`editor\*(C'\fR.  This flag is \fIoff\fR by
1568 .\"O default.
1569 これをセットすると、
1570 \&\fBvisudo\fR はデフォルトのエディタ・リストを利用する前に、
1571 環境変数 \s-1EDITOR\s0 や \s-1VISUAL\s0 の値を使用するようになる。
1572 これがセキュリティホールになりかねないことに注意してほしい。
1573 ユーザが root として任意のコマンドを、
1574 ログに記録されることなく実行できるようになるからだ。
1575 こうした環境変数を利用するときの、
1576 \&\fIenv_editor\fR を有効にするよりも安全な方法は、
1577 \&\fIsudoers\fR ファイルの \f(CW\*(C`editor\*(C'\fR オプションに
1578 コロンで区切ったエディタのリストを書いておくことだ。そうすれば、
1579 \&\fBvisudo\fR が \s-1EDITOR\s0 や \s-1VISUAL\s0 を使うのは、それが
1580 \&\f(CW\*(C`editor\*(C'\fR オプションに指定した値とマッチしたときだけになる。
1581 このフラグはデフォルトでは \fIoff\fR である。
1582 .IP "env_reset" 16
1583 .IX Item "env_reset"
1584 .\"O If set, \fBsudo\fR will run the command in a minimal environment
1585 .\"O containing the \f(CW\*(C`TERM\*(C'\fR, \f(CW\*(C`PATH\*(C'\fR, \f(CW\*(C`HOME\*(C'\fR, \f(CW\*(C`MAIL\*(C'\fR, \f(CW\*(C`SHELL\*(C'\fR,
1586 .\"O \&\f(CW\*(C`LOGNAME\*(C'\fR, \f(CW\*(C`USER\*(C'\fR, \f(CW\*(C`USERNAME\*(C'\fR and \f(CW\*(C`SUDO_*\*(C'\fR variables.  Any
1587 .\"O variables in the caller's environment that match the \f(CW\*(C`env_keep\*(C'\fR
1588 .\"O and \f(CW\*(C`env_check\*(C'\fR lists are then added, followed by any variables
1589 .\"O present in the file specified by the \fIenv_file\fR option (if any).
1590 .\"O The default contents of the \f(CW\*(C`env_keep\*(C'\fR and \f(CW\*(C`env_check\*(C'\fR lists are
1591 .\"O displayed when \fBsudo\fR is run by root with the \fI\-V\fR option.  If
1592 .\"O the \fIsecure_path\fR option is set, its value will be used for the
1593 .\"O \&\f(CW\*(C`PATH\*(C'\fR environment variable.  This flag is \fIon\fR by
1594 .\"O default.
1595 これをセットすると、\fBsudo\fR は最小限の環境でコマンドを実行することになる。
1596 その環境には、以下の変数が含まれる。すなわち、
1597 \&\f(CW\*(C`TERM\*(C'\fR, \f(CW\*(C`PATH\*(C'\fR, \f(CW\*(C`HOME\*(C'\fR,
1598 \&\f(CW\*(C`MAIL\*(C'\fR, \f(CW\*(C`SHELL\*(C'\fR, \f(CW\*(C`LOGNAME\*(C'\fR,
1599 \&\f(CW\*(C`USER\*(C'\fR, \f(CW\*(C`USERNAME\*(C'\fR、
1600 及び \f(CW\*(C`SUDO_*\*(C'\fR という変数。
1601 これに、\fBsudo\fR を起動するユーザの環境にある変数のうち、
1602 \&\f(CW\*(C`env_keep\*(C'\fR や \f(CW\*(C`env_check\*(C'\fR
1603 のリストにマッチするものが加わり、さらに、
1604 \&\fIenv_file\fR オプションによって指定されたファイルがあれば、
1605 そのファイルに記載されたすべての変数が追加される。
1606 \&\f(CW\*(C`env_keep\*(C'\fR や \f(CW\*(C`env_check\*(C'\fR
1607 のリストにデフォルトでどんな変数が存在するかは、root ユーザが
1608 \&\fBsudo\fR に \fI\-V\fR オプションを付けて実行すれば、見ることができる。
1609 なお、\fIsecure_path\fR オプションが設定されているときは、
1610 その値が環境変数 \f(CW\*(C`PATH\*(C'\fR として使用される。
1611 このフラグはデフォルトで \fIon\fR である。
1612 .IP "fast_glob" 16
1613 .IX Item "fast_glob"
1614 .\"O Normally, \fBsudo\fR uses the \fIglob\fR\|(3) function to do shell-style
1615 .\"O globbing when matching path names.  However, since it accesses the
1616 .\"O file system, \fIglob\fR\|(3) can take a long time to complete for some
1617 .\"O patterns, especially when the pattern references a network file
1618 .\"O system that is mounted on demand (automounted).  The \fIfast_glob\fR
1619 .\"O option causes \fBsudo\fR to use the \fIfnmatch\fR\|(3) function, which does
1620 .\"O not access the file system to do its matching.  The disadvantage
1621 .\"O of \fIfast_glob\fR is that it is unable to match relative path names
1622 .\"O such as \fI./ls\fR or \fI../bin/ls\fR.  This has security implications
1623 .\"O when path names that include globbing characters are used with the
1624 .\"O negation operator, \f(CW\*(Aq!\*(Aq\fR, as such rules can be trivially bypassed.
1625 .\"O As such, this option should not be used when \fIsudoers\fR contains rules 
1626 .\"O that contain negated path names which include globbing characters.
1627 .\"O This flag is \fIoff\fR by default.
1628 通常 \fBsudo\fR はパス名のマッチングをするとき、\fIglob\fR\|(3)
1629 関数を使用して、シェル・スタイルのワイルドカード展開 (glob) を行う。
1630 しかし、\fIglob\fR\|(3) はファイルシステムにアクセスするので、
1631 指定パターンによっては、作業を完了するまでに時間がかかることがある。
1632 必要な時にマウントするようになっている (つまりオートマウントの)
1633 ネットワーク・ファイル・システムを参照するときは、とりわけ時間がかかる。
1634 \&\fIfast_glob\fR オプションを指定すると、
1635 \&\fBsudo\fR が \fIfnmatch\fR\|(3) 関数を使うようになるが、
1636 こちらの関数はマッチングの際にファイルシステムにアクセスしない。
1637 \&\fIfast_glob\fR の欠点は、\fI./ls\fR や \fI../bin/ls\fR
1638 のような相対パスに対するマッチができないことである。
1639 そのため、ワイルドカードを含むパス名が、否定演算子 \f(CW\*(Aq!\*(Aq\fR
1640 と一緒に使われている場合に、セキュリティ上の問題が生じるおそれがある。
1641 そうしたルールは簡単に迂回できるからだ。それ故、\fIsudoers\fR
1642 にワイルドカードを含むパス名を否定するルールが存在する場合は、
1643 このオプションを使ってはいけない。このフラグはデフォルトでは \fIoff\fR である。
1644 .IP "fqdn" 16
1645 .IX Item "fqdn"
1646 .\"O Set this flag if you want to put fully qualified host names in the
1647 .\"O \&\fIsudoers\fR file.  I.e., instead of myhost you would use myhost.mydomain.edu.
1648 .\"O You may still use the short form if you wish (and even mix the two).
1649 .\"O Beware that turning on \fIfqdn\fR requires \fBsudo\fR to make \s-1DNS\s0 lookups
1650 .\"O which may make \fBsudo\fR unusable if \s-1DNS\s0 stops working (for example
1651 .\"O if the machine is not plugged into the network).  Also note that
1652 .\"O you must use the host's official name as \s-1DNS\s0 knows it.  That is,
1653 .\"O you may not use a host alias (\f(CW\*(C`CNAME\*(C'\fR entry) due to performance
1654 .\"O issues and the fact that there is no way to get all aliases from
1655 .\"O \&\s-1DNS\s0.  If your machine's host name (as returned by the \f(CW\*(C`hostname\*(C'\fR
1656 .\"O command) is already fully qualified you shouldn't need to set
1657 .\"O \&\fIfqdn\fR.  This flag is \fIoff\fR by default.
1658 \&\fIsudoers\fR ファイルで完全修飾ホスト名を使用したかったら、
1659 このフラグをセットするとよい。すなわち、myhost ではなく、
1660 myhost.mydomain.edu を使いたい場合だ。そのときでも、そうしたければ、
1661 短縮形も使える (両方を混ぜて使うこともできる)。気を付けてほしいのは、
1662 \&\fIfqdn\fR を 有効にすると、
1663 \&\fBsudo\fR は \s-1DNS\s0 へ問い合わせをしなければならないので、
1664 \&\s-1DNS\s0 サービスが稼働していない場合、
1665 \&\fBsudo\fR が使えなくなるかもしれないということだ
1666 (たとえば、マシンがネットワークに接続していない場合)。
1667 もう一つ気を付けるべきことがある。
1668 \&\s-1DNS\s0 が知っているホストの正式名を使わなければならないということだ。
1669 言い換えれば、ホストのエイリアス (\f(CW\*(C`CNAME\*(C'\fR のエントリ)
1670 を使ってはいけない。パフォーマンスの問題もあるし、
1671 \&\s-1DNS\s0 からエイリアスをすべて取得する方法はないからでもある。
1672 マシンのホスト名が (\f(CW\*(C`hostname\*(C'\fR コマンドで返ってくるものが)
1673 すでに完全修飾名になっているならば、\fIfqdn\fR をセットする必要はないだろう。
1674 このフラグはデフォルトでは \fIoff\fR である。
1675 .IP "ignore_dot" 16
1676 .IX Item "ignore_dot"
1677 .\"O If set, \fBsudo\fR will ignore '.' or '' (current dir) in the \f(CW\*(C`PATH\*(C'\fR
1678 .\"O environment variable; the \f(CW\*(C`PATH\*(C'\fR itself is not modified.  This
1679 .\"O flag is \fIoff\fR by default.
1680 これをセットすると、環境変数 \f(CW\*(C`PATH\*(C'\fR 中に '.' や ''
1681 (カレントディレクトリを意味する) があっても、\fBsudo\fR はそれを無視する。
1682 \&\f(CW\*(C`PATH\*(C'\fR そのものは変更されない。このフラグは
1683 デフォルトでは \fIoff\fR である。
1684 .IP "ignore_local_sudoers" 16
1685 .IX Item "ignore_local_sudoers"
1686 .\"O If set via \s-1LDAP\s0, parsing of \fI/etc/sudoers\fR will be skipped.
1687 .\"O This is intended for Enterprises that wish to prevent the usage of local
1688 .\"O sudoers files so that only \s-1LDAP\s0 is used.  This thwarts the efforts of
1689 .\"O rogue operators who would attempt to add roles to \fI/etc/sudoers\fR.
1690 .\"O When this option is present, \fI/etc/sudoers\fR does not even need to
1691 .\"O exist. Since this option tells \fBsudo\fR how to behave when no specific \s-1LDAP\s0
1692 .\"O entries have been matched, this sudoOption is only meaningful for the
1693 .\"O \&\f(CW\*(C`cn=defaults\*(C'\fR section.  This flag is \fIoff\fR by default.
1694 \&\s-1LDAP\s0 の方でこのフラグをセットすると、
1695 \&\fI/etc/sudoers\fR の解析がスキップされる。
1696 このフラグは、ローカルにある sudoers ファイルの使用を禁じて、
1697 \&\s-1LDAP\s0 のみを使うようにしたい企業のためにある。
1698 たちの悪いオペレータが \fI/etc/sudoers\fR に手を加えて、
1699 自分の権限を増やそうとしても、そうした悪だくみは阻止されるわけだ。
1700 このオプションが設定されているときは、
1701 \&\fI/etc/sudoers\fR ファイルは存在する必要すらない。このオプションは、
1702 \&\s-1LDAP\s0 中に、マッチする特定のエントリが存在しなかったときに、
1703 いかに振舞うべきかを \fBsudo\fR に指示するものだから、
1704 これを指定する sudoOption は、
1705 \&\f(CW\*(C`cn=defaults\*(C'\fR のセクションになければ意味がない。
1706 このフラグはデフォルトでは \fIoff\fR である。
1707 .IP "insults" 16
1708 .IX Item "insults"
1709 .\"O If set, \fBsudo\fR will insult users when they enter an incorrect
1710 .\"O password.  This flag is \fIoff\fR by default.
1711 これをセットすると、不正なパスワードが入力されたとき、
1712 \&\fBsudo\fR がユーザに悪態をつく。このフラグはデフォルトでは \fIoff\fR
1713 である。
1714 .IP "log_host" 16
1715 .IX Item "log_host"
1716 .\"O If set, the host name will be logged in the (non-syslog) \fBsudo\fR log file.
1717 .\"O This flag is \fIoff\fR by default.
1718 これをセットすると、ホスト名が (syslog 経由ではない) \fBsudo\fR の
1719 ログファイルに記録されることになる。このフラグはデフォルトでは \fIoff\fR
1720 である。
1721 .IP "log_input" 16
1722 .IX Item "log_input"
1723 .\"O If set, \fBsudo\fR will run the command in a \fIpseudo tty\fR and log all
1724 .\"O user input.
1725 .\"O If the standard input is not connected to the user's tty, due to
1726 .\"O I/O redirection or because the command is part of a pipeline, that
1727 .\"O input is also captured and stored in a separate log file.
1728 .\"O .Sp
1729 これをセットすると、\fBsudo\fR は \fI擬似 tty\fR でコマンドを実行し、
1730 ユーザの入力をすべてログに取ることになる。入出力がリダイレクトされているとか、
1731 コマンドがパイプラインの一部だとかいう理由で、標準入力がユーザの tty
1732 に結びつけられていない場合も、その入力がキャプチャーされて、
1733 独立したログファイルに書き込まれることに変わりはない。
1734 .Sp
1735 .\"O Input is logged to the directory specified by the \fIiolog_dir\fR
1736 .\"O option (\fI/var/log/sudo-io\fR by default) using a unique session \s-1ID\s0 that
1737 .\"O is included in the normal \fBsudo\fR log line, prefixed with \fITSID=\fR.
1738 .\"O The \fIiolog_file\fR option may be used to control the format of the
1739 .\"O session \s-1ID\s0.
1740 .\"O .Sp
1741 入力は、\fIiolog_dir\fR オプションで指定したディレクトリに
1742 (デフォルトでは \fI/var/log/sudo-io\fR)、一意なセッション \s-1ID\s0
1743 を使って記録される。このセッション \s-1ID\s0 は \fBsudo\fR
1744 の通常のログのエントリに、\fITSID=\fR に続く値として書き込まれているものだ。
1745 \&\fIiolog_file\fR オプションを使えば、
1746 セッション \s-1ID\s0 の形式を変更することができる。
1747 .Sp
1748 .\"O Note that user input may contain sensitive information such as
1749 .\"O passwords (even if they are not echoed to the screen), which will
1750 .\"O be stored in the log file unencrypted.  In most cases, logging the
1751 .\"O command output via \fIlog_output\fR is all that is required.
1752 ユーザの入力には、パスワードのような (たとえ、
1753 画面にエコーされることはないにしても) 秘密情報が含まれていることがある。
1754 そういった情報も、暗号化されずに、
1755 ログファイルに記録されることに注意してほしい。
1756 たいていの場合、\fIlog_output\fR を使って、
1757 コマンドの出力をログに記録するだけで十分用が足りる。
1758 .IP "log_output" 16
1759 .IX Item "log_output"
1760 .\"O If set, \fBsudo\fR will run the command in a \fIpseudo tty\fR and log all
1761 .\"O output that is sent to the screen, similar to the \fIscript\fR\|(1) command.
1762 .\"O If the standard output or standard error is not connected to the
1763 .\"O user's tty, due to I/O redirection or because the command is part
1764 .\"O of a pipeline, that output is also captured and stored in separate
1765 .\"O log files.
1766 .\"O .Sp
1767 これをセットすると、\fBsudo\fR は \fI擬似 tty\fR でコマンドを実行し、
1768 スクリーンに送られたすべての出力をログに取ることになる。
1769 \&\fIscript\fR\|(1) コマンドと似たことをやるわけだ。
1770 入出力がリダイレクトされているとか、
1771 コマンドがパイプラインの一部だとかいう理由で、標準出力や標準エラーがユーザの
1772 tty に結びつけられていない場合も、その出力がキャプチャーされて、
1773 それぞれ独立したログファイルに書き込まれることに変わりはない。
1774 .Sp
1775 .\"O Output is logged to the directory specified by the \fIiolog_dir\fR
1776 .\"O option (\fI/var/log/sudo-io\fR by default) using a unique session \s-1ID\s0 that
1777 .\"O is included in the normal \fBsudo\fR log line, prefixed with \fITSID=\fR.
1778 .\"O The \fIiolog_file\fR option may be used to control the format of the
1779 .\"O session \s-1ID\s0.
1780 .\"O .Sp
1781 出力は、\fIiolog_dir\fR オプションで指定したディレクトリに
1782 (デフォルトでは \fI/var/log/sudo-io\fR)、一意なセッション \s-1ID\s0
1783 を使って記録される。このセッション \s-1ID\s0 は \fBsudo\fR
1784 の通常のログのエントリに 、\fITSID=\fR に続く値として書き込まれているものだ。
1785 \&\fIiolog_file\fR オプションを使えば、
1786 セッション \s-1ID\s0 の形式を変更することができる。
1787 .Sp
1788 .\"O Output logs may be viewed with the \fIsudoreplay\fR\|(8) utility, which
1789 .\"O can also be used to list or search the available logs.
1790 出力のログは \fIsudoreplay\fR\|(8) コマンドを使って、見ることができる。
1791 また、このコマンドは、利用できるログをリストしたり、
1792 検索したりするのにも使用できる。
1793 .IP "log_year" 16
1794 .IX Item "log_year"
1795 .\"O If set, the four-digit year will be logged in the (non-syslog) \fBsudo\fR log file.
1796 .\"O This flag is \fIoff\fR by default.
1797 これをセットすると、四桁の年が (syslog 経由ではない) \fBsudo\fR
1798 のログファイルに記入されることになる。このフラグはデフォルトでは \fIoff\fR 
1799 である。
1800 .IP "long_otp_prompt" 16
1801 .IX Item "long_otp_prompt"
1802 .\"O When validating with a One Time Password (\s-1OTP\s0) scheme such as
1803 .\"O \&\fBS/Key\fR or \fB\s-1OPIE\s0\fR, a two-line prompt is used to make it easier
1804 .\"O to cut and paste the challenge to a local window.  It's not as
1805 .\"O pretty as the default but some people find it more convenient.  This
1806 .\"O flag is \fIoff\fR by default.
1807 \&\fBS/Key\fR や \fB\s-1OPIE\s0\fR のような One Time Password
1808 (\s-1OTP\s0) スキームを採用しているときにこれを有効にすると、
1809 チャレンジをローカルウィンドウにカット・アンド・ペーストしやすいように、
1810 二行のプロンプトが使用される。デフォルトのプロンプトほど見栄えはよくないが、
1811 こちらの方が便利だと思う人もいる。デフォルトではこのフラグは \fIoff\fR である。
1812 .IP "mail_always" 16
1813 .IX Item "mail_always"
1814 .\"O Send mail to the \fImailto\fR user every time a users runs \fBsudo\fR.
1815 .\"O This flag is \fIoff\fR by default.
1816 ユーザが \fBsudo\fR を実行するたびに、\fImailto\fR ユーザにメールを送る。
1817 このフラグはデフォルトでは \fIoff\fR である。
1818 .IP "mail_badpass" 16
1819 .IX Item "mail_badpass"
1820 .\"O Send mail to the \fImailto\fR user if the user running \fBsudo\fR does not
1821 .\"O enter the correct password.  This flag is \fIoff\fR by default.
1822 \&\fBsudo\fR を実行するユーザが正しいパスワードを入力しないと、
1823 \&\fImailto\fR ユーザにメールを送る。このフラグはデフォルトでは 
1824 \&\fIoff\fR である。
1825 .IP "mail_no_host" 16
1826 .IX Item "mail_no_host"
1827 .\"O If set, mail will be sent to the \fImailto\fR user if the invoking
1828 .\"O user exists in the \fIsudoers\fR file, but is not allowed to run
1829 .\"O commands on the current host.  This flag is \fIoff\fR by default.
1830 これをセットすると、\fBsudo\fR を起動したユーザが \fIsudoers\fR
1831 ファイルに存在するものの、
1832 使用中のホストでコマンドの実行を許可されていない場合、
1833 \&\fImailto\fR ユーザにメールを送付する。このフラグはデフォルトでは 
1834 \&\fIoff\fR である。
1835 .IP "mail_no_perms" 16
1836 .IX Item "mail_no_perms"
1837 .\"O If set, mail will be sent to the \fImailto\fR user if the invoking
1838 .\"O user is allowed to use \fBsudo\fR but the command they are trying is not
1839 .\"O listed in their \fIsudoers\fR file entry or is explicitly denied.
1840 .\"O This flag is \fIoff\fR by default.
1841 これをセットすると、\fBsudo\fR を起動したユーザが
1842 \&\fBsudo\fR の使用を許可されているが、
1843 実行しようとしているコマンドが \fIsudoers\fR ファイルの
1844 そのユーザのエントリに登録されていないか、明示的に禁止されている場合、
1845 \&\fImailto\fR ユーザにメールを送付する。このフラグはデフォルトでは 
1846 \&\fIoff\fR である。
1847 .IP "mail_no_user" 16
1848 .IX Item "mail_no_user"
1849 .\"O If set, mail will be sent to the \fImailto\fR user if the invoking
1850 .\"O user is not in the \fIsudoers\fR file.  This flag is \fIon\fR
1851 .\"O by default.
1852 これをセットすると、\fBsudo\fR を起動したユーザが \fIsudoers\fR
1853 ファイルに記載されていない場合、\fImailto\fR ユーザにメールを送付する。
1854 このフラグはデフォルトでは \fIon\fR である。
1855 .IP "noexec" 16
1856 .IX Item "noexec"
1857 .\"O If set, all commands run via \fBsudo\fR will behave as if the \f(CW\*(C`NOEXEC\*(C'\fR
1858 .\"O tag has been set, unless overridden by a \f(CW\*(C`EXEC\*(C'\fR tag.  See the
1859 .\"O description of \fI\s-1NOEXEC\s0 and \s-1EXEC\s0\fR below as well as the \*(L"\s-1PREVENTING\s0 \s-1SHELL\s0
1860 .\"O \&\s-1ESCAPES\s0\*(R" section at the end of this manual.  This flag is \fIoff\fR by default.
1861 これをセットすると、\fBsudo\fR を通して実行されるすべてのコマンドが、
1862 \&\f(CW\*(C`EXEC\*(C'\fR タグで無効にされないかぎり、あたかも 
1863 \&\f(CW\*(C`NOEXEC\*(C'\fR タグが設定されているかのごとく振舞うようになる。
1864 前述の「\fI\s-1NOEXEC\s0 と \s-1EXEC\s0\fR」の説明、
1865 および、このマニュアルの終わりの方にある「シェル・エスケープを防止する」
1866 というセクションを参照してほしい。
1867 このフラグはデフォルトでは \fIoff\fR である。
1868 .IP "path_info" 16
1869 .IX Item "path_info"
1870 .\"O Normally, \fBsudo\fR will tell the user when a command could not be
1871 .\"O found in their \f(CW\*(C`PATH\*(C'\fR environment variable.  Some sites may wish
1872 .\"O to disable this as it could be used to gather information on the
1873 .\"O location of executables that the normal user does not have access
1874 .\"O to.  The disadvantage is that if the executable is simply not in
1875 .\"O the user's \f(CW\*(C`PATH\*(C'\fR, \fBsudo\fR will tell the user that they are not
1876 .\"O allowed to run it, which can be confusing.  This flag is \fIon\fR
1877 .\"O by default.
1878 通常 \fBsudo\fR は、環境変数 \f(CW\*(C`PATH\*(C'\fR
1879 中にコマンドが見付からないと、ユーザにそのことを知らせる。これを利用すれば、
1880 一般ユーザにアクセス権のない実行ファイルのありかについて
1881 情報を収集できるという理由から、
1882 この動作を無効にしたいサイトもあるかもしれない。
1883 その場合の欠点は、実行ファイルが単にユーザの \f(CW\*(C`PATH\*(C'\fR
1884 中になかっただけの場合でも、実行の許可がないと \fBsudo\fR
1885 がユーザに告げることになって、実情がわかりにくいかもしれないことである。
1886 このフラグはデフォルトでは \fIon\fR である。
1887 .IP "passprompt_override" 16
1888 .IX Item "passprompt_override"
1889 .\"O The password prompt specified by \fIpassprompt\fR will normally only
1890 .\"O be used if the password prompt provided by systems such as \s-1PAM\s0 matches
1891 .\"O the string \*(L"Password:\*(R".  If \fIpassprompt_override\fR is set, \fIpassprompt\fR
1892 .\"O will always be used.  This flag is \fIoff\fR by default.
1893 通常、\fIpassprompt\fR
1894 オプションによって指定されたパスワードプロンプトが使用されるのは、
1895 \&\s-1PAM\s0 のようなシステムが用意しているパスワードプロンプトが、
1896 \&\*(L"Password:\*(R" という文字列にマッチしているときだけである。
1897 \&\fIpassprompt_override\fR をセットすると、
1898 \&\fIpassprompt\fR が無条件で使われることになる。
1899 このフラグはデフォルトでは \fIoff\fR である。
1900 .IP "preserve_groups" 16
1901 .IX Item "preserve_groups"
1902 .\"O By default, \fBsudo\fR will initialize the group vector to the list of
1903 .\"O groups the target user is in.  When \fIpreserve_groups\fR is set, the
1904 .\"O user's existing group vector is left unaltered.  The real and
1905 .\"O effective group IDs, however, are still set to match the target
1906 .\"O user.  This flag is \fIoff\fR by default.
1907 デフォルトでは、\fBsudo\fR は所属グループの初期値として、
1908 変身対象ユーザが所属しているグループのリストを設定する。
1909 \&\fIpreserve_groups\fR をセットすると、
1910 \&\fBsudo\fR を実行するユーザの所属グループのリストが、
1911 変更されずにそのまま維持される。とは言え、実グループ ID や実効グループ ID
1912 が変身対象ユーザのそれに設定されることに変わりはない。
1913 このフラグはデフォルトでは \fIoff\fR である。
1914 .IP "pwfeedback" 16
1915 .IX Item "pwfeedback"
1916 .\"O By default, \fBsudo\fR reads the password like most other Unix programs,
1917 .\"O by turning off echo until the user hits the return (or enter) key.
1918 .\"O Some users become confused by this as it appears to them that \fBsudo\fR
1919 .\"O has hung at this point.  When \fIpwfeedback\fR is set, \fBsudo\fR will
1920 .\"O provide visual feedback when the user presses a key.  Note that
1921 .\"O this does have a security impact as an onlooker may be able to
1922 .\"O determine the length of the password being entered.
1923 .\"O This flag is \fIoff\fR by default.
1924 ほかのたいていの Unix プログラムと同様、
1925 \&\fBsudo\fR はパスワードを読み込むとき、デフォルトでは、ユーザが Return
1926 (または Enter) キーを押すまで、エコーを off にする。
1927 この動作にとまどうユーザが存在する。
1928 彼らには \fBsudo\fR が急に反応しなくなったように見えるのだ。
1929 \&\fIpwfeedback\fR をセットすると、ユーザがキーを押すたびに、
1930 \&\fBsudo\fR が目に見える反応を返すようになる。
1931 これには、セキュリティ上の問題があることに注意してほしい。側で見ている人が、
1932 打ち込まれたパスワードの文字数を特定できてしまうかもしれないのだ。
1933 このフラグはデフォルトでは \fIoff\fR である。
1934 .IP "requiretty" 16
1935 .IX Item "requiretty"
1936 .\"O If set, \fBsudo\fR will only run when the user is logged in to a real
1937 .\"O tty.  When this flag is set, \fBsudo\fR can only be run from a login
1938 .\"O session and not via other means such as \fIcron\fR\|(8) or cgi-bin scripts.
1939 .\"O This flag is \fIoff\fR by default.
1940 これをセットすると、\fBsudo\fR が実行されるのは、ユーザが実際の tty
1941 にログインしたときだけになる。すなわち、\fBsudo\fR を実行できるのは、
1942 ログイン・セッションからだけであって、
1943 \&\fIcron\fR\|(8) や cgi-bin スクリプトといった、
1944 ほかの方法を介して実行することはできないということだ。このフラグは、
1945 デフォルトでは \fIoff\fR である。
1946 .IP "root_sudo" 16
1947 .IX Item "root_sudo"
1948 .\"O If set, root is allowed to run \fBsudo\fR too.  Disabling this prevents users
1949 .\"O from \*(L"chaining\*(R" \fBsudo\fR commands to get a root shell by doing something
1950 .\"O like \f(CW"sudo sudo /bin/sh"\fR.  Note, however, that turning off \fIroot_sudo\fR
1951 .\"O will also prevent root from running \fBsudoedit\fR.
1952 .\"O Disabling \fIroot_sudo\fR provides no real additional security; it
1953 .\"O exists purely for historical reasons.
1954 .\"O This flag is \fIon\fR by default.
1955 これをセットすると、root も \fBsudo\fR を実行できるようになる。
1956 このフラグを無効にすると、ユーザがたとえば \f(CW"sudo sudo /bin/sh"\fR
1957 といったように \fBsudo\fR コマンドを\fB連鎖的に\fR使って、
1958 ルートシェルを獲得することができなくなる。ところで、
1959 \&\fIroot_sudo\fR が off だと、root が \fBsudoedit\fR
1960 まで実行できなくなることに注意してほしい。
1961 \&\fIroot_sudo\fR を無効にしても、セキュリティが実際に向上するわけではない。
1962 このフラグが存在しているのは、もっぱら歴史的な理由からなのだ。
1963 このフラグはデフォルトでは \fIon\fR である。
1964 .IP "rootpw" 16
1965 .IX Item "rootpw"
1966 .\"O If set, \fBsudo\fR will prompt for the root password instead of the password
1967 .\"O of the invoking user.  This flag is \fIoff\fR by default.
1968 これをセットすると、\fBsudo\fR はプロンプトで、起動したユーザのパスワードではなく、
1969 root のパスワードを要求するようになる。
1970 このフラグはデフォルトでは \fIoff\fR である。
1971 .IP "runaspw" 16
1972 .IX Item "runaspw"
1973 .\"O If set, \fBsudo\fR will prompt for the password of the user defined by the
1974 .\"O \&\fIrunas_default\fR option (defaults to \f(CW\*(C`root\*(C'\fR) instead of the
1975 .\"O password of the invoking user.  This flag is \fIoff\fR by default.
1976 これをセットすると、\fBsudo\fR はプロンプトで、起動したユーザのパスワードではなく、
1977 \&\fIsudoers\fR ファイルの
1978 \&\fIrunas_default\fR オプションで指定しているユーザーの
1979 (デフォルトでは \f(CW\*(C`root\*(C'\fR である) パスワードを要求する。
1980 このフラグはデフォルトでは \fIoff\fR である。
1981 .IP "set_home" 16
1982 .IX Item "set_home"
1983 .\"O If enabled and \fBsudo\fR is invoked with the \fB\-s\fR option the \f(CW\*(C`HOME\*(C'\fR
1984 .\"O environment variable will be set to the home directory of the target
1985 .\"O user (which is root unless the \fB\-u\fR option is used).  This effectively
1986 .\"O makes the \fB\-s\fR option imply \fB\-H\fR.  Note that \f(CW\*(C`HOME\*(C'\fR is already
1987 .\"O set when the the \fIenv_reset\fR option is enabled, so \fIset_home\fR is
1988 .\"O only effective for configurations where either \fIenv_reset\fR is disabled
1989 .\"O or \f(CW\*(C`HOME\*(C'\fR is present in the \fIenv_keep\fR list.
1990 .\"O This flag is \fIoff\fR by default.
1991 これが有効なときに \fBsudo\fR を \fB\-s\fR オプション付きで起動すると、
1992 環境変数 \f(CW\*(C`HOME\*(C'\fR が変身対象ユーザの 
1993 (\fB\-u\fR オプションが使用されないかぎり、それは root である)
1994 ホームディレクトリに設定される。すなわち、 \fB\-s\fR オプションが
1995 \&\fB\-H\fR オプションを事実上兼ねることになるわけだ。
1996 気をつけてほしいのは、\fIenv_reset\fR が有効な場合、\f(CW\*(C`HOME\*(C'\fR
1997 はすでに (訳注: 変身対象ユーザのホームディレクトリに) 設定済みだということだ。
1998 だから、\fIset_home\fR の効果があるのは、
1999 \&\fIenv_reset\fR が無効に設定されているか、 \fIenv_keep\fR のリストに
2000 \&\f(CW\*(C`HOME\*(C'\fR が存在する場合のみである。
2001 このフラグはデフォルトでは \fIoff\fR である。
2002 .IP "set_logname" 16
2003 .IX Item "set_logname"
2004 .\"O Normally, \fBsudo\fR will set the \f(CW\*(C`LOGNAME\*(C'\fR, \f(CW\*(C`USER\*(C'\fR and \f(CW\*(C`USERNAME\*(C'\fR
2005 .\"O environment variables to the name of the target user (usually root
2006 .\"O unless the \fB\-u\fR option is given).  However, since some programs
2007 .\"O (including the \s-1RCS\s0 revision control system) use \f(CW\*(C`LOGNAME\*(C'\fR to
2008 .\"O determine the real identity of the user, it may be desirable to
2009 .\"O change this behavior.  This can be done by negating the set_logname
2010 .\"O option.  Note that if the \fIenv_reset\fR option has not been disabled,
2011 .\"O entries in the \fIenv_keep\fR list will override the value of
2012 .\"O \&\fIset_logname\fR.  This flag is \fIon\fR by default.
2013 通常 \fBsudo\fR は環境変数 \f(CW\*(C`LOGNAME\*(C'\fR,
2014 \&\f(CW\*(C`USER\*(C'\fR, \f(CW\*(C`USERNAME\*(C'\fR
2015 を変身対象ユーザの名前 (\fB-u\fR オプションが指定されていない場合、
2016 普通は root) にセットする。しかし、プログラムによっては (たとえば、
2017 \&\s-1RCS\s0 リビジョンコントロールシステムがその一つだが)
2018 ユーザが実際には誰であるかを判定するのに \f(CW\*(C`LOGNAME\*(C'\fR
2019 を使用していることがあり、そのために、この振舞いを変更したい場合もある。
2020 set_logname オプションに '!' を付けて否定することで、それができる。
2021 なお \fIenv_reset\fR オプションを無効にしていない場合、
2022 \&\fIenv_keep\fR リストの項目が \fIset_logname\fR
2023 による値を上書きすることになるので、注意してほしい。
2024 このフラグはデフォルトでは \fIon\fR である。
2025 .IP "set_utmp" 16
2026 .IX Item "set_utmp"
2027 .\"O When enabled, \fBsudo\fR will create an entry in the utmp (or utmpx)
2028 .\"O file when a pseudo-tty is allocated.  A pseudo-tty is allocated by
2029 .\"O \&\fBsudo\fR when the \fIlog_input\fR, \fIlog_output\fR or \fIuse_pty\fR flags
2030 .\"O are enabled.  By default, the new entry will be a copy of the user's
2031 .\"O existing utmp entry (if any), with the tty, time, type and pid
2032 .\"O fields updated.  This flag is \fIon\fR by default.
2033 これが有効になっていると、\fBsudo\fR は擬似 tty を割り当てるときに、
2034 utmp (または utmpx) ファイルにエントリを作成する。
2035 \&\fBsudo\fR によって擬似 tty の割り当てが行われるのは、\fIlog_input\fR, 
2036 \&\fIlog_output\fR, \fIuse_pty\fR といったフラグが有効になっているときである。
2037 デフォルトでは、新しいエントリは、そのユーザの utmp エントリが存在すれば、
2038 そのコピーであり、tty, time, type, pid フィールドが更新される。
2039 このフラグはデフォルトでは \fIon\fR である。
2040 .IP "setenv" 16
2041 .IX Item "setenv"
2042 .\"O Allow the user to disable the \fIenv_reset\fR option from the command
2043 .\"O line via the \fB\-E\fR option.  Additionally, environment variables set
2044 .\"O via the command line are not subject to the restrictions imposed
2045 .\"O by \fIenv_check\fR, \fIenv_delete\fR, or \fIenv_keep\fR.  As such, only
2046 .\"O trusted users should be allowed to set variables in this manner.
2047 .\"O This flag is \fIoff\fR by default.
2048 これをセットすると、ユーザがコマンドラインで \fB\-E\fR オプションを指定して、
2049 \&\fIenv_reset\fR オプションを無効にできるようになる。
2050 さらに、コマンドラインから設定する環境変数が 
2051 \&\fIenv_check\fR, \fIenv_delete\fR, \fIenv_keep\fR による制限を受けなくなる。
2052 それ故、そのようなやり方で変数を設定することを許可するのは、
2053 信用できるユーザのみに限るべきだ。このフラグはデフォルトでは \fIoff\fR である。
2054 .IP "shell_noargs" 16
2055 .IX Item "shell_noargs"
2056 .\"O If set and \fBsudo\fR is invoked with no arguments it acts as if the
2057 .\"O \&\fB\-s\fR option had been given.  That is, it runs a shell as root (the
2058 .\"O shell is determined by the \f(CW\*(C`SHELL\*(C'\fR environment variable if it is
2059 .\"O set, falling back on the shell listed in the invoking user's
2060 .\"O /etc/passwd entry if not).  This flag is \fIoff\fR by default.
2061 これがセットされているとき、\fBsudo\fR を引き数なしで起動すると、
2062 \&\fBsudo\fR は \fB\-s\fR オプションが指定されたかのように振舞う。
2063 すなわち、root ユーザとしてシェルを実行するわけだ (シェルは、環境変数
2064 \f(CW\*(C`SHELL\*(C'\fR がセットされていれば、それによって決まるし、
2065 セットされていなければ、\fBsudo\fR を起動したユーザの
2066 /etc/passwd エントリに登録されたものになる)。このフラグはデフォルトでは
2067 \&\fIoff\fR である。
2068 .IP "stay_setuid" 16
2069 .IX Item "stay_setuid"
2070 .\"O Normally, when \fBsudo\fR executes a command the real and effective
2071 .\"O UIDs are set to the target user (root by default).  This option
2072 .\"O changes that behavior such that the real \s-1UID\s0 is left as the invoking
2073 .\"O user's \s-1UID\s0.  In other words, this makes \fBsudo\fR act as a setuid
2074 .\"O wrapper.  This can be useful on systems that disable some potentially
2075 .\"O dangerous functionality when a program is run setuid.  This option
2076 .\"O is only effective on systems with either the \fIsetreuid()\fR or \fIsetresuid()\fR
2077 .\"O function.  This flag is \fIoff\fR by default.
2078 通常 \fBsudo\fR がコマンドを実行するとき、実 UID と実効 UID
2079 は変身対象ユーザ (デフォルトでは root) のものにセットされる。
2080 このオプションは、その振舞いを変更して、\fBsudo\fR を起動したユーザの
2081 \&\s-1UID\s0 が、そのまま実 \s-1UID\s0 として残るようにする。言い換えると、
2082 \&\fBsudo\fR が setuid ラッパーとして動作するようになるわけだ。
2083 プログラムを setuid で動かすと、危険をもたらしかねないという理由から、
2084 ある種の機能を使えないようにしているシステムでは、
2085 このオプションが役に立つかもしれない。このオプションは、\fIsetreuid()\fR
2086 関数や \fIsetresuid()\fR 関数を持っているシステムでのみ有効である。
2087 このフラグはデフォルトでは \fIoff\fR である。
2088 .IP "targetpw" 16
2089 .IX Item "targetpw"
2090 .\"O If set, \fBsudo\fR will prompt for the password of the user specified
2091 .\"O by the \fB\-u\fR option (defaults to \f(CW\*(C`root\*(C'\fR) instead of the password
2092 .\"O of the invoking user.  In addition, the timestamp file name will
2093 .\"O include the target user's name.  Note that this flag precludes the
2094 .\"O use of a uid not listed in the passwd database as an argument to
2095 .\"O the \fB\-u\fR option.  This flag is \fIoff\fR by default.
2096 これをセットすると、\fBsudo\fR はプロンプトで、
2097 起動したユーザのパスワードではなく、
2098 \&\fB\-u\fR オプションで指定されたユーザ (デフォルトでは root)
2099 のパスワードを要求することになる。それに加えて、
2100 タイムスタンプ・ファイルの名前に変身対象ユーザの名前が含まれるようになる。
2101 このフラグを設定をすると、\fB\-u\fR オプションの引き数として、
2102 passwd データベースに登録されていない uid が使えなくなることに注意してほしい。
2103 このフラグはデフォルトでは \fIoff\fR である。
2104 .IP "tty_tickets" 16
2105 .IX Item "tty_tickets"
2106 .\"O If set, users must authenticate on a per-tty basis.  With this flag
2107 .\"O enabled, \fBsudo\fR will use a file named for the tty the user is
2108 .\"O logged in on in the user's time stamp directory.  If disabled, the
2109 .\"O time stamp of the directory is used instead.  This flag is
2110 .\"O \&\fIon\fR by default.
2111 これをセットすると、ユーザは tty ごとに認証をしなければならなくなる。
2112 このフラグが有効な場合、
2113 \&\fBsudo\fR はユーザのタイムスタンプ・ディレクトリにある、
2114 ユーザがログインしている tty
2115 に対応する名前のファイルをタイムスタンプに使用する。
2116 それに対して、このフラグが無効な場合は、
2117 ユーザのタイムスタンプ・ディレクトリそのもののタイムスタンプが使用されるのである。
2118 このフラグはデフォルトでは \fIon\fR である。
2119 .IP "umask_override" 16
2120 .IX Item "umask_override"
2121 .\"O If set, \fBsudo\fR will set the umask as specified by \fIsudoers\fR without
2122 .\"O modification.  This makes it possible to specify a more permissive
2123 .\"O umask in \fIsudoers\fR than the user's own umask and matches historical
2124 .\"O behavior.  If \fIumask_override\fR is not set, \fBsudo\fR will set the
2125 .\"O umask to be the union of the user's umask and what is specified in
2126 .\"O \&\fIsudoers\fR.  This flag is \fIoff\fR by default.
2127 これをセットすると、\fBsudo\fR は umask を \fIsudoers\fR の
2128 umask オプションで指定されたとおりの値に、変更を加えることなく設定する。
2129 このことによって、ユーザ自身の umask 値よりもっと緩やかな umask 値を
2130 \&\fIsudoers\fR で指定することが可能になる。
2131 \&\fBsudo\fR の昔の動作と同じになるわけだ。
2132 \&\fIumask_override\fR をセットしない場合、
2133 現在の \fBsudo\fR は umask を、ユーザの umask 値と \fIsudoers\fR で指定した
2134 umask 値とのビット和に設定することになっている。
2135 このフラグはデフォルトでは \fIoff\fR である。
2136 .if \n(LC \{\
2137 .IP "use_loginclass" 16
2138 .IX Item "use_loginclass"
2139 .\"O If set, \fBsudo\fR will apply the defaults specified for the target user's
2140 .\"O login class if one exists.  Only available if \fBsudo\fR is configured with
2141 .\"O the \-\-with\-logincap option.  This flag is \fIoff\fR by default.
2142 これをセットすると、\fBsudo\fR は、
2143 変身対象ユーザのログインクラスが存在するならば、
2144 それに対して指定されたデフォルトの値を使うことになる。
2145 このフラグは、\fBsudo\fR を \-\-with\-logincap オプションを付けて 
2146 configure したときのみ利用することができる。このフラグはデフォルトでは 
2147 \&\fIoff\fR である。
2148 \}
2149 .IP "use_pty" 16
2150 .IX Item "use_pty"
2151 .\"O If set, \fBsudo\fR will run the command in a pseudo-pty even if no I/O
2152 .\"O logging is being gone.  A malicious program run under \fBsudo\fR could
2153 .\"O conceivably fork a background process that retains to the user's
2154 .\"O terminal device after the main program has finished executing.  Use
2155 .\"O of this option will make that impossible.  This flag is \fIoff\fR by default.
2156 これをセットすると、\fBsudo\fR は入出力のロギングが行われていないときでも、
2157 擬似 tty でコマンドを実行することになる。
2158 \&\fBsudo\fR によって実行された悪意のあるプログラムが、
2159 バックグラウンド・プロセスをフォークし、
2160 そのプロセスが、メインプログラムの実行が終了した後でも、
2161 ユーザのターミナルデバイスを握って離さないといったことが考えられる。
2162 このオプションを使えば、そういったことが不可能になる。
2163 このフラグはデフォルトでは \fIoff\fR である。
2164 .IP "utmp_runas" 16
2165 .IX Item "utmp_runas"
2166 .\"O If set, \fBsudo\fR will store the name of the runas user when updating
2167 .\"O the utmp (or utmpx) file.  By default, \fBsudo\fR stores the name of
2168 .\"O the invoking user.  This flag is \fIoff\fR by default.
2169 これをセットすると、\fBsudo\fR は utmp (または utmpx) ファイルを更新するとき、
2170 変身対象ユーザの名前を格納するようになる。\fBsudo\fR はデフォルトでは、
2171 \&\fBsudo\fR を実行したユーザの名前を格納するのだ。
2172 このフラグはデフォルトでは \fIoff\fR である。
2173 .IP "visiblepw" 16
2174 .IX Item "visiblepw"
2175 .\"O By default, \fBsudo\fR will refuse to run if the user must enter a
2176 .\"O password but it is not possible to disable echo on the terminal.
2177 .\"O If the \fIvisiblepw\fR flag is set, \fBsudo\fR will prompt for a password
2178 .\"O even when it would be visible on the screen.  This makes it possible
2179 .\"O to run things like \f(CW"rsh somehost sudo ls"\fR since \fIrsh\fR\|(1) does
2180 .\"O not allocate a tty.  This flag is \fIoff\fR by default.
2181 .\"O .PP
2182 デフォルトでは、ユーザがパスワードを入力しなければならないときに、
2183 使用しているターミナルでエコーの抑制ができなかったら、
2184 \&\fBsudo\fR は実行を拒否するようになっている。
2185 これに対し、\fIvisiblepw\fR フラグが設定されていると、
2186 パスワードがスクリーンに表示されてしまう場合でも、
2187 \&\fBsudo\fR はプロンプトを出して、パスワードを求める。この動作によって、
2188 \&\fIrsh\fR\|(1) は tty を割り当てないにもかかわらず、
2189 \&\f(CW"rsh somehost sudo ls"\fR といった操作の実行が可能になるわけだ。
2190 このフラグはデフォルトでは \fIoff\fR である。
2191 .PP
2192 .\"O \fBIntegers\fR:
2193 \&\fB整数\fR:
2194 .IP "closefrom" 16
2195 .IX Item "closefrom"
2196 .\"O Before it executes a command, \fBsudo\fR will close all open file
2197 .\"O descriptors other than standard input, standard output and standard
2198 .\"O error (ie: file descriptors 0\-2).  The \fIclosefrom\fR option can be used
2199 .\"O to specify a different file descriptor at which to start closing.
2200 .\"O The default is \f(CW3\fR.
2201 \&\fBsudo\fR はコマンドを実行する前に、標準入力、標準出力、標準エラー
2202 (すなわち、ファイルディスクリプタ 0\-2 である) を除いて、
2203 開いているすべてのファイル・ディスクリプタをクローズする。
2204 \&\fIclosefrom\fR オプションを使用すると、
2205 0\-2 以外のどのファイル・ディスクリプタから閉じて行くかを指定することができる。
2206 デフォルトは \f(CW3\fR である。
2207 .IP "passwd_tries" 16
2208 .IX Item "passwd_tries"
2209 .\"O The number of tries a user gets to enter his/her password before
2210 .\"O \&\fBsudo\fR logs the failure and exits.  The default is \f(CW\*(C`3\*(C'\fR.
2211 .\"O .PP
2212 \&\fBsudo\fR が「失敗」をログに記録して終了する前に、
2213 ユーザがパスワードを入力できる回数。デフォルトは \f(CW\*(C`3\*(C'\fR。
2214 .PP
2215 .\"O \&\fBIntegers that can be used in a boolean context\fR:
2216 \&\fB真偽値としても使用できる整数\fR:
2217 .IP "loglinelen" 16
2218 .IX Item "loglinelen"
2219 .\"O Number of characters per line for the file log.  This value is used
2220 .\"O to decide when to wrap lines for nicer log files.  This has no
2221 .\"O effect on the syslog log file, only the file log.  The default is
2222 .\"O \&\f(CW\*(C`80\*(C'\fR (use 0 or negate the option to disable word wrap).
2223 \&\fBsudo\fR 用ログファイルの一行あたりの文字数。
2224 この値は、ログファイルを見やすくするために改行する位置を決めるのに使用される。
2225 この値は、syslog 経由のログファイルには影響せず、
2226 直接ファイルにログを書き出すときのみ効果がある。デフォルトは
2227 \&\f(CW\*(C`80\*(C'\fR である (改行をしないようにするには、値を 0 にするか、
2228 頭に '!' を付けて、このオプションを否定する)。
2229 .IP "passwd_timeout" 16
2230 .IX Item "passwd_timeout"
2231 .\"O Number of minutes before the \fBsudo\fR password prompt times out, or
2232 .\"O \&\f(CW0\fR for no timeout.  The timeout may include a fractional component
2233 .\"O if minute granularity is insufficient, for example \f(CW2.5\fR.  The
2234 .\"O default is \f(CW\*(C`5\*(C'\fR.
2235 \&\fBsudo\fR のパスワードプロンプトが時間切れになるまでの分単位の時間。
2236 \&\f(CW0\fR を指定すると、時間切れなしになる。
2237 分よりももっと細かい時間を指定したいときは、(\f(CW2.5\fR のように)
2238 小数点以下を付けることもできる。デフォルトは \f(CW\*(C`5\*(C'\fR である。
2239 .IP "timestamp_timeout" 16
2240 .IX Item "timestamp_timeout"
2241 .\"O Number of minutes that can elapse before \fBsudo\fR will ask for a
2242 .\"O passwd again.  The timeout may include a fractional component if
2243 .\"O minute granularity is insufficient, for example \f(CW2.5\fR.  The default
2244 .\"O is \f(CW\*(C`5\*(C'\fR.  Set this to \f(CW0\fR to always prompt for a password.
2245 .\"O If set to a value less than \f(CW0\fR the user's timestamp will never
2246 .\"O expire.  This can be used to allow users to create or delete their
2247 .\"O own timestamps via \f(CW\*(C`sudo \-v\*(C'\fR and \f(CW\*(C`sudo \-k\*(C'\fR respectively.
2248 \&\fBsudo\fR がパスワードを再び要求するようになるまでの時間を
2249 分単位で指定する。分よりももっと細かい時間を指定したいときは、
2250 (\f(CW2.5\fR のように) 小数点以下を付けることもできる。
2251 デフォルトでは \f(CW\*(C`5\*(C'\fR である。
2252 これを \f(CW0\fR にセットすると、毎回パスワードを要求するようになる。
2253 \&\f(CW0\fR より小さい値にセットした場合は、
2254 ユーザのタイムスタンプが期限切れになることがない。
2255 ユーザが \f(CW\*(C`sudo \-v\*(C'\fR と \f(CW\*(C`sudo \-k\*(C'\fR
2256 を実行することによって、タイムスタンプを自分で作ったり、
2257 消したりできるようにしたかったら、この手を使えばよい。
2258 .IP "umask" 16
2259 .IX Item "umask"
2260 .\"O Umask to use when running the command.  Negate this option or set
2261 .\"O it to 0777 to preserve the user's umask.  The actual umask that is
2262 .\"O used will be the union of the user's umask and the value of the
2263 .\"O \&\fIumask\fR option, which defaults to \f(CW\*(C`0022\*(C'\fR.  This guarantees
2264 .\"O that \fBsudo\fR never lowers the umask when running a command.  Note
2265 .\"O on systems that use \s-1PAM\s0, the default \s-1PAM\s0 configuration may specify
2266 .\"O its own umask which will override the value set in \fIsudoers\fR.
2267 .\"O .PP
2268 コマンドを実行するときに使用する umask 値。
2269 ユーザの umask 値をそのまま使いたかったら、'!' を頭に付けて、
2270 このオプションを否定するか、0777 にセットすればよい。
2271 このオプションの値が 0777 以外の場合、実際に使用される umask 値は、
2272 ユーザの umask 値と \fIumask\fR オプションの値とのビット和になり、
2273 後者のデフォルトは \f(CW\*(C`0022\*(C'\fR である。
2274 このことによって、\fBsudo\fR がコマンドを実行するときの umask 値が、
2275 ユーザの umask 値より低くならないようになっているわけだ。
2276 \&\s-1PAM\s0 を使用しているシステムでは、 \s-1PAM\s0 のデフォルト設定で
2277 umask 値を指定することができるが、その場合は、それが \fIsudoers\fR
2278 で指定した値を上書きすることに注意してほしい。
2279 .PP
2280 .\"O \&\fBStrings\fR:
2281 \&\fB文字列\fR:
2282 .IP "badpass_message" 16
2283 .IX Item "badpass_message"
2284 .\"O Message that is displayed if a user enters an incorrect password.
2285 .\"O The default is \f(CW\*(C`Sorry, try again.\*(C'\fR unless insults are enabled.
2286 ユーザが不正なパスワードを入力したときに表示するメッセージ。
2287 \&\fIinsults\fR フラグが有効になっていないかぎり、
2288 デフォルトは「\f(CW\*(C`Sorry, try again.\*(C'\fR」である。
2289 .IP "editor" 16
2290 .IX Item "editor"
2291 .\"O A colon (':') separated list of editors allowed to be used with
2292 .\"O \&\fBvisudo\fR.  \fBvisudo\fR will choose the editor that matches the user's
2293 .\"O \&\s-1EDITOR\s0 environment variable if possible, or the first editor in the
2294 .\"O list that exists and is executable.  The default is \f(CW"/usr/bin/vi"\fR.
2295 \&\fBvisudo\fR で使用できるエディタをコロン (':') で区切ったリスト。
2296 \&\fBvisudo\fR は、可能ならば、
2297 ユーザの \s-1EDITOR\s0 環境変数と一致したエディタを選択する。
2298 それができないときは、このリストにあるエディタで、
2299 実際に存在し、かつ実行可能な最初のエディタを使用する。デフォルトは
2300 \&\f(CW"/usr/bin/vi"\fR である。
2301 .IP "iolog_dir" 16
2302 .IX Item "iolog_dir"
2303 .\"O The top-level directory to use when constructing the path name for
2304 .\"O the input/output log directory.  Only used if the \fIlog_input\fR or
2305 .\"O \&\fIlog_output\fR options are enabled or when the \f(CW\*(C`LOG_INPUT\*(C'\fR or
2306 .\"O \&\f(CW\*(C`LOG_OUTPUT\*(C'\fR tags are present for a command.  The session sequence
2307 .\"O number, if any, is stored in the directory.
2308 .\"O The default is \f(CW"/var/log/sudo-io"\fR.
2309 .\"O .Sp
2310 このオプションの値をトップレベル・ディレクトリにして、
2311 入出力ログを格納するディレクトリのパス名が構成される。
2312 この値が使用されるのは、\fIlog_input\fR や
2313 \&\fIlog_output\fR オプションが有効になっているときや、
2314 \&\f(CW\*(C`LOG_INPUT\*(C'\fR や \f(CW\*(C`LOG_OUTPUT\*(C'\fR
2315 タグがコマンドに付いているときだけである。このディレクトリ以下に、
2316 (セッション ID が連番ならば) セッションの連番が格納されることになるわけだ。
2317 デフォルトは \f(CW"/var/log/sudo-io"\fR である。
2318 .Sp
2319 .\"O The following percent (`\f(CW\*(C`%\*(C'\fR') escape sequences are supported:
2320 以下のパーセント (`\f(CW\*(C`%\*(C'\fR') エスケープシーケンスが使用できる。
2321 .RS 16
2322 .ie n .IP "\*(C`%{seq}\*(C'" 4
2323 .el .IP "\f(CW\*(C`%{seq}\*(C'\fR" 4
2324 .IX Item "%{seq}"
2325 .\"O expanded to a monotonically increasing base\-36 sequence number, such as 0100A5,
2326 .\"O where every two digits are used to form a new directory, e.g. \fI01/00/A5\fR
2327 単純に増加する 36 進数の連続番号に展開される。たとえば、 0100A5 といった
2328 番号であり、二桁づつ使って新しいディレクトリを作っていく。この場合なら、
2329 \&\fI01/00/A5\fR といった具合だ。
2330 .ie n .IP "\*(C`%{user}\*(C'" 4
2331 .el .IP "\f(CW\*(C`%{user}\*(C'\fR" 4
2332 .IX Item "%{user}"
2333 .\"O expanded to the invoking user's login name
2334 \&\fBsudo\fR を実行するユーザーのログイン名に展開される。
2335 .ie n .IP "\*(C`%{group}\*(C'" 4
2336 .el .IP "\f(CW\*(C`%{group}\*(C'\fR" 4
2337 .IX Item "%{group}"
2338 .\"O expanded to the name of the invoking user's real group \s-1ID\s0
2339 \&\fBsudo\fR を実行するユーザーの実グループ \s-1ID\s0 名に展開される。
2340 .ie n .IP "\*(C`%{runas_user}\*(C'" 4
2341 .el .IP "\f(CW\*(C`%{runas_user}\*(C'\fR" 4
2342 .IX Item "%{runas_user}"
2343 .\"O expanded to the login name of the user the command will
2344 .\"O be run as (e.g. root)
2345 変身対象ユーザのログイン名に展開される (たとえば root)。
2346 .ie n .IP "\*(C`%{runas_group}\*(C'" 4
2347 .el .IP "\f(CW\*(C`%{runas_group}\*(C'\fR" 4
2348 .IX Item "%{runas_group}"
2349 .\"O expanded to the group name of the user the command will
2350 .\"O be run as (e.g. wheel)
2351 変身対象ユーザのグループ名に展開される (たとえば wheel)。
2352 .ie n .IP "\*(C`%{hostname}\*(C'" 4
2353 .el .IP "\f(CW\*(C`%{hostname}\*(C'\fR" 4
2354 .IX Item "%{hostname}"
2355 .\"O expanded to the local host name without the domain name
2356 ドメイン名なしのローカル・ホスト名に展開される。
2357 .ie n .IP "\*(C`%{command}\*(C'" 4
2358 .el .IP "\f(CW\*(C`%{command}\*(C'\fR" 4
2359 .IX Item "%{command}"
2360 .\"O expanded to the base name of the command being run
2361 実行されるコマンドのベースネームに展開される。
2362 .RE
2363 .RS 16
2364 .Sp
2365 .\"O In addition, any escape sequences supported by the system's \fIstrftime()\fR
2366 .\"O function will be expanded.
2367 .\"O .Sp
2368 このほか、システムの \fIstrftime()\fR
2369 関数がサポートしているエスケープシーケンスは、
2370 いかなるものでも展開の対象になる。
2371 .Sp
2372 .\"O To include a literal `\f(CW\*(C`%\*(C'\fR' character, the string `\f(CW\*(C`%%\*(C'\fR' should
2373 .\"O be used.
2374 .\"O .Sp
2375 \&`\f(CW\*(C`%\*(C'\fR' 文字そのものを使いたかったら、文字列
2376 \&`\f(CW\*(C`%%\*(C'\fR' を使用すればよい。
2377 .RE
2378 .IP "iolog_file" 16
2379 .IX Item "iolog_file"
2380 .\"O The path name, relative to \fIiolog_dir\fR, in which to store input/output
2381 .\"O logs when the \fIlog_input\fR or \fIlog_output\fR options are enabled or
2382 .\"O when the \f(CW\*(C`LOG_INPUT\*(C'\fR or \f(CW\*(C`LOG_OUTPUT\*(C'\fR tags are present for a command.
2383 .\"O Note that \fIiolog_file\fR may contain directory components.
2384 .\"O The default is \f(CW"%{seq}"\fR.
2385 .\"O .Sp
2386 \&\fIiolog_dir\fR を基点とする相対パス名であり、\fIlog_input\fR や
2387 \&\fIlog_output\fR オプションが有効になっていたり、
2388 \&\f(CW\*(C`LOG_INPUT\*(C'\fR や \f(CW\*(C`LOG_OUTPUT\*(C'\fR
2389 タグがコマンドに付いている場合に、入出力ログがこの中に格納される。
2390 \&\fIiolog_file\fR の値がディレクトリ構成をなしていることがあるのに注意すること。
2391 デフォルトは \f(CW"%{seq}"\fR である。
2392 .Sp
2393 .\"O See the \fIiolog_dir\fR option above for a list of supported percent
2394 .\"O (`\f(CW\*(C`%\*(C'\fR') escape sequences.
2395 使用できるパーセント (`\f(CW\*(C`%\*(C'\fR') エスケープシーケンスのリストについては、
2396 上記の \fIiolog_dir\fR オプションを参照してほしい。
2397 .Sp
2398 .\"O In addition to the escape sequences, path names that end in six or
2399 .\"O more \f(CW\*(C`X\*(C'\fRs will have the \f(CW\*(C`X\*(C'\fRs replaced with a unique combination
2400 .\"O of digits and letters, similar to the \fImktemp()\fR function.
2401 エスケープシーケンスの展開とは別に、パス名が六個以上の \f(CW\*(C`X\*(C'\fR
2402 で終わっている場合、\f(CW\*(C`X\*(C'\fR の部分が、
2403 他と重複しない英数字の組み合わせに置き換えられる。
2404 \&\fImktemp()\fR 関数の場合と同様である。
2405 .IP "mailsub" 16
2406 .IX Item "mailsub"
2407 .\"O Subject of the mail sent to the \fImailto\fR user. The escape \f(CW%h\fR
2408 .\"O will expand to the host name of the machine.
2409 .\"O Default is \f(CW\*(C`*** SECURITY information for %h ***\*(C'\fR.
2410 \&\fImailto\fR ユーザに送付するメールの件名。エスケープ文字 \f(CW%h\fR 
2411 はマシンのホスト名に展開される。デフォルトは「\f(CW\*(C`*** SECURITY
2412 information for %h ***\*(C'\fR」である。
2413 .IP "noexec_file" 16
2414 .IX Item "noexec_file"
2415 .\"O This option is no longer supported.  The path to the noexec file
2416 .\"O should now be set in the \fI/etc/sudo.conf\fR file.
2417 このオプションはもうサポートされていない。現在では、
2418 noexec ファイルのパスは \fI/etc/sudo.conf\fR ファイルで設定するべきである。
2419 (訳注: sudo-1.8.3 では、まだこのオプションが有効かもしれない。
2420 しかし、そこでも \fI/etc/sudo.conf\fR を使用することが推奨されている。)
2421 .IP "passprompt" 16
2422 .IX Item "passprompt"
2423 .\"O The default prompt to use when asking for a password; can be overridden
2424 .\"O via the \fB\-p\fR option or the \f(CW\*(C`SUDO_PROMPT\*(C'\fR environment variable.
2425 .\"O The following percent (`\f(CW\*(C`%\*(C'\fR') escape sequences are supported:
2426 パスワードを要求するときに使用するデフォルトのプロンプト。
2427 \&\fB-p\fR オプションや環境変数 \f(CW\*(C`SUDO_PROMPT\*(C'\fR
2428 によって変更することができる。以下のパーセント (`\f(CW\*(C`%\*(C'\fR')
2429 エスケープシーケンスが使用できる。
2430 .RS 16
2431 .ie n .IP "%H" 4
2432 .el .IP "\f(CW%H\fR" 4
2433 .IX Item "%H"
2434 .\"O expanded to the local host name including the domain name
2435 .\"O (only if the machine's host name is fully qualified or the \fIfqdn\fR
2436 .\"O option is set)
2437 ドメイン名付きのローカルホスト名に展開 (マシンのホスト名が完全修飾名か、
2438 \&\fIfqdn\fR オプションがセットされている場合のみ)
2439 .ie n .IP "%h" 4
2440 .el .IP "\f(CW%h\fR" 4
2441 .IX Item "%h"
2442 .\"O expanded to the local host name without the domain name
2443 ドメイン名なしのローカルホスト名に展開
2444 .ie n .IP "%p" 4
2445 .el .IP "\f(CW%p\fR" 4
2446 .IX Item "%p"
2447 .\"O expanded to the user whose password is being asked for (respects the 
2448 .\"O \&\fIrootpw\fR, \fItargetpw\fR and \fIrunaspw\fR flags in \fIsudoers\fR)
2449 パスワードを要求されているユーザ名に展開 (\fIsudoers\fR ファイルの 
2450 \&\fIrootpw\fR, \fItargetpw\fR, \fIrunaspw\fR フラグを尊重する)
2451 .ie n .IP "%U" 4
2452 .el .IP "\f(CW%U\fR" 4
2453 .IX Item "%U"
2454 .\"O expanded to the login name of the user the command will
2455 .\"O be run as (defaults to root)
2456 変身対象ユーザの (デフォルトでは root) ログイン名に展開
2457 .ie n .IP "%u" 4
2458 .el .IP "\f(CW%u\fR" 4
2459 .IX Item "%u"
2460 .\"O expanded to the invoking user's login name
2461 \&\fBsudo\fR を起動するユーザのログイン名に展開
2462 .ie n .IP "\*(C`%%\*(C'" 4
2463 .el .IP "\f(CW\*(C`%%\*(C'\fR" 4
2464 .IX Item "%%"
2465 .\"O two consecutive \f(CW\*(C`%\*(C'\fR characters are collapsed into a single \f(CW\*(C`%\*(C'\fR character
2466 連続した二個の \f(CW\*(C`%\*(C'\fR は、一個の \f(CW\*(C`%\*(C'\fR
2467 文字そのものを意味する
2468 .RE
2469 .RS 16
2470 .Sp
2471 .\"O The default value is \f(CW\*(C`Password:\*(C'\fR.
2472 デフォルトの値は「\f(CW\*(C`Password:\*(C'\fR」である。
2473 .RE
2474 .if \n(SL \{\
2475 .IP "role" 16
2476 .IX Item "role"
2477 .\"O The default SELinux role to use when constructing a new security
2478 .\"O context to run the command.  The default role may be overridden on
2479 .\"O a per-command basis in \fIsudoers\fR or via command line options.
2480 .\"O This option is only available whe \fBsudo\fR is built with SELinux support.
2481 コマンドを実行するために
2482 SELinux の新しいセキュリティ・コンテキストを構成するときに使用する、
2483 デフォルトのロール。デフォルトのロールは、
2484 \&\fIsudoers\fR ファイルや、コマンドラインオプションを使って、
2485 コマンドごとに変更することができる。このオプションが利用できるのは、
2486 \&\fBsudo\fR が SELinux サポートつきで作成されたときだけである。
2487 \}
2488 .IP "runas_default" 16
2489 .IX Item "runas_default"
2490 .\"O The default user to run commands as if the \fB\-u\fR option is not specified
2491 .\"O on the command line.  This defaults to \f(CW\*(C`root\*(C'\fR.
2492 コマンドラインで \fB-u\fR オプションが指定されていないときの、
2493 デフォルトの変身対象ユーザ。デフォルトでは \f(CW\*(C`root\*(C'\fR
2494 になっている。
2495 .IP "syslog_badpri" 16
2496 .IX Item "syslog_badpri"
2497 .\"O Syslog priority to use when user authenticates unsuccessfully.
2498 .\"O Defaults to \f(CW\*(C`alert\*(C'\fR.
2499 ユーザが認証に失敗したときに使用する syslog の重大度 (priority)。
2500 デフォルトでは \f(CW\*(C`alert\*(C'\fR になっている。
2501 .\"O .Sp
2502 .\"O The following syslog priorities are supported: \fBalert\fR, \fBcrit\fR,
2503 .\"O \&\fBdebug\fR, \fBemerg\fR, \fBerr\fR, \fBinfo\fR, \fBnotice\fR, and \fBwarning\fR.
2504 .Sp
2505 syslog の重大度には、次のものが指定できる。\fBalert\fR, \fBcrit\fR,
2506 \&\fBdebug\fR, \fBemerg\fR, \fBerr\fR, \fBinfo\fR, \fBnotice\fR,
2507 \&\fBwarning\fR。
2508 .IP "syslog_goodpri" 16
2509 .IX Item "syslog_goodpri"
2510 .\"O Syslog priority to use when user authenticates successfully.
2511 .\"O Defaults to \f(CW\*(C`notice\*(C'\fR.
2512 ユーザが認証に成功したときに使用する syslog の重大度 (priority)。
2513 デフォルトでは \f(CW\*(C`notice\*(C'\fR になっている。
2514 .\"O .Sp
2515 .\"O See syslog_badpri for the list of supported syslog priorities.
2516 .Sp
2517 どんな syslog の重大度が指定できるかについては、
2518 syslog_badpri を参照。
2519 .IP "sudoers_locale" 16
2520 .IX Item "sudoers_locale"
2521 .\"O Locale to use when parsing the sudoers file, logging commands, and
2522 .\"O sending email.  Note that changing the locale may affect how sudoers
2523 .\"O is interpreted.  Defaults to \f(CW"C"\fR.
2524 sudoers ファイルを解析したり、コマンドのログを記録したり、
2525 email を送付したりするときに使用するロケール。ロケールの変更は、
2526 sudoers の解釈に影響があるかもしれないので、気をつけてほしい。
2527 デフォルトでは \f(CW"C"\fR になっている。
2528 .IP "timestampdir" 16
2529 .IX Item "timestampdir"
2530 .\"O The directory in which \fBsudo\fR stores its timestamp files.
2531 .\"O The default is \fI/var/lib/sudo\fR.
2532 \&\fBsudo\fR がタイムスタンプ・ファイルを置くディレクトリ。
2533 デフォルトは \fI/var/lib/sudo\fR である。
2534 .IP "timestampowner" 16
2535 .IX Item "timestampowner"
2536 .\"O The owner of the timestamp directory and the timestamps stored therein.
2537 .\"O The default is \f(CW\*(C`root\*(C'\fR.
2538 タイムスタンプ・ディレクトリとそこに置かれるタイムスタンプの所有者。
2539 デフォルトは \f(CW\*(C`root\*(C'\fR である。
2540 .if \n(SL \{\
2541 .IP "type" 16
2542 .IX Item "type"
2543 .\"O The default SELinux type to use when constructing a new security
2544 .\"O context to run the command.  The default type may be overridden on
2545 .\"O a per-command basis in \fIsudoers\fR or via command line options.
2546 .\"O This option is only available whe \fBsudo\fR is built with SELinux support.
2547 コマンドを実行するために SELinux の新しいセキュリティ・コンテキストを
2548 構成するとき、使用するデフォルトのタイプ。デフォルトのタイプは、
2549 \&\fIsudoers\fR ファイルや、コマンドラインオプションを使って、コマンド
2550 ごとに変更することができる。このオプションが利用できるのは、\fBsudo\fR 
2551 が SELinux サポートつきで作成されたときだけである。
2552 \}
2553 .PP
2554 .\"O \&\fBStrings that can be used in a boolean context\fR:
2555 \&\fB真偽値としても使用できる文字列\fR:
2556 .IP "env_file" 12
2557 .IX Item "env_file"
2558 .\"O The \fIenv_file\fR option specifies the fully qualified path to a
2559 .\"O file containing variables to be set in the environment of the program
2560 .\"O being run.  Entries in this file should either be of the form
2561 .\"O \&\f(CW\*(C`VARIABLE=value\*(C'\fR or \f(CW\*(C`export VARIABLE=value\*(C'\fR.  The value may
2562 .\"O optionally be surrounded by single or double quotes.  Variables in
2563 .\"O this file are subject to other \fBsudo\fR environment settings such
2564 .\"O as \fIenv_keep\fR and \fIenv_check\fR.
2565 \&\fIenv_file\fR オプションでファイルの絶対パスを指定すると、
2566 実行するプログラムの環境として設定する変数を、そのファイルに格納しておくことができる。
2567 このファイルのエントリは \f(CW\*(C`VARIABLE=value\*(C'\fR
2568 か \f(CW\*(C`export VARIABLE=value\*(C'\fR の形でなければならない。
2569 変数の値をシングルクォートやダブルクォートで囲んでもよい。
2570 このファイルに含まれる変数は、\fIenv_keep\fR や \fIenv_check\fR のような
2571 \&\fBsudo\fR のほかの環境設定の影響を受ける。
2572 .IP "exempt_group" 12
2573 .IX Item "exempt_group"
2574 .\"O Users in this group are exempt from password and \s-1PATH\s0 requirements.
2575 .\"O The group name specified should not include a \f(CW\*(C`%\*(C'\fR prefix.
2576 .\"O This is not set by default.
2577 このグループのユーザはパスワードの入力や \fIsecure_path\fR による
2578 \&\s-1PATH\s0 の限定を免除されている。
2579 指定するグループ名に接頭辞の \f(CW\*(C`%\*(C'\fR を付けてはいけない。
2580 このオプションはデフォルトではセットされていない。
2581 .IP "group_plugin" 12
2582 .IX Item "group_plugin"
2583 .\"O A string containing a \fIsudoers\fR group plugin with optional arguments.
2584 .\"O This can be used to implement support for the \f(CW\*(C`nonunix_group\*(C'\fR
2585 .\"O syntax described earlier.  The string should consist of the plugin
2586 .\"O path, either fully-qualified or relative to the \fI/usr/local/libexec\fR
2587 .\"O directory, followed by any configuration arguments the plugin
2588 .\"O requires.  These arguments (if any) will be passed to the plugin's
2589 .\"O initialization function.  If arguments are present, the string must
2590 .\"O be enclosed in double quotes (\f(CW\*(C`"\*(C'\fR).
2591 .\"O .Sp
2592 このオプションの値となる文字列には、\fIsudoers\fR のグループ・プラグインと、
2593 必要ならその引き数を指定する。
2594 このオプションを使用すれば、前述した (訳注: 「エイリアス」セクション参照)
2595 非 Unix グループの書式を使えるようにすることも可能だ。
2596 値となる文字列は、プラグインのパスに続けて、その設定に必要な引き数があれば、
2597 それを付け加えたものだが、パスは絶対パスか、
2598 \&\fI/usr/local/libexec\fR を基点とする相対パスにするべきである。
2599 指定した引き数は (もし存在するなら) プラグインの初期化関数に渡される。
2600 引き数が存在する場合は、
2601 文字列をダブルクォート (\f(CW\*(C`"\*(C'\fR) で囲まなければならない。 
2602 .Sp
2603 .\"O For example, given \fI/etc/sudo\-group\fR, a group file in Unix group
2604 .\"O format, the sample group plugin can be used:
2605 .\"O .Sp
2606 たとえば、\fI/etc/sudo\-group\fR という
2607 Unix グループの書式で書いたグループファイルがあるとしよう。
2608 次のようにすれば、sample group plugin を使用することができる。
2609 .Sp
2610 .Vb 1
2611 \&    Defaults group_plugin="sample_group.so /etc/sudo\-group"
2612 .Ve
2613 .Sp
2614 .\"O For more information see \fIsudo_plugin\fR\|(5).
2615 詳細に付いては、\fIsudo_plugin\fR\|(5) をご覧いただきたい。
2616 .IP "lecture" 12
2617 .IX Item "lecture"
2618 .\"O This option controls when a short lecture will be printed along with
2619 .\"O the password prompt.  It has the following possible values:
2620 \&\fBsudo\fR はパスワードプロンプトに添えて簡単な訓戒を表示することができる。
2621 このオプションはその訓戒をいつ表示するかを決定する。
2622 以下の値が可能である。
2623 .RS 12
2624 .IP "always" 8
2625 .IX Item "always"
2626 .\"O Always lecture the user.
2627 いつでも必ず訓戒を表示する。
2628 .IP "never" 8
2629 .IX Item "never"
2630 .\"O Never lecture the user.
2631 訓戒をまったく表示しない。
2632 .IP "once" 8
2633 .IX Item "once"
2634 .\"O Only lecture the user the first time they run \fBsudo\fR.
2635 ユーザがはじめて \fBsudo\fR を実行したときだけ表示する。
2636 .RE
2637 .RS 12
2638 .Sp
2639 .\"O If no value is specified, a value of \fIonce\fR is implied.
2640 .\"O Negating the option results in a value of \fInever\fR being used.
2641 .\"O The default value is \fIonce\fR.
2642 値を指定しないと、\fIonce\fR を指定したことになる。頭に '!' を付けて、
2643 このオプションを否定すると、値に \fInever\fR が使用される。
2644 デフォルトの値は \fIonce\fR である。
2645 .RE
2646 .IP "lecture_file" 12
2647 .IX Item "lecture_file"
2648 .\"O Path to a file containing an alternate \fBsudo\fR lecture that will
2649 .\"O be used in place of the standard lecture if the named file exists.
2650 .\"O By default, \fBsudo\fR uses a built-in lecture.
2651 標準の訓戒の代わりに使用する \fBsudo\fR の訓戒を書き込んだファイルがあるなら、
2652 \&\fIlecture_file\fR でそのパスを指定する。\fBsudo\fR はデフォルトでは、
2653 プログラムに埋め込まれた訓戒を使用する。
2654 .IP "listpw" 12
2655 .IX Item "listpw"
2656 .\"O This option controls when a password will be required when a
2657 .\"O user runs \fBsudo\fR with the \fB\-l\fR option.  It has the following possible values:
2658 このオプションは、\fBsudo\fB を\fB\ -l\fR オプション付きで実行したとき、
2659 ユーザがパスワードを要求されるのは、どんな場合かを決定する。
2660 以下の値が可能である。
2661 .RS 12
2662 .IP "all" 8
2663 .IX Item "all"
2664 .\"O All the user's \fIsudoers\fR entries for the current host must have
2665 .\"O the \f(CW\*(C`NOPASSWD\*(C'\fR flag set to avoid entering a password.
2666 パスワードを入力しないですむためには、
2667 \&\fIsudoers\fR ファイルの使用中のホストに対する当該ユーザのエントリのすべてに
2668 \&\f(CW\*(C`NOPASSWD\*(C'\fR タグが設定されていなければならない。
2669 .IP "always" 8
2670 .IX Item "always"
2671 .\"O The user must always enter a password to use the \fB\-l\fR option.
2672 ユーザは \fB\-l\fR オプションを使用する際に
2673 必ずパスワードを入力しなければならない。
2674 .IP "any" 8
2675 .IX Item "any"
2676 .\"O At least one of the user's \fIsudoers\fR entries for the current host
2677 .\"O must have the \f(CW\*(C`NOPASSWD\*(C'\fR flag set to avoid entering a password.
2678 パスワードを入力しないですむためには、\fIsudoers\fR ファイルの
2679 使用中のホストに対する当該ユーザのエントリの少なくとも一つに 
2680 \&\f(CW\*(C`NOPASSWD\*(C'\fR タグが設定されていなければならない。
2681 .IP "never" 8
2682 .IX Item "never"
2683 .\"O The user need never enter a password to use the \fB\-l\fR option.
2684 ユーザは \fB\-l\fR オプションを使用する際に
2685 パスワードを入力する必要がまったくない。
2686 .RE
2687 .RS 12
2688 .Sp
2689 .\"O If no value is specified, a value of \fIany\fR is implied.
2690 .\"O Negating the option results in a value of \fInever\fR being used.
2691 .\"O The default value is \fIany\fR.
2692 値を指定しないと、値は \fIany\fR だと見なされる。'!' を頭に付けて、
2693 このオプションを否定すると、値に \fInever\fR が使われることになる。
2694 デフォルトは \fIany\fR である。
2695 .RE
2696 .IP "logfile" 12
2697 .IX Item "logfile"
2698 .\"O Path to the \fBsudo\fR log file (not the syslog log file).  Setting a path
2699 .\"O turns on logging to a file; negating this option turns it off.
2700 .\"O By default, \fBsudo\fR logs via syslog.
2701 \&\fBsudo\fR 独自のログファイルのパス (syslog 経由のログファイルではない)。
2702 パスを指定すると、独自ファイルへのロギングが on になり、 '!' を頭に付けて、
2703 このオプションを否定すると、off になる。デフォルトでは、\fBsudo\fR は 
2704 syslog 経由でログを取る。
2705 .IP "mailerflags" 12
2706 .IX Item "mailerflags"
2707 .\"O Flags to use when invoking mailer. Defaults to \fB\-t\fR.
2708 メーラを起動するときに使用するフラグ。デフォルトは \fB\-t\fR になっている。
2709 .IP "mailerpath" 12
2710 .IX Item "mailerpath"
2711 .\"O Path to mail program used to send warning mail.
2712 .\"O Defaults to the path to sendmail found at configure time.
2713 警告メールの送信に使うメール・プログラムのパス。デフォルトは configure 
2714 したときに見つかった sendmail のパス。
2715 .IP "mailfrom" 12
2716 .IX Item "mailfrom"
2717 .\"O Address to use for the \*(L"from\*(R" address when sending warning and error
2718 .\"O mail.  The address should be enclosed in double quotes (\f(CW\*(C`"\*(C'\fR) to
2719 .\"O protect against \fBsudo\fR interpreting the \f(CW\*(C`@\*(C'\fR sign.  Defaults to
2720 .\"O the name of the user running \fBsudo\fR.
2721 警告メールやエラー・メールを送るとき、差出人として使用するアドレス。
2722 \&\fBsudo\fR が \f(CW\*(C`@\*(C'\fR 記号を解釈しないようにするため、
2723 アドレスはダブルクォート (\f(CW\*(C`"\*(C'\fR) で囲むべきである。デフォルトは、
2724 \&\fBsudo\fR を実行するユーザの名前。
2725 .IP "mailto" 12
2726 .IX Item "mailto"
2727 .\"O Address to send warning and error mail to.  The address should
2728 .\"O be enclosed in double quotes (\f(CW\*(C`"\*(C'\fR) to protect against \fBsudo\fR
2729 .\"O interpreting the \f(CW\*(C`@\*(C'\fR sign.  Defaults to \f(CW\*(C`root\*(C'\fR.
2730 警告メールやエラー・メールを送付する宛先のアドレス。\fBsudo\fR が 
2731 \&\f(CW\*(C`@\*(C'\fR 記号を解釈しないようにするため、
2732 アドレスはダブルクォート (\f(CW\*(C`"\*(C'\fR) で囲むべきである。
2733 デフォルトは root になっている。
2734 .IP "secure_path" 12
2735 .IX Item "secure_path"
2736 .\"O Path used for every command run from \fBsudo\fR.  If you don't trust the
2737 .\"O people running \fBsudo\fR to have a sane \f(CW\*(C`PATH\*(C'\fR environment variable you may
2738 .\"O want to use this.  Another use is if you want to have the \*(L"root path\*(R"
2739 .\"O be separate from the \*(L"user path.\*(R"  Users in the group specified by the
2740 .\"O \&\fIexempt_group\fR option are not affected by \fIsecure_path\fR.
2741 .\"O This option is not set by default.
2742 \&\fBsudo\fR から実行されるあらゆるコマンドが使用するパス。
2743 \&\fBsudo\fR を実行するユーザが、無難な環境変数 \f(CW\*(C`PATH\*(C'\fR
2744 を使っているかどうか確信が持てないなら、このオプションを使用するとよいだろう。
2745 もう一つの使用法は、「root のパス」と「一般ユーザのパス」を別のものにしておきたい場合だ。
2746 ユーザが \fIexempt_group\fR オプションで指定したグループに属していると、
2747 そのユーザは \fIsecure_path\fR の影響を受けない。
2748 このオプションは、デフォルトではセットされていない。
2749 .IP "syslog" 12
2750 .IX Item "syslog"
2751 .\"O Syslog facility if syslog is being used for logging (negate to
2752 .\"O disable syslog logging).  Defaults to \f(CW\*(C`authpriv\*(C'\fR.
2753 syslog を使ってログを取っている場合の syslog のファシリティ
2754 (syslog 経由でログを取らないなら、'!' を頭に付けて、このオプションを否定する)。
2755 デフォルトでは \f(CW\*(C`authpriv\*(C'\fR になっている。
2756 .\"O .Sp
2757 .\"O The following syslog facilities are supported: \fBauthpriv\fR (if your
2758 .\"O \&\s-1OS\s0 supports it), \fBauth\fR, \fBdaemon\fR, \fBuser\fR, \fBlocal0\fR, \fBlocal1\fR,
2759 .\"O \&\fBlocal2\fR, \fBlocal3\fR, \fBlocal4\fR, \fBlocal5\fR, \fBlocal6\fR, and \fBlocal7\fR.
2760 .Sp
2761 syslog のファシリティには、次のものが指定できる。
2762 \&\fBauthpriv\fR (\s-1OS\s0 が対応している場合), \fBauth\fR, \fBdaemon\fR,
2763 \&\fBuser\fR, \fBlocal0\fR, \fBlocal1\fR, \fBlocal2\fR, \fBlocal3\fR,
2764 \&\fBlocal4\fR, \fBlocal5\fR, \fBlocal6\fR, \fBlocal7\fR。
2765 .IP "verifypw" 12
2766 .IX Item "verifypw"
2767 .\"O This option controls when a password will be required when a user runs
2768 .\"O \&\fBsudo\fR with the \fB\-v\fR option.  It has the following possible values:
2769 このオプションは、\fBsudo\fR を \fB\-v\fR オプション付きで実行したとき、
2770 ユーザがパスワードを要求されるのは、どんな場合かを決定する。
2771 次のような値が可能である。
2772 .RS 12
2773 .IP "all" 8
2774 .IX Item "all"
2775 .\"O All the user's \fIsudoers\fR entries for the current host must have
2776 .\"O the \f(CW\*(C`NOPASSWD\*(C'\fR flag set to avoid entering a password.
2777 パスワードを入力しないですむためには、
2778 \&\fIsudoers\fR ファイルの使用中のホストに対する当該ユーザのエントリのすべてに
2779 \&\f(CW\*(C`NOPASSWD\*(C'\fR タグが設定されていなければならない。
2780 .IP "always" 8
2781 .IX Item "always"
2782 .\"O The user must always enter a password to use the \fB\-v\fR option.
2783 ユーザは \fB\-v\fR オプションを使用する際に
2784 必ずパスワードを入力しなければならない。
2785 .IP "any" 8
2786 .IX Item "any"
2787 .\"O At least one of the user's \fIsudoers\fR entries for the current host
2788 .\"O must have the \f(CW\*(C`NOPASSWD\*(C'\fR flag set to avoid entering a password.
2789 パスワードを入力しないですむためには、\fIsudoers\fR ファイルの
2790 使用中のホストに対する当該ユーザのエントリの少なくとも一つに 
2791 \f(CW\*(C`NOPASSWD\*(C'\fR タグが設定されていなければならない。
2792 .IP "never" 8
2793 .IX Item "never"
2794 .\"O The user need never enter a password to use the \fB\-v\fR option.
2795 ユーザは \fB\-v\fR オプションを使用する際に
2796 パスワードを入力する必要がまったくない。
2797 .RE
2798 .RS 12
2799 .Sp
2800 .\"O If no value is specified, a value of \fIall\fR is implied.
2801 .\"O Negating the option results in a value of \fInever\fR being used.
2802 .\"O The default value is \fIall\fR.
2803 値を指定しないと、値は \fIall\fR だと見なされる。'!' を頭に付けて、
2804 このオプションを否定すると、値に \fInever\fR が使われることになる。
2805 デフォルトは \fIall\fR である。
2806 .RE
2807 .PP
2808 .\"O \&\fBLists that can be used in a boolean context\fR:
2809 \&\fB真偽値としても使用できるリスト\fR:
2810 .IP "env_check" 16
2811 .IX Item "env_check"
2812 .\"O Environment variables to be removed from the user's environment if
2813 .\"O the variable's value contains \f(CW\*(C`%\*(C'\fR or \f(CW\*(C`/\*(C'\fR characters.  This can
2814 .\"O be used to guard against printf-style format vulnerabilities in
2815 .\"O poorly-written programs.  The argument may be a double-quoted,
2816 .\"O space-separated list or a single value without double-quotes.  The
2817 .\"O list can be replaced, added to, deleted from, or disabled by using
2818 .\"O the \f(CW\*(C`=\*(C'\fR, \f(CW\*(C`+=\*(C'\fR, \f(CW\*(C`\-=\*(C'\fR, and \f(CW\*(C`!\*(C'\fR operators respectively.  Regardless
2819 .\"O of whether the \f(CW\*(C`env_reset\*(C'\fR option is enabled or disabled, variables
2820 .\"O specified by \f(CW\*(C`env_check\*(C'\fR will be preserved in the environment if
2821 .\"O they pass the aforementioned check.  The default list of environment
2822 .\"O variables to check is displayed when \fBsudo\fR is run by root with
2823 .\"O the \fI\-V\fR option.
2824 変数の値に \f(CW\*(C`%\*(C'\fR や \f(CW\*(C`/\*(C'\fR が含まれる場合に、
2825 ユーザの環境から取り除かれる環境変数。
2826 この機能は、出来のよくないプログラムに見られる
2827 printf 形式のフォーマットの脆弱性に対処するために利用できる。
2828 このオプションの引き数は、ダブルクォートで囲まれ、
2829 スペースで区切られたリストでもよく、
2830 ダブルクォートなしの単一の値でもよい。リストは、\f(CW\*(C`=\*(C'\fR,
2831 \&\f(CW\*(C`+=\*(C'\fR, \f(CW\*(C`\-=\*(C'\fR, \f(CW\*(C`!\*(C'\fR
2832 演算子を使って、それぞれ置き換えたり、追加したり、削除したり、
2833 無効にしたりすることができる。
2834 \&\fIenv_check\fR で指定された変数は、
2835 \&\fIenv_reset\fR オプショの有効・無効にかかわらず、
2836 上記のチェックにパスすれば、環境に保存されることになる。
2837 チェックされる環境変数のデフォルトのリストは、root ユーザが \fBsudo\fR に
2838 \&\fI\-V\fR オプションを付けて実行したときに表示される。
2839 .IP "env_delete" 16
2840 .IX Item "env_delete"
2841 .\"O Environment variables to be removed from the user's environment
2842 .\"O when the \fIenv_reset\fR option is not in effect.  The argument may
2843 .\"O be a double-quoted, space-separated list or a single value without
2844 .\"O double-quotes.  The list can be replaced, added to, deleted from,
2845 .\"O or disabled by using the \f(CW\*(C`=\*(C'\fR, \f(CW\*(C`+=\*(C'\fR, \f(CW\*(C`\-=\*(C'\fR, and \f(CW\*(C`!\*(C'\fR operators
2846 .\"O respectively.  The default list of environment variables to remove
2847 .\"O is displayed when \fBsudo\fR is run by root with the \fI\-V\fR option.
2848 .\"O Note that many operating systems will remove potentially dangerous
2849 .\"O variables from the environment of any setuid process (such as
2850 .\"O \&\fBsudo\fR).
2851 \&\fIenv_reset\fR オプションが無効になっているときに、
2852 ユーザの環境から取り除かれる環境変数。このオプションの引き数は、
2853 ダブルクォートで囲まれ、スペースで区切られたリストでもよく、
2854 ダブルクォートなしの単一の値でもよい。
2855 リストは、\f(CW\*(C`=\*(C'\fR, \f(CW\*(C`+=\*(C'\fR, \f(CW\*(C`\-=\*(C'\fR,
2856 \&\f(CW\*(C`!\*(C'\fR 演算子を使って、それぞれ置き換えたり、追加したり、
2857 削除したり、無効にしたりすることができる。
2858 取り除かれる環境変数のデフォルトのリストは、root ユーザが \fBsudo\fR に
2859 \&\fI\-V\fR オプションを付けて実行したときに表示される。
2860 留意すべきは、オペレーティングシステムには、
2861 危険をもたらしかねない変数をいかなる setuid プロセス (\fBsudo\fR もその一つ)
2862 の環境からも取り除くことにしているものが多いということである。
2863 .IP "env_keep" 16
2864 .IX Item "env_keep"
2865 .\"O Environment variables to be preserved in the user's environment
2866 .\"O when the \fIenv_reset\fR option is in effect.  This allows fine-grained
2867 .\"O control over the environment \fBsudo\fR\-spawned processes will receive.
2868 .\"O The argument may be a double-quoted, space-separated list or a
2869 .\"O single value without double-quotes.  The list can be replaced, added
2870 .\"O to, deleted from, or disabled by using the \f(CW\*(C`=\*(C'\fR, \f(CW\*(C`+=\*(C'\fR, \f(CW\*(C`\-=\*(C'\fR, and
2871 .\"O \&\f(CW\*(C`!\*(C'\fR operators respectively.  The default list of variables to keep
2872 .\"O is displayed when \fBsudo\fR is run by root with the \fI\-V\fR option.
2873 .\"O .PP
2874 \&\fIenv_reset\fR オプションが有効になっているときでも、
2875 ユーザの環境にそのまま保存される環境変数。このオプションによって、
2876 \&\fBsudo\fR から生み出されるプロセスが受け取る環境を、
2877 きめ細かく制御することが可能になる。このオプションの引き数は、
2878 ダブルクォートで囲まれ、スペースで区切られたリストでもよく、
2879 ダブルクォートなしの単一の値でもよい。リストは、
2880 \&\f(CW\*(C`=\*(C'\fR, \f(CW\*(C`+=\*(C'\fR, \f(CW\*(C`\-=\*(C'\fR,
2881 \&\f(CW\*(C`!\*(C'\fR 演算子を使って、それぞれ置き換えたり、
2882 追加したり、削除したり、無効にしたりすることができる。
2883 保存される変数のデフォルトのリストは、root ユーザが \fBsudo\fR に
2884 \&\fI\-V\fR オプションを付けて実行したときに表示される。
2885 .\"O .SH "FILES"
2886 .SH "ファイル"
2887 .IX Header "FILES"
2888 .ie n .IP "\fI/etc/sudoers\fR" 24
2889 .el .IP "\fI/etc/sudoers\fR" 24
2890 .IX Item "/etc/sudoers"
2891 .\"O List of who can run what
2892 誰が何を実行できるかのリスト
2893 .IP "\fI/etc/group\fR" 24
2894 .IX Item "/etc/group"
2895 .\"O Local groups file
2896 ローカルのグループファイル
2897 .IP "\fI/etc/netgroup\fR" 24
2898 .IX Item "/etc/netgroup"
2899 .\"O List of network groups
2900 ネットワークグループのリスト
2901 .ie n .IP "\fI/var/log/sudo-io\fR" 24
2902 .el .IP "\fI/var/log/sudo-io\fR" 24
2903 .IX Item "/var/log/sudo-io"
2904 .\"O I/O log files
2905 入出力のログファイル (訳注: 厳密には、
2906 入出力のログを記録するファイル群をその下に格納するトップディレクトリ)
2907 .ie n .IP "\fI/var/lib/sudo\fR" 24
2908 .el .IP "\fI/var/lib/sudo\fR" 24
2909 .IX Item "/var/lib/sudo"
2910 .\"O Directory containing time stamps for the \fIsudoers\fR security policy
2911 \&\fIsudoers\fR セキュリティ・ポリシーが使用するタイムスタンプを格納するディレクトリ。
2912 .IP "\fI/etc/environment\fR" 24
2913 .IX Item "/etc/environment"
2914 .\"O Initial environment for \fB\-i\fR mode on Linux and \s-1AIX\s0
2915 Linux や \s-1AIX\s0 で \fB\-i\fR モードを使用するときの初期環境
2916 .\"O .SH "EXAMPLES"
2917 .SH "用例"
2918 .IX Header "EXAMPLES"
2919 .\"O Below are example \fIsudoers\fR entries.  Admittedly, some of
2920 .\"O these are a bit contrived.  First, we allow a few environment
2921 .\"O variables to pass and then define our \fIaliases\fR:
2922 .\"O .PP
2923 以下は \fIsudoers\fR エントリの見本である。
2924 正直なところ、いささか凝りすぎの部分もある。
2925 まず最初に継承を許可する環境変数をいくつか指定し、
2926 続いて \fIaliases\fR の定義をする。
2927 .PP
2928 .Vb 4
2929 .\"O \& # Run X applications through sudo; HOME is used to find the
2930 .\"O \& # .Xauthority file.  Note that other programs use HOME to find
2931 .\"O \& # configuration files and this may lead to privilege escalation!
2932 \& # sudo 経由で X アプリケーションを実行するとき、HOME は
2933 \& # .Xauthority ファイルを探すために使用される。ほかのプログラムも
2934 \& # 設定ファイルを探すのに HOME を使用するので、この指定が
2935 \& # 権限の昇格を引き起こしかねないことに注意してほしい。
2936 \& Defaults env_keep += "DISPLAY HOME"
2937 \&
2938 .\"O \& # User alias specification
2939 \& # User alias の指定
2940 \& User_Alias     FULLTIMERS = millert, mikef, dowdy
2941 \& User_Alias     PARTTIMERS = bostley, jwfox, crawl
2942 \& User_Alias     WEBMASTERS = will, wendy, wim
2943 \&
2944 .\"O \& # Runas alias specification
2945 \& # Runas alias の指定
2946 \& Runas_Alias    OP = root, operator
2947 \& Runas_Alias    DB = oracle, sybase
2948 \& Runas_Alias    ADMINGRP = adm, oper
2949 \&
2950 .\"O \& # Host alias specification
2951 \& # Host alias の指定
2952 \& Host_Alias     SPARC = bigtime, eclipse, moet, anchor :\e
2953 \&                SGI = grolsch, dandelion, black :\e
2954 \&                ALPHA = widget, thalamus, foobar :\e
2955 \&                HPPA = boa, nag, python
2956 \& Host_Alias     CUNETS = 128.138.0.0/255.255.0.0
2957 \& Host_Alias     CSNETS = 128.138.243.0, 128.138.204.0/24, 128.138.242.0
2958 \& Host_Alias     SERVERS = master, mail, www, ns
2959 \& Host_Alias     CDROM = orion, perseus, hercules
2960 \&
2961 .\"O \& # Cmnd alias specification
2962 \& # Cmnd alias の指定
2963 \& Cmnd_Alias     DUMPS = /usr/bin/mt, /usr/sbin/dump, /usr/sbin/rdump,\e
2964 \&                        /usr/sbin/restore, /usr/sbin/rrestore
2965 \& Cmnd_Alias     KILL = /usr/bin/kill
2966 \& Cmnd_Alias     PRINTING = /usr/sbin/lpc, /usr/bin/lprm
2967 \& Cmnd_Alias     SHUTDOWN = /usr/sbin/shutdown
2968 \& Cmnd_Alias     HALT = /usr/sbin/halt
2969 \& Cmnd_Alias     REBOOT = /usr/sbin/reboot
2970 \& Cmnd_Alias     SHELLS = /usr/bin/sh, /usr/bin/csh, /usr/bin/ksh, \e
2971 \&                         /usr/local/bin/tcsh, /usr/bin/rsh, \e
2972 \&                         /usr/local/bin/zsh
2973 \& Cmnd_Alias     SU = /usr/bin/su
2974 \& Cmnd_Alias     PAGERS = /usr/bin/more, /usr/bin/pg, /usr/bin/less
2975 .Ve
2976 .PP
2977 .\"O Here we override some of the compiled in default values.  We want
2978 .\"O \&\fBsudo\fR to log via \fIsyslog\fR\|(3) using the \fIauth\fR facility in all
2979 .\"O cases.  We don't want to subject the full time staff to the \fBsudo\fR
2980 .\"O lecture, user \fBmillert\fR need not give a password, and we don't
2981 .\"O want to reset the \f(CW\*(C`LOGNAME\*(C'\fR, \f(CW\*(C`USER\*(C'\fR or \f(CW\*(C`USERNAME\*(C'\fR environment
2982 .\"O variables when running commands as root.  Additionally, on the
2983 .\"O machines in the \fI\s-1SERVERS\s0\fR \f(CW\*(C`Host_Alias\*(C'\fR, we keep an additional
2984 .\"O local log file and make sure we log the year in each log line since
2985 .\"O the log entries will be kept around for several years.  Lastly, we
2986 .\"O disable shell escapes for the commands in the \s-1PAGERS\s0 \f(CW\*(C`Cmnd_Alias\*(C'\fR
2987 .\"O (\fI/usr/bin/more\fR, \fI/usr/bin/pg\fR and \fI/usr/bin/less\fR).
2988 .\"O .PP
2989 以下では、コンパイル時に埋め込まれたデフォルト値のいくつかを変更している。
2990 \&\fBsudo\fR には \fIsyslog\fR\|(3) 経由でログを記録し、
2991 ファシリティにはすべての場合に \fIauth\fR を使用させたい。
2992 フルタイムのスタッフには \fBsudo\fR の訓戒を出さないようにしたい。
2993 ユーザ \fBmillert\fR はパスワードを入力しないでよい。
2994 コマンドを root として実行するときは、
2995 環境変数 \f(CW\*(C`LOGNAME\*(C'\fR, \f(CW\*(C`USER\*(C'\fR,
2996 \&\f(CW\*(C`USERNAME\*(C'\fR を変更したくない。さらに、
2997 \&\fI\s-1SERVERS\s0\fR という \f(CW\*(C`Host_Alias\*(C'\fR に属するマシンでは、
2998 ローカルなログファイルを副本として作り、
2999 ログの記入事項は数年に渡って保存されるので、
3000 ログの各行に間違いなく年度が入るようにする。
3001 最後に \s-1PAGERS\s0 という \f(CW\*(C`Cmnd_Alias\*(C'\fR に属するコマンド
3002 (\fI/usr/bin/more\fR, \fI/usr/bin/pg\fR, \fI/usr/bin/less\fR) については、
3003 シェル・エスケープを無効にする。
3004 .PP
3005 .Vb 7
3006 .\"O \& # Override built\-in defaults
3007 \& # built-in defaults の変更
3008 \& Defaults               syslog=auth
3009 \& Defaults>root          !set_logname
3010 \& Defaults:FULLTIMERS    !lecture
3011 \& Defaults:millert       !authenticate
3012 \& Defaults@SERVERS       log_year, logfile=/var/log/sudo.log
3013 \& Defaults!PAGERS        noexec
3014 .Ve
3015 .PP
3016 .\"O The \fIUser specification\fR is the part that actually determines who may
3017 .\"O run what.
3018 .\"O .PP
3019 ユーザ設定が、誰が何を実行できるかを実際に決めている部分だ。
3020 .PP
3021 .Vb 2
3022 \& root           ALL = (ALL) ALL
3023 \& %wheel         ALL = (ALL) ALL
3024 .Ve
3025 .PP
3026 .\"O We let \fBroot\fR and any user in group \fBwheel\fR run any command on any
3027 .\"O host as any user.
3028 .\"O .PP
3029 \&\fBroot\fR と \fBwheel\fR グループのすべてのユーザには、
3030 どのホストでも任意のユーザとしていかなるコマンドでも実行することを認める。
3031 .PP
3032 .Vb 1
3033 \& FULLTIMERS     ALL = NOPASSWD: ALL
3034 .Ve
3035 .PP
3036 .\"O Full time sysadmins (\fBmillert\fR, \fBmikef\fR, and \fBdowdy\fR) may run any
3037 .\"O command on any host without authenticating themselves.
3038 .\"O .PP
3039 フルタイムのシステム管理者 (\fBmillert\fR, \fBmikef\fR, \fBdowdy\fR) 
3040 は、どのホストでも任意のコマンドを認証なしで実行できる。
3041 .PP
3042 .Vb 1
3043 \& PARTTIMERS     ALL = ALL
3044 .Ve
3045 .PP
3046 .\"O Part time sysadmins (\fBbostley\fR, \fBjwfox\fR, and \fBcrawl\fR) may run any
3047 .\"O command on any host but they must authenticate themselves first
3048 .\"O (since the entry lacks the \f(CW\*(C`NOPASSWD\*(C'\fR tag).
3049 .\"O .PP
3050 パートタイムのシステム管理者 ((\fBbostley\fR, \fBjwfox\fR,
3051 \&\fBcrawl\fR) は、どのホストでも任意のコマンドを実行できるが、
3052 その際に認証をしなければならない (このエントリには 
3053 \&\f(CW\*(C`NOPASSWD\*(C'\fR タグが指定されていないので)。
3054 .PP
3055 .Vb 1
3056 \& jack           CSNETS = ALL
3057 .Ve
3058 .PP
3059 .\"O The user \fBjack\fR may run any command on the machines in the \fI\s-1CSNETS\s0\fR alias
3060 .\"O (the networks \f(CW128.138.243.0\fR, \f(CW128.138.204.0\fR, and \f(CW128.138.242.0\fR).
3061 .\"O Of those networks, only \f(CW128.138.204.0\fR has an explicit netmask (in
3062 .\"O \&\s-1CIDR\s0 notation) indicating it is a class C network.  For the other
3063 .\"O networks in \fI\s-1CSNETS\s0\fR, the local machine's netmask will be used
3064 .\"O during matching.
3065 .\"O .PP
3066 ユーザ \fBjack\fR は、\fI\s-1CSNETS\s0\fR
3067 というエイリアスに属するマシンで、任意のコマンドを実行できる
3068 (すなわち、ネットワークが \f(CW128.138.243.0\fR, \f(CW128.138.204.0\fR,
3069 \&\f(CW128.138.242.0\fR のマシンだ)。この内、\f(CW128.138.204.0\fR にのみ
3070 class C のネットワークであることを示す明示的な (\s-1CIDR\s0 表記の)
3071 netmask がある。\fI\s-1CSNETS\s0\fR のほかのネットワークについては、
3072 ローカルマシンの netmask がマッチングの際に使われることになる。
3073 .PP
3074 .Vb 1
3075 \& lisa           CUNETS = ALL
3076 .Ve
3077 .PP
3078 .\"O The user \fBlisa\fR may run any command on any host in the \fI\s-1CUNETS\s0\fR alias
3079 .\"O (the class B network \f(CW128.138.0.0\fR).
3080 .\"O .PP
3081 ユーザ \fBlisa\fR は、エイリアスが \fI\s-1CUNETS\s0\fR のいかなるホストでも、
3082 任意のコマンドを実行することができる (すなわち、
3083 \f(CW128.138.0.0\fR という class B ネットワークのマシンだ)。
3084 .PP
3085 .Vb 2
3086 \& operator       ALL = DUMPS, KILL, SHUTDOWN, HALT, REBOOT, PRINTING,\e
3087 \&                sudoedit /etc/printcap, /usr/oper/bin/
3088 .Ve
3089 .PP
3090 .\"O The \fBoperator\fR user may run commands limited to simple maintenance.
3091 .\"O Here, those are commands related to backups, killing processes, the
3092 .\"O printing system, shutting down the system, and any commands in the
3093 .\"O directory \fI/usr/oper/bin/\fR.
3094 .\"O .PP
3095 ユーザ \fBoperator\fR は、
3096 用途が簡単な保守管理に限定されたコマンドを実行できる。この場合それは、
3097 バックアップしたり、プロセスを kill したり、印刷システムを操作したり、
3098 システムをシャットダウンしたりするのに関係するコマンドと、
3099 \&\fI/usr/oper/bin/\fR ディレクトリにある任意のコマンドである。
3100 .PP
3101 .Vb 1
3102 \& joe            ALL = /usr/bin/su operator
3103 .Ve
3104 .PP
3105 .\"O The user \fBjoe\fR may only \fIsu\fR\|(1) to operator.
3106 .\"O .PP
3107 ユーザ \fBjoe\fR は、\fIsu\fR\|(1) を使って operator になることしかできない。
3108 .PP
3109 .Vb 1
3110 .\"O \& pete           HPPA = /usr/bin/passwd [A\-Za\-z]*, !/usr/bin/passwd root
3111 .\"O \&
3112 \& %opers         ALL = (: ADMINGRP) /usr/sbin/
3113 .Ve
3114 .PP
3115 .\"O Users in the \fBopers\fR group may run commands in \fI/usr/sbin/\fR as themselves
3116 .\"O with any group in the \fI\s-1ADMINGRP\s0\fR \f(CW\*(C`Runas_Alias\*(C'\fR (the \fBadm\fR and \fBoper\fR
3117 .\"O groups).
3118 .\"O .PP
3119 \&\fBopers\fR グループのユーザは、\fI/usr/sbin/\fR にあるコマンドを、
3120 自分自身の資格で、
3121 \&\f(CW\*(C`Runas_Alias\*(C'\fR \fI\s-1ADMINGRP\s0\fR
3122 に属する任意のグループ (すなわち、\fBadm\fR か \fBoper\fR グループ)
3123 として実行できる。
3124 .PP
3125 .Vb 1
3126 \& pete           HPPA = /usr/bin/passwd [A\-Za\-z]*, !/usr/bin/passwd root
3127 .Ve
3128 .PP
3129 .\"O The user \fBpete\fR is allowed to change anyone's password except for
3130 .\"O root on the \fI\s-1HPPA\s0\fR machines.  Note that this assumes \fIpasswd\fR\|(1)
3131 .\"O does not take multiple user names on the command line.
3132 .\"O .PP
3133 ユーザ \fBpete\fR は、\fI\s-1HPPA\s0\fR に属するマシンで
3134 root 以外なら誰のパスワードでも変更することを許されている。
3135 上記の指定は、\fIpasswd\fR\|(1) がコマンドラインで複数のユーザ名を
3136 受け付けないことを前提としている点に注意してほしい。
3137 .PP
3138 .Vb 1
3139 \& bob            SPARC = (OP) ALL : SGI = (OP) ALL
3140 .Ve
3141 .PP
3142 .\"O The user \fBbob\fR may run anything on the \fI\s-1SPARC\s0\fR and \fI\s-1SGI\s0\fR machines
3143 .\"O as any user listed in the \fI\s-1OP\s0\fR \f(CW\*(C`Runas_Alias\*(C'\fR (\fBroot\fR and \fBoperator\fR).
3144 .\"O .PP
3145 ユーザ \fBbob\fR は、\fI\s-1SPARC\s0\fR や \fI\s-1SGI\s0\fR に属するマシンで
3146 \&\f(CW\*(C`Runas_Alias\*(C'\fR \fI\s-1OP\s0\fR
3147 に登録されている任意のユーザとして (\fBroot\fR と \fBoperator\fR である)
3148 どんなコマンドでも実行できる。
3149 .PP
3150 .Vb 1
3151 \& jim            +biglab = ALL
3152 .Ve
3153 .PP
3154 .\"O The user \fBjim\fR may run any command on machines in the \fIbiglab\fR netgroup.
3155 .\"O \&\fBsudo\fR knows that \*(L"biglab\*(R" is a netgroup due to the '+' prefix.
3156 .\"O .PP
3157 ユーザ \fBjim\fR は、\fIbiglab\fR ネットグループに属するマシンで、
3158 どんなコマンドでも実行できる。
3159 \&\fBsudo\fR は、\*(L"biglab\*(R" に '+' の接頭辞が付いているので、
3160 それをネットグループだと認識する。
3161 .PP
3162 .Vb 1
3163 \& +secretaries   ALL = PRINTING, /usr/bin/adduser, /usr/bin/rmuser
3164 .Ve
3165 .PP
3166 .\"O Users in the \fBsecretaries\fR netgroup need to help manage the printers
3167 .\"O as well as add and remove users, so they are allowed to run those
3168 .\"O commands on all machines.
3169 .\"O .PP
3170 \&\fBsecretaries\fR ネットグループのユーザは、ユーザの追加や削除はもちろん、
3171 プリンタの管理にも協力する必要がある。
3172 そこで、すべてのマシンでその種のコマンドの実行を認められている。
3173 .PP
3174 .Vb 1
3175 \& fred           ALL = (DB) NOPASSWD: ALL
3176 .Ve
3177 .PP
3178 .\"O The user \fBfred\fR can run commands as any user in the \fI\s-1DB\s0\fR \f(CW\*(C`Runas_Alias\*(C'\fR
3179 .\"O (\fBoracle\fR or \fBsybase\fR) without giving a password.
3180 .\"O .PP
3181 ユーザ \fBfred\fR は、\f(CW\*(C`Runas_Alias\*(C'\fR \fI\s-1DB\s0\fR
3182 の任意のユーザとして (\fBoracle\fR か \fBsybase\fR だ)
3183 パスワードを入力しないでもコマンドを実行することができる。
3184 .PP
3185 .Vb 1
3186 \& john           ALPHA = /usr/bin/su [!\-]*, !/usr/bin/su *root*
3187 .Ve
3188 .PP
3189 .\"O On the \fI\s-1ALPHA\s0\fR machines, user \fBjohn\fR may su to anyone except root
3190 .\"O but he is not allowed to specify any options to the \fIsu\fR\|(1) command.
3191 .\"O .PP
3192 ユーザ \fBjohn\fR は、\fI\s-1ALPHA\s0\fR に属するマシンで \fIsu\fR\|(1)
3193 を使って root 以外の誰にでもなることができるが、
3194 su にオプションを指定することは許されていない。
3195 .PP
3196 .Vb 1
3197 \& jen            ALL, !SERVERS = ALL
3198 .Ve
3199 .PP
3200 .\"O The user \fBjen\fR may run any command on any machine except for those
3201 .\"O in the \fI\s-1SERVERS\s0\fR \f(CW\*(C`Host_Alias\*(C'\fR (master, mail, www and ns).
3202 .\"O .PP
3203 ユーザ \fBjen\fR は、\f(CW\*(C`Host_Alias\*(C'\fR \fI\s-1SERVERS\s0\fR
3204 に属するマシン (master, mail, www, ns) を除くいかなるマシンでも、
3205 任意のコマンドを実行できる。
3206 .PP
3207 .Vb 1
3208 \& jill           SERVERS = /usr/bin/, !SU, !SHELLS
3209 .Ve
3210 .PP
3211 .\"O For any machine in the \fI\s-1SERVERS\s0\fR \f(CW\*(C`Host_Alias\*(C'\fR, \fBjill\fR may run
3212 .\"O any commands in the directory \fI/usr/bin/\fR except for those commands
3213 .\"O belonging to the \fI\s-1SU\s0\fR and \fI\s-1SHELLS\s0\fR \f(CW\*(C`Cmnd_Aliases\*(C'\fR.
3214 .\"O .PP
3215 \&\fBjill\fR は、\f(CW\*(C`Host_Alias\*(C'\fR \fI\s-1SERVERS\s0\fR のいかなるマシンでも
3216 \&\fI/usr/bin/\fR ディレクトリにある任意のコマンドを実行できるが、
3217 \&\fI\s-1SU\s0\fR や \fI\s-1SHELLS\s0\fR という
3218 \&\f(CW\*(C`Cmnd_Aliases\*(C'\fR に属するコマンドは実行できない。
3219 .PP
3220 .Vb 1
3221 \& steve          CSNETS = (operator) /usr/local/op_commands/
3222 .Ve
3223 .PP
3224 .\"O The user \fBsteve\fR may run any command in the directory /usr/local/op_commands/
3225 .\"O but only as user operator.
3226 .\"O .PP
3227 ユーザ \fBsteve\fR は、ディレクトリ \fI/usr/local/op_commands/\fR
3228 にある任意のコマンドを実行できるが、
3229 operator というユーザとして実行できるだけだ。
3230 .PP
3231 .Vb 1
3232 \& matt           valkyrie = KILL
3233 .Ve
3234 .PP
3235 .\"O On his personal workstation, valkyrie, \fBmatt\fR needs to be able to
3236 .\"O kill hung processes.
3237 .\"O .PP
3238 \&\fBmatt\fR も、自分用のワークステーション valkyrie で、ハングしたプロセスの
3239 kill ぐらいはできる必要がある。
3240 .PP
3241 .Vb 1
3242 \& WEBMASTERS     www = (www) ALL, (root) /usr/bin/su www
3243 .Ve
3244 .PP
3245 .\"O On the host www, any user in the \fI\s-1WEBMASTERS\s0\fR \f(CW\*(C`User_Alias\*(C'\fR (will,
3246 .\"O wendy, and wim), may run any command as user www (which owns the
3247 .\"O web pages) or simply \fIsu\fR\|(1) to www.
3248 .\"O .PP
3249 ホスト www で \f(CW\*(C`User_Alias\*(C'\fR \fI\s-1WEBMASTERS\s0\fR
3250 に属するいかなるユーザも (will, wendy, wim だ)、ユーザ www
3251 (web ページの所有者) として任意のコマンドを実行することができる。
3252 単に \fIsu\fR\|(1) で www になってもよい。
3253 .PP
3254 .Vb 2
3255 \& ALL            CDROM = NOPASSWD: /sbin/umount /CDROM,\e
3256 \&                /sbin/mount \-o nosuid\e,nodev /dev/cd0a /CDROM
3257 .Ve
3258 .PP
3259 .\"O Any user may mount or unmount a CD-ROM on the machines in the \s-1CDROM\s0
3260 .\"O \&\f(CW\*(C`Host_Alias\*(C'\fR (orion, perseus, hercules) without entering a password.
3261 .\"O This is a bit tedious for users to type, so it is a prime candidate
3262 .\"O for encapsulating in a shell script.
3263 いかなるユーザも、\f(CW\*(C`Host_Alias\*(C'\fR が \s-1CDROM\s0 のマシンで
3264 (orion, perseus, hercules)、パスワードを入力することなく 
3265 CD-ROM をマウント、アンマウントできる。
3266 上記のコマンドを打ち込むのはユーザにとっていささか面倒なので、
3267 シェルスクリプトとしてカプセル化してしまうのがよいだろう。
3268 .IP "[\fB訳注\fR]:" 8
3269 .IX Item "footnote2"
3270 当然と言えば当然だが、sudo は自ホストの /etc/sudoers しか読まないし、
3271 制御の及ぶ範囲も自ホストだけである。そこで、こういうことになる。
3272 AAA というホストに aaa というユーザがいるとしよう。
3273 ホスト AAA の /etc/sudoers に「ホスト BBB でユーザ aaa は
3274 sudo を介して /bin/ls を実行できる」という記述があったとしても、
3275 ユーザ aaa がホスト AAA から telnet や ssh でホスト BBB にログインし、
3276 BBB 上で sudo を使って ls を実行できるわけではない。それができるためには、
3277 ホスト BBB の /etc/sudoers に「BBB でユーザ aaa は sudo を介して
3278 /bin/ls を実行できる」という記述がなければならないのだ。
3279 ホスト BBB で実行する sudo は BBB の sudo であり、
3280 BBB の sudo は BBB の /etc/sudoers しか読まないのだから。
3281 .Sp
3282 それでは、何故、上記の「用例」で自ホスト以外の設定が行われているのか?
3283 そもそも、sudoers の書式で自ホスト以外のホストを指定できるのは、
3284 何故なのか? ホストに ALL を指定できるのは、何故なのか?
3285 それは、管理しているサイトのすべてのホストの設定を記した
3286 sudoers ファイルを一つ作って、それをすべてのホストにコピーして使う、
3287 そういった使い方を想定しているからだ。
3288 もし、サイト中のすべてのホストの設定を一ヶ所にまとめて置き、
3289 それをすべてのホストに共有させたいのなら
3290 (すなわち、sudo の設定の集中管理がしたいのなら)、
3291 LDAP の採用を考えるべきである。
3292 .\"O .SH "SECURITY NOTES"
3293 .SH "セキュリティに関する注意点"
3294 .IX Header "SECURITY NOTES"
3295 .\"O It is generally not effective to \*(L"subtract\*(R" commands from \f(CW\*(C`ALL\*(C'\fR
3296 .\"O using the '!' operator.  A user can trivially circumvent this
3297 .\"O by copying the desired command to a different name and then
3298 .\"O executing that.  For example:
3299 .\"O .PP
3300 一般的に言って、演算子 '!' を使用して \f(CW\*(C`ALL\*(C'\fR
3301 からコマンドの「引き算」をするのは、あまり有力な方法ではない。
3302 ユーザは実行したいコマンドを名前を変えてコピーし、
3303 それからそれを実行するといった簡単な方法で、裏をかくことができるからだ。
3304 たとえば、
3305 .PP
3306 .Vb 1
3307 \&    bill        ALL = ALL, !SU, !SHELLS
3308 .Ve
3309 .PP
3310 .\"O Doesn't really prevent \fBbill\fR from running the commands listed in
3311 .\"O \&\fI\s-1SU\s0\fR or \fI\s-1SHELLS\s0\fR since he can simply copy those commands to a
3312 .\"O different name, or use a shell escape from an editor or other
3313 .\"O program.  Therefore, these kind of restrictions should be considered
3314 .\"O advisory at best (and reinforced by policy).
3315 .\"O .PP
3316 という行は、\fI\s-1SU\s0\fR や \fI\s-1SHELLS\s0\fR
3317 に列記されているコマンドの \fBbill\fR による実行を、
3318 本当に阻止することにはならない。なぜなら、
3319 \&\fBbill\fR としては、そうしたコマンドを単に名前を変えてコピーすればよいし、
3320 エディタやほかのプログラムからシェル・エスケープを利用することもできるからだ。
3321 だから、この種の制限はやった方がまし程度に考えておくべきである
3322 (そして、しっかりした運用方針によって制限の実効力を上げるべきだ)。
3323 .PP
3324 .\"O Furthermore, if the \fIfast_glob\fR option is in use, it is not possible
3325 .\"O to reliably negate commands where the path name includes globbing
3326 .\"O (aka wildcard) characters.  This is because the C library's
3327 .\"O \&\fIfnmatch\fR\|(3) function cannot resolve relative paths.  While this
3328 .\"O is typically only an inconvenience for rules that grant privileges,
3329 .\"O it can result in a security issue for rules that subtract or revoke
3330 .\"O privileges.
3331 .\"O .PP
3332 さらに言うと、\fIfast_glob\fR オプションが使われている場合、
3333 パス名に glob 文字 (ワイルドカードとも言う)
3334 が含まれるコマンドを間違いなく無効にすることは不可能である。
3335 その理由は、C ライブラリの
3336 \&\fIfnmatch\fR\|(3) 関数が相対パスを解決することができないからだ。
3337 このことは、権限を許可するルールにとっては、
3338 たいていの場合不便なだけにすぎないが、権限を減らしたり、
3339 取り消したりするルールにとっては、セキュリティ上の問題をもたらしかねない。
3340 .PP
3341 .\"O For example, given the following \fIsudoers\fR entry:
3342 .\"O .PP
3343 たとえば、\fIsudoers\fR に以下のエントリがあるとしよう。 
3344 .PP
3345 .Vb 2
3346 \& john   ALL = /usr/bin/passwd [a\-zA\-Z0\-9]*, /usr/bin/chsh [a\-zA\-Z0\-9]*,
3347 \&      /usr/bin/chfn [a\-zA\-Z0\-9]*, !/usr/bin/* root
3348 .Ve
3349 .PP
3350 .\"O User \fBjohn\fR can still run \f(CW\*(C`/usr/bin/passwd root\*(C'\fR if \fIfast_glob\fR is
3351 .\"O enabled by changing to \fI/usr/bin\fR and running \f(CW\*(C`./passwd root\*(C'\fR instead.
3352 \&\fIfast_glob\fR が有効になっていると、\fBjohn\fR はこれでも
3353 \&\f(CW\*(C`/usr/bin/passwd root\*(C'\fR を実行できてしまう。
3354 \&\fI/usr/bin\fR にカレント・ディレクトリを移動して、
3355 \&\f(CW\*(C`./passwd root\*(C'\fR と打ち込めばよいのだ。 
3356 .\"O .SH "PREVENTING SHELL ESCAPES"
3357 .SH "シェル・エスケープを防止する"
3358 .IX Header "PREVENTING SHELL ESCAPES"
3359 .\"O Once \fBsudo\fR executes a program, that program is free to do whatever
3360 .\"O it pleases, including run other programs.  This can be a security
3361 .\"O issue since it is not uncommon for a program to allow shell escapes,
3362 .\"O which lets a user bypass \fBsudo\fR's access control and logging.
3363 .\"O Common programs that permit shell escapes include shells (obviously),
3364 .\"O editors, paginators, mail and terminal programs.
3365 .\"O .PP
3366 \&\fBsudo\fR があるプログラムを実行した場合、そのプログラムは、
3367 ほかのプログラムの実行も含めて、何でも自由に好きなことができる。
3368 このことがセキュリティ上の問題になりかねないのは、
3369 プログラムがシェル・エスケープを許しているのは珍しいことではなく、
3370 そのために、ユーザが \fBsudo\fR
3371 のアクセス制御やロギングをすり抜けることが可能になるからだ。
3372 よく使うプログラムでシェル・エスケープを許しているものには、
3373 次のようなものがある。
3374 (当然ながら) シェル、エディタ、ページャ、メーラ、ターミナルなど。
3375 .PP
3376 .\"O There are two basic approaches to this problem:
3377 この問題に対処するには、基本的に二つの方法がある。
3378 .\"O .IP "restrict" 10
3379 .IP "制限" 10
3380 .IX Item "restrict"
3381 .\"O Avoid giving users access to commands that allow the user to run
3382 .\"O arbitrary commands.  Many editors have a restricted mode where shell
3383 .\"O escapes are disabled, though \fBsudoedit\fR is a better solution to
3384 .\"O running editors via \fBsudo\fR.  Due to the large number of programs that
3385 .\"O offer shell escapes, restricting users to the set of programs that
3386 .\"O do not is often unworkable.
3387 ユーザに任意のコマンドの実行を許すようなコマンドに対して、
3388 ユーザがアクセスできないようにする。エディタの場合は、制限モードと称して、
3389 シェル・エスケープが使えないモードを持っているものも多い。
3390 とは言え、\fBsudo\fR 経由でエディタを使うのなら、
3391 \&\fBsudoedit\fR を使用する方がより優れた対策である。
3392 シェル・エスケープを提供するプログラムはたくさんあるので、
3393 それを提供しないプログラムのみを使用するようにユーザを制限するのは、
3394 たいてい実現不可能である。
3395 .IP "noexec" 10
3396 .IX Item "noexec"
3397 .\"O Many systems that support shared libraries have the ability to
3398 .\"O override default library functions by pointing an environment
3399 .\"O variable (usually \f(CW\*(C`LD_PRELOAD\*(C'\fR) to an alternate shared library.
3400 .\"O On such systems, \fBsudo\fR's \fInoexec\fR functionality can be used to
3401 .\"O prevent a program run by \fBsudo\fR from executing any other programs.
3402 .\"O Note, however, that this applies only to native dynamically-linked
3403 .\"O executables.  Statically-linked executables and foreign executables
3404 .\"O running under binary emulation are not affected.
3405 .\"O .Sp
3406 共有ライブラリをサポートしている多くのシステムには、環境変数 (たいていは 
3407 \&\f(CW\*(C`LD_PRELOAD\*(C'\fR) で別の共有ライブラリを指定することによって、
3408 デフォルトのライブラリ関数を置き換える能力がある。
3409 そういったシステムでは、\fBsudo\fR の \fInoexec\fR 機能を使えば、
3410 \&\fBsudo\fR から実行されるプログラムが、
3411 何かほかのプログラムを実行するのを防ぐことができる。
3412 とは言え、これが当てはまるのは、
3413 動的にリンクされたネイティブなプログラムだけだということに気を付けてほしい。
3414 静的にリンクされたプログラムや、
3415 バイナリ・エミュレーションのもとで動くほかの OS のプログラムには効果がない。
3416 .Sp
3417 .\"O The \fInoexec\fR feature is known to work on SunOS, Solaris, *BSD,
3418 .\"O Linux, \s-1IRIX\s0, Tru64 \s-1UNIX\s0, MacOS X, HP-UX 11.x and \s-1AIX\s0 5.3 and above.
3419 .\"O It should be supported on most operating systems that support the
3420 .\"O \&\f(CW\*(C`LD_PRELOAD\*(C'\fR environment variable.  Check your operating system's
3421 .\"O manual pages for the dynamic linker (usually ld.so, ld.so.1, dyld,
3422 .\"O dld.sl, rld, or loader) to see if \f(CW\*(C`LD_PRELOAD\*(C'\fR is supported.
3423 .\"O .Sp
3424 \&\fInoexec\fR 機能は SunOS, Solaris, *BSD, Linux, \s-1IRIX\s0, 
3425 Tru64 \s-1UNIX\s0, MacOS X, HP-UX 11.x、それに 5.3 以上の \s-1AIX\s0
3426 で使えることがわかっている。環境変数 \f(CW\*(C`LD_PRELOAD\*(C'\fR
3427 をサポートしているたいていのオペレーティングシステムが、
3428 この機能に対応しているはずだ。
3429 使用しているオペレーティングシステムのマニュアルページを調べて、
3430 ダイナミック・リンカについて (通例 ld.so, ld.so.1, dyld, dld.sl, rld,
3431 loader といった名前になっている) \f(CW\*(C`LD_PRELOAD\*(C'\fR
3432 がサポートされているかどうか確認していただきたい。
3433 .Sp
3434 .\"O On Solaris 10 and higher, \fInoexec\fR uses Solaris privileges instead
3435 .\"O of the \f(CW\*(C`LD_PRELOAD\*(C'\fR environment variable.
3436 .\"O .Sp
3437 Solaris 10 以上の場合、\fInoexec\fR は 環境変数 \f(CW\*(C`LD_PRELOAD\*(C'\fR
3438 ではなく、Solaris 特権を使用している。
3439 .Sp
3440 .\"O To enable \fInoexec\fR for a command, use the \f(CW\*(C`NOEXEC\*(C'\fR tag as documented
3441 .\"O in the User Specification section above.  Here is that example again:
3442 .\"O .Sp
3443 あるコマンドに対して \fInoexec\fR を有効にするには、
3444 上記「ユーザ設定」セクションで述べたように、
3445 \&\f(CW\*(C`NOEXEC\*(C'\fR タグを使用する。そのときの例を再掲しよう。
3446 .Sp
3447 .Vb 1
3448 \& aaron  shanty = NOEXEC: /usr/bin/more, /usr/bin/vi
3449 .Ve
3450 .Sp
3451 .\"O This allows user \fBaaron\fR to run \fI/usr/bin/more\fR and \fI/usr/bin/vi\fR
3452 .\"O with \fInoexec\fR enabled.  This will prevent those two commands from
3453 .\"O executing other commands (such as a shell).  If you are unsure
3454 .\"O whether or not your system is capable of supporting \fInoexec\fR you
3455 .\"O can always just try it out and check whether shell escapes work
3456 .\"O when \fInoexec\fR is enabled.
3457 .\"O .PP
3458 この例では、ユーザ \fBaaron\fR 対して、\fInoexec\fR を有効にした上で、
3459 \&\fI/usr/bin/more\fR と \fI/usr/bin/vi\fR の実行を許可している。
3460 このようにすれば、この二つのコマンドから
3461 (シェルのような) ほかのコマンドを実行することができなくなるわけだ。
3462 使用しているシステムが \fInoexec\fR に対応する能力があるかどうか
3463 よくわからない場合でも、取りあえず試してみることなら、いつだってできる。
3464 \&\fInoexec\fR を有効にして、
3465 シェル・エスケープが可能かどうか確かめてみればよいのだ。
3466 .PP
3467 .\"O Note that restricting shell escapes is not a panacea.  Programs
3468 .\"O running as root are still capable of many potentially hazardous
3469 .\"O operations (such as changing or overwriting files) that could lead
3470 .\"O to unintended privilege escalation.  In the specific case of an
3471 .\"O editor, a safer approach is to give the user permission to run
3472 .\"O \&\fBsudoedit\fR.
3473 注意してほしいが、シェル・エスケープの禁止は万能薬ではない。
3474 ルートの権限で動いているプログラムには、ほかにも、危険性のあるさまざまな作業
3475 (ファイルの中身を変更するとか、上書きしてしまうとか) が可能であり、
3476 思いがけずに権限を拡大してしまうこともありえるのだ。特にエディタについて言うと、
3477 ユーザには \fBsudoedit\fR を実行する許可を与えるのが、より安全な方法である。
3478 .\"O .SH "DEBUG FLAGS"
3479 .SH "デバッグ・フラグ (sudo-1.8.4 の新機能)"
3480 .IX Header "DEBUG FLAGS"
3481 .\"O Versions 1.8.4 and higher of the \fIsudoers\fR plugin supports a
3482 .\"O debugging framework that can help track down what the plugin is
3483 .\"O doing internally if there is a problem.  This can be configured in
3484 .\"O the \fI/etc/sudo.conf\fR file as described in \fIsudo\fR\|(8).
3485 .\"O .PP
3486 バージョン 1.8.4 以上の \fIsudoers\fR プラグインは、
3487 デバッグのための枠組みに対応しており、問題が発生したときに、
3488 プラグインの内部で何が起きているかを突き止めるために、
3489 これを利用することができる。
3490 その設定は、\fIsudo\fR\|(8) のマニュアルでも説明したように、
3491 \&\fI/etc/sudo.conf\fR ファイルで行うことが可能だ。
3492 .PP
3493 .\"O The \fIsudoers\fR plugin uses the same debug flag format as \fBsudo\fR
3494 .\"O itself: \fIsubsystem\fR@\fIpriority\fR.
3495 .\"O .PP
3496 \&\fIsudoers\fR プラグインは、
3497 \&\fBsudo\fR そのものと同じデバッグ・フラグの書式を使用する。
3498 すなわち、\fIsubsystem\fR@\fIpriority\fR である。
3499 .PP
3500 .\"O The priorities used by \fIsudoers\fR, in order of decreasing severity,
3501 .\"O are: \fIcrit\fR, \fIerr\fR, \fIwarn\fR, \fInotice\fR, \fIdiag\fR, \fIinfo\fR, \fItrace\fR
3502 .\"O and \fIdebug\fR.  Each priority, when specified, also includes all
3503 .\"O priorities higher than it.  For example, a priority of \fInotice\fR
3504 .\"O would include debug messages logged at \fInotice\fR and higher.
3505 .\"O .PP
3506 \&\fIsudoers\fR が使用する priority (重大度) を深刻なものから挙げると、
3507 \fIcrit\fR, \fIerr\fR, \fIwarn\fR, \fInotice\fR, \fIdiag\fR, \fIinfo\fR,
3508 \&\fItrace\fR, \fIdebug\fR である。ある priority を指定すると、
3509 それより深刻なすべての priority も併せて指定したことになる。
3510 たとえば、\fInotice\fR という priority を指定すれば、
3511 \&\fInotice\fR レベル以上のデバッグメッセージがログに記録されるわけである。
3512 .PP
3513 .\"O The following subsystems are used by \fIsudoers\fR:
3514 \&\fIsudoers\fR では以下のサブシステムが使用できる。
3515 .IP "\fIalias\fR" 10
3516 .IX Item "alias"
3517 .\"O \&\f(CW\*(C`User_Alias\*(C'\fR, \f(CW\*(C`Runas_Alias\*(C'\fR, \f(CW\*(C`Host_Alias\*(C'\fR and \f(CW\*(C`Cmnd_Alias\*(C'\fR processing
3518 \&\f(CW\*(C`User_Alias\*(C'\fR, \f(CW\*(C`Runas_Alias\*(C'\fR,
3519 \&\f(CW\*(C`Host_Alias\*(C'\fR, \f(CW\*(C`Cmnd_Alias\*(C'\fR の処理
3520 .IP "\fIall\fR" 10
3521 .IX Item "all"
3522 .\"O matches every subsystem
3523 あらゆるサブシステムにマッチする
3524 .IP "\fIaudit\fR" 10
3525 .IX Item "audit"
3526 .\"O \&\s-1BSM\s0 and Linux audit code
3527 Solaris \s-1BSM\s0 (Basic Security Module) と Linux の監査コード
3528 .IP "\fIauth\fR" 10
3529 .IX Item "auth"
3530 .\"O user authentication
3531 ユーザの認証
3532 .IP "\fIdefaults\fR" 10
3533 .IX Item "defaults"
3534 .\"O \&\fIsudoers\fR \fIDefaults\fR settings
3535 \&\fIsudoers\fR の \fIDefaults\fR の設定
3536 .IP "\fIenv\fR" 10
3537 .IX Item "env"
3538 .\"O environment handling
3539 環境の取扱い
3540 .IP "\fIldap\fR" 10
3541 .IX Item "ldap"
3542 .\"O LDAP-based sudoers
3543 LDAP を使用する sudoers
3544 .IP "\fIlogging\fR" 10
3545 .IX Item "logging"
3546 .\"O logging support
3547 ロギングのサポート
3548 .IP "\fImatch\fR" 10
3549 .IX Item "match"
3550 .\"O matching of users, groups, hosts and netgroups in \fIsudoers\fR
3551 \&\fIsudoers\fR におけるユーザ、グループ、ホスト、
3552 ネットグループのマッチング
3553 .IP "\fInetif\fR" 10
3554 .IX Item "netif"
3555 .\"O network interface handling
3556 ネットワークインターフェースの取扱い
3557 .IP "\fInss\fR" 10
3558 .IX Item "nss"
3559 .\"O network service switch handling in \fIsudoers\fR
3560 \&\fIsudoers\fR におけるネームサービス・スイッチの取扱い
3561 .IP "\fIparser\fR" 10
3562 .IX Item "parser"
3563 .\"O \&\fIsudoers\fR file parsing
3564 \&\fIsudoers\fR ファイルの解析
3565 .IP "\fIperms\fR" 10
3566 .IX Item "perms"
3567 .\"O permission setting
3568 パーミッションの設定
3569 .IP "\fIplugin\fR" 10
3570 .IX Item "plugin"
3571 .\"O The equivalent of \fImain\fR for the plugin.
3572 プラグインにとって \fImain\fR に相当する
3573 .IP "\fIpty\fR" 10
3574 .IX Item "pty"
3575 .\"O pseudo-tty related code
3576 擬似 tty に関連したコード
3577 .IP "\fIrbtree\fR" 10
3578 .IX Item "rbtree"
3579 .\"O redblack tree internals
3580 赤黒木 (redblack tree) の内部情報
3581 .IP "\fIutil\fR" 10
3582 .IX Item "util"
3583 .\"O utility functions
3584 ユーティリティ関数群
3585 .\"O .SH "SECURITY NOTES"
3586 .SH "セキュリティに関する注意点"
3587 .IX Header "SECURITY NOTES"
3588 .\"O \&\fIsudoers\fR will check the ownership of its time stamp directory
3589 .\"O (\fI/var/lib/sudo\fR by default) and ignore the directory's contents if
3590 .\"O it is not owned by root or if it is writable by a user other than
3591 .\"O root.  On systems that allow non-root users to give away files via
3592 .\"O \&\fIchown\fR\|(2), if the time stamp directory is located in a world-writable
3593 .\"O directory (e.g., \fI/tmp\fR), it is possible for a user to create the
3594 .\"O time stamp directory before \fBsudo\fR is run.  However, because
3595 .\"O \&\fIsudoers\fR checks the ownership and mode of the directory and its
3596 .\"O contents, the only damage that can be done is to \*(L"hide\*(R" files by
3597 .\"O putting them in the time stamp dir.  This is unlikely to happen
3598 .\"O since once the time stamp dir is owned by root and inaccessible by
3599 .\"O any other user, the user placing files there would be unable to get
3600 .\"O them back out.
3601 .\"O .PP
3602 \&\fIsudoers\fR はタイムスタンプ・ディレクトリ (デフォルトでは
3603 \&\fI/var/lib/sudo\fR) の所有者を調べて、所有者が root でなかったり、
3604 root 以外のユーザにも書き込み可能だったりする場合には、
3605 そのディレクトリの内容を無視する。root 以外のユーザでも \fIchown\fR\|(2)
3606 を利用して、ファイルの所有者を変えられるシステムでは、
3607 タイムスタンプ・ディレクトリが (たとえば、\fI/tmp\fR といった)
3608 誰にでも書き込めるディレクトリにあると、一般ユーザが、\fBsudo\fR
3609 を実行する前にタイムスタンプ・ディレクトリを作成することが可能になる。もっとも、
3610 \&\fIsudoers\fR はタイムスタンプ・ディレクトリとその中身の、
3611 所有者とモードをチェックするので、起こりえる唯一の被害は、
3612 ファイルを「隠匿」する目的でそのディレクトリに入れておかれることぐらいだ。
3613 これはあまりありそうにないことである。
3614 なぜなら、タイムスタンプ・ディレクトリが root の所有になり、
3615 ほかのユーザによるアクセスが禁じられてしまうと、
3616 ファイルをそこに置いたユーザは、それを回収できなくなるからだ。
3617 .PP
3618 .\"O \&\fIsudoers\fR will not honor time stamps set far in the future.  Time
3619 .\"O stamps with a date greater than current_time + 2 * \f(CW\*(C`TIMEOUT\*(C'\fR will
3620 .\"O be ignored and sudo will log and complain.  This is done to keep a
3621 .\"O user from creating his/her own time stamp with a bogus date on
3622 .\"O systems that allow users to give away files if the time stamp directory
3623 .\"O is located in a world-writable directory.
3624 .\"O .PP
3625 \&\fIsudoers\fR はあまりにも未来に設定されたタイムスタンプを認めない。
3626 タイムスタンプが「現在時 + 2 * \f(CW\*(C`TIMEOUT\*(C'\fR」
3627 より新しい日時だった場合、そのタイムスタンプは無視され、
3628 \&\fBsudo\fR がログに記録して、警告を発する。このようになっているのは、
3629 一般ユーザがファイルの所有者を変えられるシステムで、
3630 タイムスタンプ・ディレクトリが誰にでも書き込めるディレクトリにある場合に、
3631 ユーザがいい加減な日付を付けて勝手に自分のタイムスタンプを作れないようにするためである。
3632 .PP
3633 .\"O On systems where the boot time is available, \fIsudoers\fR will ignore
3634 .\"O time stamps that date from before the machine booted.
3635 .\"O .PP
3636 ブートタイムを参照できるシステムでは、
3637 タイムスタンプがマシンがブートするよりも前の日時になっている場合、
3638 \&\fIsudoers\fR はそれを無視する。
3639 .PP
3640 .\"O Since time stamp files live in the file system, they can outlive a
3641 .\"O user's login session.  As a result, a user may be able to login,
3642 .\"O run a command with \fBsudo\fR after authenticating, logout, login
3643 .\"O again, and run \fBsudo\fR without authenticating so long as the time
3644 .\"O stamp file's modification time is within \f(CW\*(C`5\*(C'\fR minutes (or
3645 .\"O whatever the timeout is set to in \fIsudoers\fR).  When the \fItty_tickets\fR
3646 .\"O option is enabled, the time stamp has per-tty granularity but still
3647 .\"O may outlive the user's session.  On Linux systems where the devpts
3648 .\"O filesystem is used, Solaris systems with the devices filesystem,
3649 .\"O as well as other systems that utilize a devfs filesystem that
3650 .\"O monotonically increase the inode number of devices as they are
3651 .\"O created (such as Mac \s-1OS\s0 X), \fIsudoers\fR is able to determine when a
3652 .\"O tty-based time stamp file is stale and will ignore it.  Administrators
3653 .\"O should not rely on this feature as it is not universally available.
3654 .\"O .PP
3655 タイムスタンプ・ファイルはファイルシステム中に作られるので、
3656 ユーザのログイン・セッションが終わっても、残っている。
3657 そのため、次のようなことが起こりえる。ユーザがログインし、
3658 認証してから \fBsudo\fR を使ってコマンドを実行して、ログアウトする。
3659 再びログインして、認証なしで \fBsudo\fR を実行する。
3660 タイムスタンプ・ファイルの内容更新日時 (modification time) が
3661 \&\f(CW\*(C`5\*(C'\fR 分以内であれば
3662 (あるいは、\fIsudoers\fR で設定されたタイムアウト時間以内であれば)、
3663 そういうことが可能になってしまうのだ。
3664 \&\fItty_tickets\fR オプションが有効になっている場合、
3665 タイムスタンプは tty ごとに別々に作られるが、
3666 それでも、ユーザセッションが終わった後まで生き残ってしまう。devpts
3667 ファイルシステムを使用している Linux や、devices ファイルシステムを持つ Solaris、
3668 それに、デバイスを作成するごとに、その inode 番号をひたすら増やしていく
3669 devfs ファイルシステムを利用しているシステム (たとえば、Mac \s-1OS\s0 X)
3670 では、tty ごとのタイムスタンプ・ファイルがいつ用済みになるかを判定できるので、
3671 \&\fIsudoers\fR はそうしたタイムスタンプ・ファイルを無視することになる。
3672 だが、システムの管理者はこの機能を当てにしない方がよい。
3673 どのシステムでも利用できるとはかぎらないからだ。
3674 .PP
3675 .\"O If users have sudo \f(CW\*(C`ALL\*(C'\fR there is nothing to prevent them from
3676 .\"O creating their own program that gives them a root shell (or making
3677 .\"O their own copy of a shell) regardless of any '!' elements in the
3678 .\"O user specification.
3679 もし ユーザに許可するコマンドが \f(CW\*(C`ALL\*(C'\fR になっているならば、
3680 ユーザが自分でプログラムを作って
3681 (あるいは、シェルを自分専用に別の名前でコピーして)、
3682 ルート・シェルを獲得するのを防ぐことはできない。
3683 ユーザ設定でどんな項目に '!'  を付けようとも防止不可能である。
3684 .\"O .SH "SEE ALSO"
3685 .SH "関連項目"
3686 .IX Header "SEE ALSO"
3687 \&\fIrsh\fR\|(1), \fIsu\fR\|(1), \fIfnmatch\fR\|(3), \fIglob\fR\|(3), \fImktemp\fR\|(3), \fIstrftime\fR\|(3),
3688 \&\fIsudoers.ldap\fR\|(5), \fIsudo_plugin\fR\|(8), \fIsudo\fR\|(8), \fIvisudo\fR\|(8)
3689 .\"O .SH "CAVEATS"
3690 .SH "警告"
3691 .IX Header "CAVEATS"
3692 .\"O The \fIsudoers\fR file should \fBalways\fR be edited by the \fBvisudo\fR
3693 .\"O command which locks the file and does grammatical checking. It is
3694 .\"O imperative that \fIsudoers\fR be free of syntax errors since \fBsudo\fR
3695 .\"O will not run with a syntactically incorrect \fIsudoers\fR file.
3696 .\"O .PP
3697 \&\fIsudoers\fR ファイルの編集には、\fB必ず\fR \fBvisudo\fR
3698 コマンドを使うべきだ。
3699 そうすれば、\fBvisudo\fR がファイルをロックし、文法のチェックをやってくれる。
3700 \&\fIsudoers\fR ファイルに文法的な間違いがあると、\fBsudo\fR が動かないので、
3701 \&\fIsudoers\fR ファイルには文法エラーが絶対にあってはならないのだ。
3702 .PP
3703 .\"O When using netgroups of machines (as opposed to users), if you
3704 .\"O store fully qualified host name in the netgroup (as is usually the
3705 .\"O case), you either need to have the machine's host name be fully qualified
3706 .\"O as returned by the \f(CW\*(C`hostname\*(C'\fR command or use the \fIfqdn\fR option in
3707 .\"O \&\fIsudoers\fR.
3708 ネットグループを (ユーザについてではなく) マシンについて使用し、
3709 \&\fInetgroup\fR ファイルに完全修飾ホスト名を記載する場合は
3710 (たいていそうするものだが)、そのマシンのホスト名を
3711 \&\f(CW\*(C`hostname\*(C'\fR コマンドが出力する通りの完全修飾名で書くか、
3712 さもなければ、\fIsudoers\fR ファイルで
3713 \&\fIfqdn\fR オプションを使うかしなければならない。
3714 .\"O .SH "BUGS"
3715 .SH "バグ"
3716 .IX Header "BUGS"
3717 .\"O If you feel you have found a bug in \fBsudo\fR, please submit a bug report
3718 .\"O at http://www.sudo.ws/sudo/bugs/
3719 \&\fBsudo\fR にバグを発見したと思ったら、下記のページにアクセスして、
3720 バグレポートを提出していただきたい。
3721 .br
3722 http://www.sudo.ws/sudo/bugs/
3723 .\"O .SH "SUPPORT"
3724 .SH "サポート"
3725 .IX Header "SUPPORT"
3726 .\"O Limited free support is available via the sudo-users mailing list,
3727 .\"O see http://www.sudo.ws/mailman/listinfo/sudo\-users to subscribe or
3728 .\"O search the archives.
3729 ある程度の無料サポートが sudo-users メーリングリストを通して利用できる。
3730 購読やアーカイブの検索には下記 URL を御覧になること。
3731 .br
3732 http://www.sudo.ws/mailman/listinfo/sudo\-users
3733 .\"O .SH "DISCLAIMER"
3734 .SH "免責"
3735 .IX Header "DISCLAIMER"
3736 .\"O \&\fBsudo\fR is provided ``\s-1AS\s0 \s-1IS\s0'' and any express or implied warranties,
3737 .\"O including, but not limited to, the implied warranties of merchantability
3738 .\"O and fitness for a particular purpose are disclaimed.  See the \s-1LICENSE\s0
3739 .\"O file distributed with \fBsudo\fR or http://www.sudo.ws/sudo/license.html
3740 .\"O for complete details.
3741 \&\fBsudo\fR は「現状のまま」提供される。
3742 明示的な、あるいは黙示的ないかなる保証も、
3743 商品性や特定目的への適合性についての黙示的な保証を含め、
3744 またそれのみに止まらず、これを否認する。詳細な全文については、
3745 \&\fBsudo\fR と一緒に配布されている \s-1LICENSE\s0 ファイルや、
3746 下記 Web ページを御覧いただきたい。
3747 .br
3748 http://www.sudo.ws/sudo/license.html