[JM:00652] [POST:RO] sudo sudoers.ldap.5

Back to archive index

長南洋一 cyoic****@maple*****
2012年 5月 9日 (水) 21:31:11 JST


<STATUS>
stat: RO
ppkg: sudo
page: sudoers.ldap.5
date: 20012/5/09
mail: cyoic****@maple*****
name: Chonan Yoichi
</STATUS>

.\" Copyright (c) 2003-2011
.\" 	Todd C. Miller <Todd.****@court*****>
.\" 
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\" 
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\" 
.\" Japanese Version Copyright (c) 2009 Yoichi Chonan
.\"         all rights reserved.
.\" Translated (sudo-1.7.2p1) Sat Nov 14 21:15:16 JST 2009
.\"         by Yoichi Chonan <cyoic****@maple*****>
.\" Updated & Modified (sudo-1.8.4p4) Wed May  9 12:26:33 JST 2012
.\"         by Yoichi Chonan
.\"
.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` 
.    ds C' 
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.el \{\
.    de IX
..
.\}
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "SUDOERS.LDAP 5"
.TH SUDOERS.LDAP 5 "January  6, 2012" "1.8.4" "MAINTENANCE COMMANDS"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.\"O .SH "NAME"
.SH "名前"
.\"O sudoers.ldap \- sudo LDAP configuration
sudoers.ldap \- LDAP を使った sudo の設定
.\"O .SH "DESCRIPTION"
.SH "説明"
.IX Header "DESCRIPTION"
.\"O In addition to the standard \fIsudoers\fR file, \fBsudo\fR may be configured
.\"O via \s-1LDAP\s0.  This can be especially useful for synchronizing \fIsudoers\fR
.\"O in a large, distributed environment.
.\"O .PP
\&\fBsudo\fR は \fIsudoers\fR ファイルによって設定するのが標準だが、
\&\s-1LDAP\s0 を通して設定することも可能だ。この方法は、
大規模な分散環境で sudo の設定を同期させたい場合に、とりわけ便利かもしれない。
.PP
.\"O Using \s-1LDAP\s0 for \fIsudoers\fR has several benefits:
sudo の設定に \s-1LDAP\s0 を使用すると、有利な点がいくつかある。
.IP "\(bu" 4
.\"O \&\fBsudo\fR no longer needs to read \fIsudoers\fR in its entirety.  When
.\"O \&\s-1LDAP\s0 is used, there are only two or three \s-1LDAP\s0 queries per invocation.
.\"O This makes it especially fast and particularly usable in \s-1LDAP\s0
.\"O environments.
\&\fBsudo\fR はもはや sudo の設定をまるまる全部読み込む必要がない。
\&\s-1LDAP\s0 を使用する場合は、\fBsudo\fR の実行ごとに、たった二、三回
\&\s-1LDAP\s0 に問い合わせを行うだけですむ。
そのため、\s-1LDAP\s0 環境は実行速度が非常に早く、たいへん使い勝手がよい。
.IP "\(bu" 4
.\"O \&\fBsudo\fR no longer exits if there is a typo in \fIsudoers\fR.
.\"O It is not possible to load \s-1LDAP\s0 data into the server that does
.\"O not conform to the sudoers schema, so proper syntax is guaranteed.
.\"O It is still possible to have typos in a user or host name, but
.\"O this will not prevent \fBsudo\fR from running.
sudo の設定にタイプミスがあっても、もうそのために \fBsudo\fR
が終了してしまうことがない。\s-1LDAP\s0 のデータは、
sudo 用のスキーマに従っていなければ、サーバーにロードできない。
結果として、正しいシンタクスが保証されるわけだ。
ユーザ名やホスト名をタイプミスすることなら相変わらずあるだろうが、
そのために \fBsudo\fR が動かなくなることはない。
.IP "\(bu" 4
.\"O It is possible to specify per-entry options that override the global
.\"O default options.  \fI/etc/sudoers\fR only supports default options and
.\"O limited options associated with user/host/commands/aliases.  The
.\"O syntax is complicated and can be difficult for users to understand.
.\"O Placing the options directly in the entry is more natural.
エントリごとにオプションを指定して、
グローバルなデフォルト・オプションを上書きすることができる。
\&\fI/etc/sudoers\fR はグローバルなデフォルト・オプションと、ユーザ、ホスト、
コマンド、変身対象に結びついた限定されたオプションしかサポートしていない。
また、\fI/etc/sudoers\fR の書式は複雑で、ユーザには理解しにくいかもしれない。
オプションをエントリ内で直接指定する方が、ずっと自然である。
.IP "\(bu" 4
.\"O The \fBvisudo\fR program is no longer needed.  \fBvisudo\fR provides
.\"O locking and syntax checking of the \fI/etc/sudoers\fR file.
.\"O Since \s-1LDAP\s0 updates are atomic, locking is no longer necessary.
.\"O Because syntax is checked when the data is inserted into \s-1LDAP\s0, there
.\"O is no need for a specialized tool to check syntax.
.\"O .PP
\&\fBvisudo\fR プログラムはもう必要がない。\fBvisudo\fR の役割は
\&\fI/etc/sudoers\fR ファイルのロッキングとシンタクス・チェックである。
\&\s-1LDAP\s0 のデータ更新はアトミック操作なので、
(訳注: それ故、データは更新されていないか、
すでに更新されたかのどちらかであって、中間状態がないので)、
ロッキングはもはや必要がない。シンタクスは、
データが \s-1LDAP\s0 にインサートされるときチェックされるから、
シンタクス・チェック用の特別なツールも不要になっている。
.PP
.\"O Another major difference between \s-1LDAP\s0 and file-based \fIsudoers\fR
.\"O is that in \s-1LDAP\s0, \fBsudo\fR\-specific Aliases are not supported.
.\"O .PP
\&\s-1LDAP\s0 による設定と \fIsudoers\fR ファイルによる設定との、
もう一つの大きな違いは、\s-1LDAP\s0 では
\&\fBsudo\fR 専用のエイリアスがサポートされていないことである。
.PP
.\"O For the most part, there is really no need for \fBsudo\fR\-specific
.\"O Aliases.  Unix groups or user netgroups can be used in place of
.\"O User_Aliases and Runas_Aliases.  Host netgroups can be used in place
.\"O of Host_Aliases.  Since Unix groups and netgroups can also be stored
.\"O in \s-1LDAP\s0 there is no real need for \fBsudo\fR\-specific aliases.
.\"O .PP
たいていの場合、\fBsudo\fR 専用のエイリアスは実のところ必要がない。
User_Aliases や Runas_Aliases の代わりに、
Unix のグループやユーザのネットグループが使用できる。
また、Host_Aliases の代わりには、ホストのネットグループが使える。
\&\s-1LDAP\s0 には Unix のグループやネットグループも格納できるので、
\&\fBsudo\fR 専用のエイリアスがどうしても必要というわけではないのだ。
.PP
.\"O Cmnd_Aliases are not really required either since it is possible
.\"O to have multiple users listed in a \f(CW\*(C`sudoRole\*(C'\fR.  Instead of defining
.\"O a Cmnd_Alias that is referenced by multiple users, one can create
.\"O a \f(CW\*(C`sudoRole\*(C'\fR that contains the commands and assign multiple users
.\"O to it.
Cmnd_Aliases もまったく必要がない。一つの \f(CW\*(C`sudoRole\*(C'\fR
エントリに複数のユーザを登録できるからだ。複数のユーザが参照する
Cmnd_Alias を定義する代わりに、複数のコマンドを含む \f(CW\*(C`sudoRole\*(C'\fR
エントリを一つ作成して、そこに複数のユーザを割り当てればよい。
.IP "[\fB訳注\fR]:" 8
.IX Item "footnote1"
原文の著者は、sudo 設定の単位となる \f(CW\*(C`objectClass\*(C'\fR 属性が
\&\f(CW\*(C`sudoRole\*(C'\fR の LDAP エントリのうち、\fI/etc/sudoers\fR
の各ユーザ設定に相当するものを「a sudoRole」と呼んでいる。
「sudoRole エントリ」という訳語を当てた。
.\"O .SS "SUDOers \s-1LDAP\s0 container"
.SS "\s-1LDAP\s0 の SUDOers コンテナ"
.IX Subsection "SUDOers LDAP container"
.\"O The \fIsudoers\fR configuration is contained in the \f(CW\*(C`ou=SUDOers\*(C'\fR \s-1LDAP\s0
.\"O container.
.\"O .PP
\&\s-1LDAP\s0 では、sudo の設定は
\&\f(CW\*(C`ou=SUDOers\*(C'\fR コンテナの下に配置されている。
.IP "[\fB訳注\fR]:" 8
.IX Item "footnote2"
コンテナとは、データを格納するためにではなく、
下位のエントリをまとめておくために存在する上位エントリを言う。たとえば、
OpenLDAP 用の \f(CW\*(C`ou=SUDOers\*(C'\fR コンテナなら、こんなふうになる
(sudo 同梱の README.LDAP から引用)。
.PP
.Vb 4
\&          dn: ou=SUDOers,dc=example,dc=com
\&          objectClass: top
\&          objectClass: organizationalUnit
\&          ou: SUDOers
.Ve
.PP
.\"O Sudo first looks for the \f(CW\*(C`cn=default\*(C'\fR entry in the SUDOers container.
.\"O If found, the multi-valued \f(CW\*(C`sudoOption\*(C'\fR attribute is parsed in the
.\"O same manner as a global \f(CW\*(C`Defaults\*(C'\fR line in \fI/etc/sudoers\fR.  In
.\"O the following example, the \f(CW\*(C`SSH_AUTH_SOCK\*(C'\fR variable will be preserved
.\"O in the environment for all users.
.\"O .PP
sudo はまず最初に SUDOers コンテナ配下に
\&\f(CW\*(C`cn=defaults\*(C'\fR のエントリを捜す。
見つかった場合は、複数回指定可能な
\&\f(CW\*(C`sudoOption\*(C'\fR 属性が、\fI/etc/sudoers\fR のグローバルな
\&\f(CW\*(C`Defaults\*(C'\fR 行と同じやり方で解析される。
以下の例では、環境変数 \f(CW\*(C`SSH_AUTH_SOCK\*(C'\fR
がすべてのユーザの環境に保存されることになる。
.PP
.Vb 6
\&    dn: cn=defaults,ou=SUDOers,dc=example,dc=com
\&    objectClass: top
\&    objectClass: sudoRole
\&    cn: defaults
\&    description: Default sudoOption\*(Aqs go here
\&    sudoOption: env_keep+=SSH_AUTH_SOCK
.Ve
.PP
.\"O The equivalent of a sudoer in \s-1LDAP\s0 is a \f(CW\*(C`sudoRole\*(C'\fR.  It consists of
.\"O the following attributes:
\&\s-1LDAP\s0 において \fI/etc/sudoers\fR の個々の「ユーザ設定」に相当するのは、
\&\f(CW\*(C`sudoRole\*(C'\fR エントリである。それは以下の属性からなっている。
.IP "\fBsudoUser\fR" 4
.IX Item "sudoUser"
.\"O A user name, user \s-1ID\s0 (prefixed with \f(CW\*(Aq#\*(Aq\fR), Unix group (prefixed with
.\"O \&\f(CW\*(Aq%\*(Aq\fR), Unix group \s-1ID\s0 (prefixed with \f(CW\*(Aq%#\*(Aq\fR), or user netgroup
.\"O (prefixed with \f(CW\*(Aq+\*(Aq\fR).
次のうちのいづれか。ユーザ名、
ユーザ \s-1ID\s0 (接頭辞 \f(CW\*(Aq#\*(Aq\fR が付く)、
Unix グループ名 (接頭辞 \f(CW\*(Aq%\*(Aq\fR が付く)、
Unix グループ \s-1ID\s0
(接頭辞 \f(CW\*(Aq%#\*(Aq\fR が付く。これが使えるのは、sudo-1.8.4 から)、
ユーザのネットグループ名 (接頭辞 \f(CW\*(Aq+\*(Aq\fR が付く)。
.IP "\fBsudoHost\fR" 4
.IX Item "sudoHost"
.\"O A host name, \s-1IP\s0 address, \s-1IP\s0 network, or host netgroup (prefixed
.\"O with a \f(CW\*(Aq+\*(Aq\fR).
.\"O The special value \f(CW\*(C`ALL\*(C'\fR will match any host.
次のうちのいづれか。ホスト名、\s-1IP\s0 アドレス、ネットワークアドレス、
ホストのネットグループ名 (接頭辞 \f(CW\*(Aq+\*(Aq\fR が付く)。
\&\f(CW\*(C`ALL\*(C'\fR という特別な値はいかなるホストにもマッチする。
.IP "\fBsudoCommand\fR" 4
.IX Item "sudoCommand"
.\"O A Unix command with optional command line arguments, potentially
.\"O including globbing characters (aka wild cards).
.\"O The special value \f(CW\*(C`ALL\*(C'\fR will match any command.
.\"O If a command is prefixed with an exclamation point \f(CW\*(Aq!\*(Aq\fR, the
.\"O user will be prohibited from running that command.
Unix のコマンド。コマンドライン引数を付けてもよく、glob 文字
(ワイルドカードとも言う) を含んでいてもよい。\f(CW\*(C`ALL\*(C'\fR
という特別な値は、いかなるコマンドにもマッチする。
コマンドに感嘆符 \f(CW\*(Aq!\*(Aq\fR を接頭辞として付けると、
ユーザにそのコマンドの実行を禁じることになる。
.IP "\fBsudoOption\fR" 4
.IX Item "sudoOption"
.\"O Identical in function to the global options described above, but
.\"O specific to the \f(CW\*(C`sudoRole\*(C'\fR in which it resides.
働きは、前述のグローバルオプションと同じだが、それが属している
\&\f(CW\*(C`sudoRole\*(C'\fR エントリに対してのみ効果がある。
.IP "\fBsudoRunAsUser\fR" 4
.IX Item "sudoRunAsUser"
.\"O A user name or uid (prefixed with \f(CW\*(Aq#\*(Aq\fR) that commands may be run
.\"O as or a Unix group (prefixed with a \f(CW\*(Aq%\*(Aq\fR) or user netgroup (prefixed
.\"O with a \f(CW\*(Aq+\*(Aq\fR) that contains a list of users that commands may be
.\"O run as.
.\"O The special value \f(CW\*(C`ALL\*(C'\fR will match any user.
変身対象となるユーザ名か uid (接頭辞 \f(CW\*(Aq#\*(Aq\fR が付く) を指定する。
変身対象ユーザをリストに含む Unix グループ名 (接頭辞 \f(CW\*(Aq%\*(Aq\fR が付く) や、
ユーザのネットグループ名 (接頭辞 \f(CW\*(Aq+\*(Aq\fR が付く) も使える。
特別な値 \f(CW\*(C`ALL\*(C'\fR は、いかなるユーザにもマッチする。
.\"O .Sp
.\"O The \f(CW\*(C`sudoRunAsUser\*(C'\fR attribute is only available in \fBsudo\fR versions
.\"O 1.7.0 and higher.  Older versions of \fBsudo\fR use the \f(CW\*(C`sudoRunAs\*(C'\fR
.\"O attribute instead.
.Sp
属性 \f(CW\*(C`sudoRunAsUser\*(C'\fR は、
バージョン 1.7.0 以上の \fBsudo\fR でなければ、利用できない。
それ以前のバージョンの \fBsudo\fR では、
代わりに属性 \f(CW\*(C`sudoRunAs\*(C'\fR を使用している。
.IP "\fBsudoRunAsGroup\fR" 4
.IX Item "sudoRunAsGroup"
.\"O A Unix group or gid (prefixed with \f(CW\*(Aq#\*(Aq\fR) that commands may be run as.
.\"O The special value \f(CW\*(C`ALL\*(C'\fR will match any group.
変身対象となる Unix グループ名か gid (接頭辞 \f(CW\*(Aq#\*(Aq\fR が付く)。
特別な値 \f(CW\*(C`ALL\*(C'\fR はいかなるグループにもマッチする。
.\"O .Sp
.\"O The \f(CW\*(C`sudoRunAsGroup\*(C'\fR attribute is only available in \fBsudo\fR versions
.\"O 1.7.0 and higher.
.Sp
属性 \f(CW\*(C`sudoRunAsGroup\*(C'\fR は、
バージョン 1.7.0 以上の \fBsudo\fR でなければ、利用できない。
.IP "\fBsudoNotBefore\fR" 4
.IX Item "sudoNotBefore"
.\"O A timestamp in the form \f(CW\*(C`yyyymmddHHMMSSZ\*(C'\fR that can be used to provide
.\"O a start date/time for when the \f(CW\*(C`sudoRole\*(C'\fR will be valid.  If
.\"O multiple \f(CW\*(C`sudoNotBefore\*(C'\fR entries are present, the earliest is used.
.\"O Note that timestamps must be in Coordinated Universal Time (\s-1UTC\s0),
.\"O not the local timezone.  The minute and seconds portions are optional,
.\"O but some \s-1LDAP\s0 servers require that they be present (contrary to the \s-1RFC\s0).
\&\f(CW\*(C`yyyymmddHHMMSSZ\*(C'\fR 形式のタイムスタンプ。
この属性を含む \f(CW\*(C`sudoRole\*(C'\fR エントリがいつから有効になるかという、
スタート日時を指定するのに使用する。
複数の \f(CW\*(C`sudoNotBefore\*(C'\fR が存在する場合は、
一番早い日時が採用される。
タイムスタンプは協定世界時 (\s-1UTC\s0) によるものでなければならず、
ローカル・タイムゾーンによるものではないことに注意してほしい。
分や秒の部分は省略できるが、\s-1LDAP\s0 サーバによっては
(\s-1RFC\s0 の規定とは逆に) 分や秒の指定を必須にしていることもある。
.\"O .Sp
.\"O The \f(CW\*(C`sudoNotBefore\*(C'\fR attribute is only available in \fBsudo\fR versions
.\"O 1.7.5 and higher and must be explicitly enabled via the \fB\s-1SUDOERS_TIMED\s0\fR
.\"O option in \fI/etc/ldap.conf\fR.
.Sp
属性 \f(CW\*(C`sudoNotBefore\*(C'\fR は、
バージョン 1.7.5 以上の \fBsudo\fR でなければ、利用できない。
また、\fI/etc/ldap.conf\fR の \fB\s-1SUDOERS_TIMED\s0\fR
オプションで明示的に有効にする必要がある。
.IP "\fBsudoNotAfter\fR" 4
.IX Item "sudoNotAfter"
.\"O A timestamp in the form \f(CW\*(C`yyyymmddHHMMSSZ\*(C'\fR that indicates an expiration
.\"O date/time, after which the \f(CW\*(C`sudoRole\*(C'\fR will no longer be valid.  If
.\"O multiple \f(CW\*(C`sudoNotBefore\*(C'\fR entries are present, the last one is used.
.\"O Note that timestamps must be in Coordinated Universal Time (\s-1UTC\s0),
.\"O not the local timezone.  The minute and seconds portions are optional,
.\"O but some \s-1LDAP\s0 servers require that they be present (contrary to the \s-1RFC\s0).
\&\f(CW\*(C`yyyymmddHHMMSSZ\*(C'\fR 形式のタイムスタンプ。
この属性を含む \f(CW\*(C`sudoRole\*(C'\fR エントリがもはや有効ではなくなる、
失効日時を示している。
複数の \f(CW\*(C`sudoNotAfter\*(C'\fR が存在する場合は、
一番最後の日時が採用される。
タイムスタンプは協定世界時 (\s-1UTC\s0) によるものでなければならず、
ローカル・タイムゾーンによるものではないことに注意してほしい。
分や秒の部分は省略できるが、\s-1LDAP\s0 サーバによっては
(\s-1RFC\s0 の規定とは逆に) 分や秒の指定を必須にしていることもある。
.\"O .Sp
.\"O The \f(CW\*(C`sudoNotAfter\*(C'\fR attribute is only available in \fBsudo\fR versions
.\"O 1.7.5 and higher and must be explicitly enabled via the \fB\s-1SUDOERS_TIMED\s0\fR
.\"O option in \fI/etc/ldap.conf\fR.
.Sp
属性  \f(CW\*(C`sudoNotAfter\*(C'\fR は、
バージョン 1.7.5 以上の \fBsudo\fR でなければ、利用できない。
また、\fI/etc/ldap.conf\fR の \fB\s-1SUDOERS_TIMED\s0\fR
オプションで明示的に有効にする必要がある。
.IP "\fBsudoOrder\fR" 4
.IX Item "sudoOrder"
.\"O The \f(CW\*(C`sudoRole\*(C'\fR entries retrieved from the \s-1LDAP\s0 directory have no
.\"O inherent order.  The \f(CW\*(C`sudoOrder\*(C'\fR attribute is an integer (or
.\"O floating point value for \s-1LDAP\s0 servers that support it) that is used
.\"O to sort the matching entries.  This allows LDAP-based sudoers entries
.\"O to more closely mimic the behaviour of the sudoers file, where the
.\"O of the entries influences the result.  If multiple entries match,
.\"O the entry with the highest \f(CW\*(C`sudoOrder\*(C'\fR attribute is chosen.  This
.\"O corresponds to the \*(L"last match\*(R" behavior of the sudoers file.  If
.\"O the \f(CW\*(C`sudoOrder\*(C'\fR attribute is not present, a value of 0 is assumed.
\&\s-1LDAP\s0 から取り出される \f(CW\*(C`sudoRole\*(C'\fR エントリには、
固有の順番というものがない。
そこで、整数の値を取る \f(CW\*(C`sudoOrder\*(C'\fR 属性を使用して
(浮動小数点値をサポートする \s-1LDAP\s0 サーバでは、浮動小数点値が使える)、
マッチするエントリの順番付けを行う。
そうすることによって、LDAP による sudo 設定のエントリが、
sudoers ファイルの動作をより忠実に真似られるようになるのだ。
sudoers ファイルではエントリの順番が結果に影響を及ぼす。
\&\f(CW\*(C`sudoOrder\*(C'\fR 属性を使用すると、
複数のエントリがマッチする場合は、一番大きな \f(CW\*(C`sudoOrder\*(C'\fR
属性を持つエントリが選ばれることになる。この動作は、
sudoers ファイルの「最後にマッチしたものが選ばれる」動作に相当するわけだ。
\&\f(CW\*(C`sudoOrder\*(C'\fR 属性が指定されていない場合は、
値が 0 であると見なされる。
.\"O .Sp
.\"O The \f(CW\*(C`sudoOrder\*(C'\fR attribute is only available in \fBsudo\fR versions
.\"O 1.7.5 and higher.
.\"O .PP
.Sp
属性 \f(CW\*(C`sudoOrder\*(C'\fR は、
バージョン 1.7.5 以上の \fBsudo\fR でなければ、利用できない。
.PP
.\"O Each attribute listed above should contain a single value, but there
.\"O may be multiple instances of each attribute type.  A \f(CW\*(C`sudoRole\*(C'\fR must
.\"O contain at least one \f(CW\*(C`sudoUser\*(C'\fR, \f(CW\*(C`sudoHost\*(C'\fR and \f(CW\*(C`sudoCommand\*(C'\fR.
.\"O .PP
上記の各属性は単一の値を持つべきだが、同じタイプの属性が複数回現れても構わない。
\&\f(CW\*(C`sudoRole\*(C'\fR エントリは、\f(CW\*(C`sudoUser\*(C'\fR、 
\&\f(CW\*(C`sudoHost\*(C'\fR、\f(CW\*(C`sudoCommand\*(C'\fR を、
少なくともそれぞれ一個は含んでいなければならない。
.PP
.\"O The following example allows users in group wheel to run any command
.\"O on any host via \fBsudo\fR:
.\"O .PP
次の例では、wheel グループのユーザに
\&\fBsudo\fR 経由でいかなるホストでも任意のコマンドの実行を許可している。
.PP
.Vb 7
\&    dn: cn=%wheel,ou=SUDOers,dc=example,dc=com
\&    objectClass: top
\&    objectClass: sudoRole
\&    cn: %wheel
\&    sudoUser: %wheel
\&    sudoHost: ALL
\&    sudoCommand: ALL
.Ve
.\"O .SS "Anatomy of \s-1LDAP\s0 sudoers lookup"
.SS "\s-1LDAP\s0 を使って sudo の設定を検索するときの詳細"
.IX Subsection "Anatomy of LDAP sudoers lookup"
.\"O When looking up a sudoer using \s-1LDAP\s0 there are only two or three
.\"O \&\s-1LDAP\s0 queries per invocation.  The first query is to parse the global
.\"O options.  The second is to match against the user's name and the
.\"O groups that the user belongs to.  (The special \s-1ALL\s0 tag is matched
.\"O in this query too.)  If no match is returned for the user's name
.\"O and groups, a third query returns all entries containing user
.\"O netgroups and checks to see if the user belongs to any of them.
.\"O .PP
\&\s-1LDAP\s0 を使ってユーザの sudo 設定を検索するとき、LDAP の問い合わせは
\&\fBsudo\fR の実行ごとにたった二回か三回行われるだけである。一回目の問い合わせは、
グローバル・オプションを解析するために行われる。二回目の問い合わせは、
\&\fBsudo\fR を実行するユーザのユーザ名や、
所属グループに対応するエントリを見つけるためだ
(特別なタグ \s-1ALL\s0 が何にでもマッチするのは、この場合も同様である)。
ユーザ名やグループに対応するエントリが得られなかった場合は、
三回目の問い合わせが行われ、
ユーザのネットグループを含んでいるすべてのエントリーを取得して、
問題のユーザがそのどれかに属していないかチェックする。
.PP
.\"O If timed entries are enabled with the \fB\s-1SUDOERS_TIMED\s0\fR configuration
.\"O directive, the \s-1LDAP\s0 queries include a subfilter that limits retrieval
.\"O to entries that satisfy the time constraints, if any.
\&\fI/etc/ldap.conf\fR の設定オプション
\&\fB\s-1SUDOERS_TIMED\s0\fR を有功にして、
日時制限があるエントリを使えるようにしている場合は、
\&\s-1LDAP\s0 の問い合わせにサブフィルターによる選別が伴うことになる。
そのサブフィルターが、日時制限が存在するエントリについては、
その制限を満たしているエントリのみに、情報の取り出しを限定するのである。
.\"O .SS "Differences between \s-1LDAP\s0 and non-LDAP sudoers"
.SS "\s-1LDAP\s0 を使う場合と使わない場合の sudo 設定の相違点"
.IX Subsection "Differences between LDAP and non-LDAP sudoers"
.\"O There are some subtle differences in the way sudoers is handled
.\"O once in \s-1LDAP\s0.  Probably the biggest is that according to the \s-1RFC\s0,
.\"O \&\s-1LDAP\s0 ordering is arbitrary and you cannot expect that Attributes
.\"O and Entries are returned in any specific order.
.\"O .PP
LDAP を使用する場合、sudo の設定の処理方法に \fI/etc/sudoers\fR
の場合とは微妙な違いがいくつかある。
たぶん最大の違いは、\s-1RFC\s0 に書いてあるとおり、
\&\s-1LDAP\s0 の順序づけは不定なので、
属性やエントリが何らかの決まった順序で返されることを期待できないことだろう。
.PP
.\"O The order in which different entries are applied can be controlled
.\"O using the \f(CW\*(C`sudoOrder\*(C'\fR attribute, but there is no way to guarantee
.\"O the order of attributes within a specific entry.  If there are
.\"O conflicting command rules in an entry, the negative takes precedence.
.\"O This is called paranoid behavior (not necessarily the most specific
.\"O match).
.\"O .PP
それでも、個々のエントリに割り振る順番については、\f(CW\*(C`sudoOrder\*(C'\fR
によって決めることができる。
だが、ある特定のエントリ内での属性の順番を決める、確実な方法は存在しないのだ。
もっとも、あるエントリーにコマンドに関して相反するルールがある場合は、
否定する方が優先される。いわゆるパラノイア的動作である
(それが一番明示的なマッチだとはかぎらないが)。
.PP
.\"O Here is an example:
.\"O .PP
例を挙げてみよう。
.PP
.Vb 5
.\"O \&    # /etc/sudoers:
.\"O \&    # Allow all commands except shell
\&    # /etc/sudoers の場合:
\&    # shell 以外のすべてのコマンドを許可する
\&    johnny  ALL=(root) ALL,!/bin/sh
.\"O \&    # Always allows all commands because ALL is matched last
\&    # 次の設定は、ALL が最後にマッチするので、常にすべてのコマンドを
\&    # 許可することになる
\&    puddles ALL=(root) !/bin/sh,ALL
\&
.\"O \&    # LDAP equivalent of johnny
.\"O \&    # Allows all commands except shell
\&    # 上記の johnny に相当する LDAP のエントリ:
\&    # shell 以外のすべてのコマンドを許可する
\&    dn: cn=role1,ou=Sudoers,dc=my\-domain,dc=com
\&    objectClass: sudoRole
\&    objectClass: top
\&    cn: role1
\&    sudoUser: johnny
\&    sudoHost: ALL
\&    sudoCommand: ALL
\&    sudoCommand: !/bin/sh
\&
.\"O \&    # LDAP equivalent of puddles
.\"O \&    # Notice that even though ALL comes last, it still behaves like
.\"O \&    # role1 since the LDAP code assumes the more paranoid configuration
\&    # 上記の puddles に相当する LDAP のエントリ:
\&    # ALL が最後に指定されているが、LDAP のコードはよりパラノイア的な
\&    # 設定になっているため、これもまた role1 と同じように動作する
\&    # ことに注意してほしい
\&    dn: cn=role2,ou=Sudoers,dc=my\-domain,dc=com
\&    objectClass: sudoRole
\&    objectClass: top
\&    cn: role2
\&    sudoUser: puddles
\&    sudoHost: ALL
\&    sudoCommand: !/bin/sh
\&    sudoCommand: ALL
.Ve
.PP
.\"O Another difference is that negations on the Host, User or Runas are
.\"O currently ignored.  For example, the following attributes do not
.\"O behave the way one might expect.
.\"O .PP
もう一つの相違は、Host、User、Runas についての否定は、
現在のところ無視されるということだ。
たとえば、以下に挙げるような属性は期待どおりに動作しない。
.PP
.Vb 3
.\"O \&    # does not match all but joe
.\"O \&    # rather, does not match anyone
\&    # joe 以外の全員とマッチしないどころか、
\&    # 誰にもマッチしない
\&    sudoUser: !joe
\&
.\"O \&    # does not match all but joe
.\"O \&    # rather, matches everyone including Joe
\&    # joe 以外の全員とマッチしないどころか、
\&    # joe を含む全員にマッチしてしまう
\&    sudoUser: ALL
\&    sudoUser: !joe
\&
.\"O \&    # does not match all but web01
.\"O \&    # rather, matches all hosts including web01
\&    # web01 以外のすべてとマッチしないどころか、
\&    # web01 を含むすべてのホストにマッチしてしまう
\&    sudoHost: ALL
\&    sudoHost: !web01
.Ve
.\"O .SS "Sudoers Schema"
.SS "sudo 用のスキーマ"
.IX Subsection "Sudoers Schema"
.\"O In order to use \fBsudo\fR's \s-1LDAP\s0 support, the \fBsudo\fR schema must be
.\"O installed on your \s-1LDAP\s0 server.  In addition, be sure to index the
.\"O \&'sudoUser' attribute.
.\"O .PP
\&\fBsudo\fR の \s-1LDAP\s0 サポートを利用するためには、
お使いの \s-1LDAP\s0 サーバに 
\&\fBsudo\fR 用のスキーマをインストールしなければならない。
さらに、'sudoUser' 属性の索引も必ず作成する。
.PP
.\"O Three versions of the schema: one for OpenLDAP servers (\fIschema.OpenLDAP\fR),
.\"O one for Netscape-derived servers (\fIschema.iPlanet\fR), and one for
.\"O Microsoft Active Directory (\fIschema.ActiveDirectory\fR) may
.\"O be found in the \fBsudo\fR distribution.
.\"O .PP
たぶん、\fBsudo\fR の配布物中に三種類のスキーマが入っていると思う。
すなわち OpenLDAP サーバ用 (\fIschema.OpenLDAP\fR)、
Netscape ディレクトリサーバの流れを汲むサーバ用 (\fIschema.iPlanet\fR)、
Microsoft Active Directory 用 (\fIschema.ActiveDirectory\fR)
のスキーマである。
.PP
.\"O The schema for \fBsudo\fR in OpenLDAP form is included in the \s-1EXAMPLES\s0
.\"O section.
OpenLDAP 用の形式にした \fBsudo\fR のスキーマは、
「用例」セクションにも記載しておいた。
.\"O .SS "Configuring ldap.conf"
.SS "ldap.conf の設定"
.IX Subsection "Configuring ldap.conf"
.\"O Sudo reads the \fI/etc/ldap.conf\fR file for LDAP-specific configuration.
.\"O Typically, this file is shared amongst different LDAP-aware clients.
.\"O As such, most of the settings are not \fBsudo\fR\-specific.  Note that
.\"O \&\fBsudo\fR parses \fI/etc/ldap.conf\fR itself and may support options
.\"O that differ from those described in the \fIldap.conf\fR\|(5) manual.
.\"O .PP
sudo は LDAP に関する設定を知るために \fI/etc/ldap.conf\fR を読み込む。
通例、このファイルは、
LDAP に対応しているさまざまなクライアントの間で共有されている。
それ故、設定の大部分は \fBsudo\fR 専用ではない。
注意すべきは、\fBsudo\fR は \fI/etc/ldap.conf\fR を独自に解析しており、
\&\fIldap.conf\fR\|(5) のマニュアルで説明されているものとは
異なるオプションをサポートしていることがあるということだ。
.PP
.\"O Also note that on systems using the OpenLDAP libraries, default
.\"O values specified in \fI/etc/openldap/ldap.conf\fR or the user's
.\"O \&\fI.ldaprc\fR files are not used.
.\"O .PP
もうひとつ注意してほしいのは、OpenLDAP ライブラリを使っているシステムで、
\&\fI/etc/openldap/ldap.conf\fR やユーザの \fI.ldaprc\fR 
ファイルで指定しているデフォルト値が使用されないことである。
.PP
.\"O Only those options explicitly listed in \fI/etc/ldap.conf\fR as being
.\"O supported by \fBsudo\fR are honored.  Configuration options are listed
.\"O below in upper case but are parsed in a case-independent manner.
すなわち、\fI/etc/ldap.conf\fR に明示的に記載され、かつ \fBsudo\fR
でサポートされているオプションのみが使用される。
設定オプションを以下に大文字で列挙するが、
解析されるときは大文字小文字は区別されない。
.IP "\fB\s-1URI\s0\fR ldap[s]://[hostname[:port]] ..." 4
.IX Item "URI ldap[s]://[hostname[:port]] ..."
.\"O Specifies a whitespace-delimited list of one or more URIs describing
.\"O the \s-1LDAP\s0 server(s) to connect to.  The \fIprotocol\fR may be either
.\"O \&\fBldap\fR or \fBldaps\fR, the latter being for servers that support \s-1TLS\s0
.\"O (\s-1SSL\s0) encryption.  If no \fIport\fR is specified, the default is port
.\"O 389 for \f(CW\*(C`ldap://\*(C'\fR or port 636 for \f(CW\*(C`ldaps://\*(C'\fR.  If no \fIhostname\fR
.\"O is specified, \fBsudo\fR will connect to \fBlocalhost\fR.  Multiple \fB\s-1URI\s0\fR
.\"O lines are treated identically to a \fB\s-1URI\s0\fR line containing multiple
.\"O entries.  Only systems using the OpenSSL libraries support the
.\"O mixing of \f(CW\*(C`ldap://\*(C'\fR and \f(CW\*(C`ldaps://\*(C'\fR URIs.  The Netscape-derived
.\"O libraries used on most commercial versions of Unix are only capable
.\"O of supporting one or the other.
接続する一個以上の \s-1LDAP\s0 サーバ の URI を、空白 (whitespace)
で区切ったリストの形で指定する。プロトコルは \fBldap\fR と \fBldaps\fR
のどちらでもよい。
後者は \s-1TLS\s0 (\s-1SSL\s0) 暗号化に対応しているサーバの場合である。
ポートを指定しないときのデフォルトは、
\&\f(CW\*(C`ldap://\*(C'\fR では 389 番ポート、
\&\f(CW\*(C`ldaps://\*(C'\fR では 636 番ポートである。
\&\fIhostname\fR を一つも指定しないと、
\&\fBsudo\fR は \fBlocalhost\fR に接続することになる。
\&\fB\s-1URI\s0\fR の行が二行以上ある場合は、
\&\fB\s-1URI\s0\fR の行に複数のエントリがあるときと同様に処理される。
OpenSSL ライブラリを使用しているシステムのみが、\f(CW\*(C`ldap://\*(C'\fR
と \f(CW\*(C`ldaps://\*(C'\fR 両方の URI を混ぜて使うことに対応している。
たいていの商用 Unix では Netscape 由来のライブラリが使用されているが、
そうしたライブラリはどちらか一方に対応することしかできない。
.IP "\fB\s-1HOST\s0\fR name[:port] ..." 4
.IX Item "HOST name[:port] ..."
.\"O If no \fB\s-1URI\s0\fR is specified, the \fB\s-1HOST\s0\fR parameter specifies a
.\"O whitespace-delimited list of \s-1LDAP\s0 servers to connect to.  Each host
.\"O may include an optional \fIport\fR separated by a colon (':').  The
.\"O \&\fB\s-1HOST\s0\fR parameter is deprecated in favor of the \fB\s-1URI\s0\fR specification
.\"O and is included for backwards compatibility.
\&\fBURI\fR パラメータが指定されていない場合は、
\&\fB\s-1HOST\s0\fR パラメータで指定する空白 (whitespace)
で区切ったリストが、接続する \s-1LDAP\s0 サーバである。
各ホストにはコロン (':') に続けて、ポート番号を書いてもよい。
\fB\s-1HOST\s0\fR パラメータは非推奨であり、\fB\s-1URI\s0\fR
で指定する方が望ましい。このパラメータがあるのは、後方互換のためである。
.IP "\fB\s-1PORT\s0\fR port_number" 4
.IX Item "PORT port_number"
.\"O If no \fB\s-1URI\s0\fR is specified, the \fB\s-1PORT\s0\fR parameter specifies the
.\"O default port to connect to on the \s-1LDAP\s0 server if a \fB\s-1HOST\s0\fR parameter
.\"O does not specify the port itself.  If no \fB\s-1PORT\s0\fR parameter is used,
.\"O the default is port 389 for \s-1LDAP\s0 and port 636 for \s-1LDAP\s0 over \s-1TLS\s0
.\"O (\s-1SSL\s0).  The \fB\s-1PORT\s0\fR parameter is deprecated in favor of the \fB\s-1URI\s0\fR
.\"O specification and is included for backwards compatibility.
\fB\s-1URI\s0\fR パラメータが指定されず、\fB\s-1HOST\s0\fR
パラメータでもポートが指定されていないときは、\fB\s-1PORT\s0\fR パラメータが
\&\s-1LDAP\s0 サーバに接続するときのデフォルトのポートを指定する。
\&\fB\s-1PORT\s0\fR パラメータが使用されていない場合、デフォルトのポートは
\&\s-1LDAP\s0 では 389 番、\s-1LDAP\s0 over \s-1TLS\s0 (\s-1SSL\s0) では
636 番である。\fB\s-1PORT\s0\fR パラメータは非推奨であり、
\&\fB\s-1URI\s0\fR で指定する方が望ましい。
このパラメータがあるのは、後方互換のためである。
.IP "\fB\s-1BIND_TIMELIMIT\s0\fR seconds" 4
.IX Item "BIND_TIMELIMIT seconds"
.\"O The \fB\s-1BIND_TIMELIMIT\s0\fR parameter specifies the amount of time, in seconds,
.\"O to wait while trying to connect to an \s-1LDAP\s0 server.  If multiple \fB\s-1URI\s0\fRs or
.\"O \&\fB\s-1HOST\s0\fRs are specified, this is the amount of time to wait before trying
.\"O the next one in the list.
接続しようとするときの待ち時間を秒数で指定する。\fB\s-1URI\s0\fR や
\&\fB\s-1HOST\s0\fR が複数指定されている場合は、その時間だけ待ってから、
リスト中の次のサーバに接続を試みることを意味する。
.IP "\fB\s-1NETWORK_TIMEOUT\s0\fR seconds" 4
.IX Item "NETWORK_TIMEOUT seconds"
.\"O An alias for \fB\s-1BIND_TIMELIMIT\s0\fR for OpenLDAP compatibility.
\&\fB\s-1BIND_TIMELIMIT\s0\fR の別名。OpenLDAP との互換のためにある。
.IP "\fB\s-1TIMELIMIT\s0\fR seconds" 4
.IX Item "TIMELIMIT seconds"
.\"O The \fB\s-1TIMELIMIT\s0\fR parameter specifies the amount of time, in seconds,
.\"O to wait for a response to an \s-1LDAP\s0 query.
\&\fB\s-1TIMELIMIT\s0\fR パラメータは、
\&\s-1LDAP\s0 参照に対して応答が返ってくるまでの待ち時間を秒数で指定する。
.IP "\fB\s-1TIMEOUT\s0\fR seconds" 4
.IX Item "TIMEOUT seconds"
.\"O The \fB\s-1TIMEOUT\s0\fR parameter specifies the amount of time, in seconds,
.\"O to wait for a response from the various \s-1LDAP\s0 APIs.
\&\fB\s-1TIMEOUT\s0\fR パラメータは、
様々な \s-1LDAP\s0 API から応答が返ってくるときの待ち時間を秒数で指定する。
.IP "\fB\s-1SUDOERS_BASE\s0\fR base" 4
.IX Item "SUDOERS_BASE base"
.\"O The base \s-1DN\s0 to use when performing \fBsudo\fR \s-1LDAP\s0 queries.  Typically
.\"O this is of the form \f(CW\*(C`ou=SUDOers,dc=example,dc=com\*(C'\fR for the domain
.\"O \&\f(CW\*(C`example.com\*(C'\fR.  Multiple \fB\s-1SUDOERS_BASE\s0\fR lines may be specified,
.\"O in which case they are queried in the order specified.
\&\fBsudo\fR が \s-1LDAP\s0 参照を行うときに使用するベース \s-1DN\s0
を指定する。ドメインが \f(CW\*(C`example.com\*(C'\fR ならば、
普通 \f(CW\*(C`ou=SUDOers,dc=example,dc=com\*(C'\fR という形になる。
\&\fB\s-1SUDOERS_BASE\s0\fR を複数回指定してもよい。その場合は、
指定された順番で参照されることになる。
.IP "\fB\s-1SUDOERS_SEARCH_FILTER\s0\fR ldap_filter" 4
.IX Item "SUDOERS_SEARCH_FILTER ldap_filter"
.\"O An \s-1LDAP\s0 filter which is used to restrict the set of records returned
.\"O when performing a \fBsudo\fR \s-1LDAP\s0 query.  Typically, this is of the
.\"O form \f(CW\*(C`attribute=value\*(C'\fR or \f(CW\*(C`(&(attribute=value)(attribute2=value2))\*(C'\fR.
\&\fBsudo\fR が \s-1LDAP\s0 参照を行うとき、どんな情報を返すかを限定する
\&\s-1LDAP\s0 のフィルター。
普通これは、\f(CW\*(C`attribute=value\*(C'\fR とか
\&\f(CW\*(C`(&(attribute=value)(attribute2=value2))\*(C'\fR という形を取る。
.IP "\fB\s-1SUDOERS_TIMED\s0\fR on/true/yes/off/false/no" 4
.IX Item "SUDOERS_TIMED on/true/yes/off/false/no"
.\"O Whether or not to evaluate the \f(CW\*(C`sudoNotBefore\*(C'\fR and \f(CW\*(C`sudoNotAfter\*(C'\fR
.\"O attributes that implement time-dependent sudoers entries.
属性 \f(CW\*(C`sudoNotBefore\*(C'\fR や \f(CW\*(C`sudoNotAfter\*(C'\fR
を評価するか、しないかを指定する。
この二つの属性によって日時制限のある sudo 設定のエントリを実現している。
.IP "\fB\s-1SUDOERS_DEBUG\s0\fR debug_level" 4
.IX Item "SUDOERS_DEBUG debug_level"
.\"O This sets the debug level for \fBsudo\fR \s-1LDAP\s0 queries.  Debugging
.\"O information is printed to the standard error.  A value of 1 results
.\"O in a moderate amount of debugging information.  A value of 2 shows
.\"O the results of the matches themselves.  This parameter should not
.\"O be set in a production environment as the extra information is
.\"O likely to confuse users.
\&\fBsudo\fR が \s-1LDAP\s0 参照をするときのデバッグレベルを決める。
デバック情報の出力先は標準エラーである。値を 1 にすると、
多からず少なからずほどほどのデバック情報が表示される。
値を 2 にすると、マッチの結果そのものも出力される。
実用環境では、このパラメータを設定するべきではない。
ユーザが余計な情報に混乱しかねないからだ。
.IP "\fB\s-1BINDDN\s0\fR \s-1DN\s0" 4
.IX Item "BINDDN DN"
.\"O The \fB\s-1BINDDN\s0\fR parameter specifies the identity, in the form of a
.\"O Distinguished Name (\s-1DN\s0), to use when performing \s-1LDAP\s0 operations.
.\"O If not specified, \s-1LDAP\s0 operations are performed with an anonymous
.\"O identity.  By default, most \s-1LDAP\s0 servers will allow anonymous access.
\&\fB\s-1BINDDN\s0\fR パラメータは、誰の名前で \s-1LDAP\s0 の操作を行うかを、
識別名 (\s-1DN\s0) を使って指定する。これが指定されていない場合、
\&\s-1LDAP\s0 の操作は anonymous の名前で実行される。\s-1LDAP\s0 サーバは、
たいていデフォルトで anonymous によるアクセスを許可しているものである。
.IP "\fB\s-1BINDPW\s0\fR secret" 4
.IX Item "BINDPW secret"
.\"O The \fB\s-1BINDPW\s0\fR parameter specifies the password to use when performing
.\"O \&\s-1LDAP\s0 operations.  This is typically used in conjunction with the
.\"O \&\fB\s-1BINDDN\s0\fR parameter.
\&\fB\s-1BINDPW\s0\fR パラメータは、
\&\s-1LDAP\s0 の操作を行うときに使用するパスワードを指定する。
通例、このパラメータは、\fB\s-1BINDDN\s0\fR パラメータと組み合わせて使用する。
.IP "\fB\s-1ROOTBINDDN\s0\fR \s-1DN\s0" 4
.IX Item "ROOTBINDDN DN"
.\"O The \fB\s-1ROOTBINDDN\s0\fR parameter specifies the identity, in the form of
.\"O a Distinguished Name (\s-1DN\s0), to use when performing privileged \s-1LDAP\s0
.\"O operations, such as \fIsudoers\fR queries.  The password corresponding
.\"O to the identity should be stored in \fI/etc/ldap.secret\fR.
.\"O If not specified, the \fB\s-1BINDDN\s0\fR identity is used (if any).
\&\fB\s-1ROOTBINDDN\s0\fR パラメータは、sudo 設定の参照のような、
特権的な \s-1LDAP\s0 操作をするとき、誰の名前で行うかを識別名 (\s-1DN\s0)
を使って指定する。その名前に対応するパスワードは \fI/etc/ldap.secret\fR
に書き込んでおくべきだ。このパラメータが設定されていない場合は、
\&\fB\s-1BINDDN\s0\fR で指定した名前があるならば、それが使用される。
.IP "\fB\s-1LDAP_VERSION\s0\fR number" 4
.IX Item "LDAP_VERSION number"
.\"O The version of the \s-1LDAP\s0 protocol to use when connecting to the server.
.\"O The default value is protocol version 3.
サーバに接続するときに使用する \s-1LDAP\s0 プロトコルのバージョン。
デフォルトの値は、プロトコルバージョン 3 である。
.IP "\fB\s-1SSL\s0\fR on/true/yes/off/false/no" 4
.IX Item "SSL on/true/yes/off/false/no"
.\"O If the \fB\s-1SSL\s0\fR parameter is set to \f(CW\*(C`on\*(C'\fR, \f(CW\*(C`true\*(C'\fR or \f(CW\*(C`yes\*(C'\fR, \s-1TLS\s0
.\"O (\s-1SSL\s0) encryption is always used when communicating with the \s-1LDAP\s0
.\"O server.  Typically, this involves connecting to the server on port
.\"O 636 (ldaps).
\&\fB\s-1SSL\s0\fR パラメータが
\&\f(CW\*(C`on\*(C'\fR, \f(CW\*(C`true\*(C'\fR, \f(CW\*(C`yes\*(C'\fR
になっていると、\s-1LDAP\s0 サーバと通信する際に、常に
\&\s-1TLS\s0 (\s-1SSL\s0) の暗号化を使用することになる。
通例、それは 636 番ポート (ldaps) を通してサーバに接続することである。
.IP "\fB\s-1SSL\s0\fR start_tls" 4
.IX Item "SSL start_tls"
.\"O If the \fB\s-1SSL\s0\fR parameter is set to \f(CW\*(C`start_tls\*(C'\fR, the \s-1LDAP\s0 server
.\"O connection is initiated normally and \s-1TLS\s0 encryption is begun before
.\"O the bind credentials are sent.  This has the advantage of not
.\"O requiring a dedicated port for encrypted communications.  This
.\"O parameter is only supported by \s-1LDAP\s0 servers that honor the \f(CW\*(C`start_tls\*(C'\fR
.\"O extension, such as the OpenLDAP server.
\&\fB\s-1SSL\s0\fR パラメータを \f(CW\*(C`start_tls\*(C'\fR に設定すると、
\&\s-1LDAP\s0 サーバへの接続を平文で開始し、
バインド操作のために認証情報を送信する直前に、
\&\s-1TLS\s0 の暗号化を始めることになる。
これには、暗号化された通信のために専用のポートを必要としないという長所がある。
このパラメータをサポートしているのは、
OpenLDAP サーバのような \f(CW\*(C`start_tls\*(C'\fR 拡張に対応している
\&\s-1LDAP\s0 サーバのみである。
.IP "\fB\s-1TLS_CHECKPEER\s0\fR on/true/yes/off/false/no" 4
.IX Item "TLS_CHECKPEER on/true/yes/off/false/no"
.\"O If enabled, \fB\s-1TLS_CHECKPEER\s0\fR will cause the \s-1LDAP\s0 server's \s-1TLS\s0
.\"O certificated to be verified.  If the server's \s-1TLS\s0 certificate cannot
.\"O be verified (usually because it is signed by an unknown certificate
.\"O authority), \fBsudo\fR will be unable to connect to it.  If \fB\s-1TLS_CHECKPEER\s0\fR
.\"O is disabled, no check is made.  Note that disabling the check creates
.\"O an opportunity for man-in-the-middle attacks since the server's
.\"O identity will not be authenticated.  If possible, the \s-1CA\s0's certificate
.\"O should be installed locally so it can be verified.
\&\fB\s-1TLS_CHECKPEER\s0\fR が有効になっていると、
\&\s-1LDAP\s0 サーバの \s-1TLS\s0 証明書が正当かどうかチェックが行われる。
\&\s-1LDAP\s0 サーバの証明書が正当であることを確認できない場合 (たいていは、
署名している認証局が未知 (unknown) であることが理由だ)、
\&\fBsudo\fR はそのサーバに接続することができない。
\&\fB\s-1TLS_CHECKPEER\s0\fR が無効になっている場合は、チェックが行われない。
気をつけてほしいが、このチェックをやらないことにすると、
サーバーの身元確認を行わないので、中間者攻撃の可能性が生じる。
可能ならば、認証局の証明書は、その正当性をチェックできるように、
手元のマシンにインストールしておくべきである。
.IP "\fB\s-1TLS_CACERT\s0\fR file name" 4
.IX Item "TLS_CACERT file name"
.\"O An alias for \fB\s-1TLS_CACERTFILE\s0\fR for OpenLDAP compatibility.
\&\fB\s-1TLS_CACERTFILE\s0\fR の別名。OpenLDAP との互換のためにある。
.IP "\fB\s-1TLS_CACERTFILE\s0\fR file name" 4
.IX Item "TLS_CACERTFILE file name"
.\"O The path to a certificate authority bundle which contains the certificates
.\"O for all the Certificate Authorities the client knows to be valid,
.\"O e.g. \fI/etc/ssl/ca\-bundle.pem\fR.
.\"O This option is only supported by the OpenLDAP libraries.
.\"O Netscape-derived \s-1LDAP\s0 libraries use the same certificate
.\"O database for \s-1CA\s0 and client certificates (see \fB\s-1TLS_CERT\s0\fR).
認証局の証明書を一つにまとめたファイルのパス。たとえば、
\&\fI/etc/ssl/ca\-bundle.pem\fR といったファイルであり、
正当なものだとクライアントが認識している、すべての認証局の証明書がそこに入っている。
このオプションをサポートしているのは、OpenLDAP ライブラリだけである。
Netscape 由来の \s-1LDAP\s0 ライブラリは、認証局とクライアント、
両方の証明書に対して、同一の証明書データベースを使用する
(\fB\s-1TLS_CERT\s0\fR を参照)。
.IP "\fB\s-1TLS_CACERTDIR\s0\fR directory" 4
.IX Item "TLS_CACERTDIR directory"
.\"O Similar to \fB\s-1TLS_CACERTFILE\s0\fR but instead of a file, it is a
.\"O directory containing individual Certificate Authority certificates,
.\"O e.g. \fI/etc/ssl/certs\fR.
.\"O The directory specified by \fB\s-1TLS_CACERTDIR\s0\fR is checked after
.\"O \&\fB\s-1TLS_CACERTFILE\s0\fR.
.\"O This option is only supported by the OpenLDAP libraries.
\&\fB\s-1TLS_CACERTFILE\s0\fR に似ているが、ファイルではなく、たとえば
\&\fI/etc/ssl/certs\fR といったディレクトリであり、認証局の証明書が
1 認証局 1 ファイルの形でそこに入っている。\fB\s-1TLS_CACERTDIR\s0\fR
で指定したディレクトリは、\fB\s-1TLS_CACERTFILE\s0\fR の後でチェックされる。
このオプションをサポートしているのは、OpenLDAP ライブラリだけである。
.IP "\fB\s-1TLS_CERT\s0\fR file name" 4
.IX Item "TLS_CERT file name"
.\"O The path to a file containing the client certificate which can
.\"O be used to authenticate the client to the \s-1LDAP\s0 server.
.\"O The certificate type depends on the \s-1LDAP\s0 libraries used.
クライアントの証明書が入っているファイルのパス。この証明書は、
\&\s-1LDAP\s0 サーバに対するクライアントの認証に使用できる。
証明書のタイプは、利用する \s-1LDAP\s0 ライブラリによって異なっている。
.Sp
OpenLDAP:
    \f(CW\*(C`tls_cert /etc/ssl/client_cert.pem\*(C'\fR
.Sp
.\"O Netscape-derived:
Netscape 由来:
    \f(CW\*(C`tls_cert /var/ldap/cert7.db\*(C'\fR
.Sp
.\"O When using Netscape-derived libraries, this file may also contain
.\"O Certificate Authority certificates.
Netscape 由来のライブラリを使う場合は、このファイルに認証局の証明書も入れることができる。
.IP "\fB\s-1TLS_KEY\s0\fR file name" 4
.IX Item "TLS_KEY file name"
.\"O The path to a file containing the private key which matches the
.\"O certificate specified by \fB\s-1TLS_CERT\s0\fR.  The private key must not be
.\"O password-protected.  The key type depends on the \s-1LDAP\s0 libraries
.\"O used.
\&\fB\s-1TLS_CERT\s0\fR で指定した証明書に対応する、
秘密鍵が入っているファイルのパス。
この秘密鍵はパスワードでプロテクトされていてはならない。
鍵のタイプは利用する \s-1LDAP\s0 ライブラリによって異なっている。
.Sp
OpenLDAP:
    \f(CW\*(C`tls_key /etc/ssl/client_key.pem\*(C'\fR
.Sp
.\"O Netscape-derived:
.Netscape 由来:
    \f(CW\*(C`tls_key /var/ldap/key3.db\*(C'\fR
.IP "\fB\s-1TLS_RANDFILE\s0\fR file name" 4
.IX Item "TLS_RANDFILE file name"
.\"O The \fB\s-1TLS_RANDFILE\s0\fR parameter specifies the path to an entropy
.\"O source for systems that lack a random device.  It is generally used
.\"O in conjunction with \fIprngd\fR or \fIegd\fR.
.\"O This option is only supported by the OpenLDAP libraries.
\&\fB\s-1TLS_RANDFILE\s0\fR は、random デバイスを持っていないシステムのために
エントロピー・ソースのパスを指定する。
これは通例、\fIprngd\fR や \fIegd\fR と組み合わせて使用するものである。
このオプションをサポートしているのは、OpenLDAP ライブラリだけである。
.IP "\fB\s-1TLS_CIPHERS\s0\fR cipher list" 4
.IX Item "TLS_CIPHERS cipher list"
.\"O The \fB\s-1TLS_CIPHERS\s0\fR parameter allows the administer to restrict
.\"O which encryption algorithms may be used for \s-1TLS\s0 (\s-1SSL\s0) connections.
.\"O See the OpenSSL manual for a list of valid ciphers.
.\"O This option is only supported by the OpenLDAP libraries.
管理者は \fB\s-1TLS_CIPHERS\s0\fR パラメータによって、\s-1TLS\s0
(\s-1SSL\s0) 接続に使用可能な暗号アルゴリズムを限定することができる。
有効な暗号のリストについては OpenSSL のマニュアルを参照してほしい。
このオプションをサポートしているのは、OpenLDAP ライブラリだけである。
.IP "\fB\s-1USE_SASL\s0\fR on/true/yes/off/false/no" 4
.IX Item "USE_SASL on/true/yes/off/false/no"
.\"O Enable \fB\s-1USE_SASL\s0\fR for \s-1LDAP\s0 servers that support \s-1SASL\s0 authentication.
\&\s-1LDAP\s0 サーバが \s-1SASL\s0 認証をサポートしているなら、
\&\fB\s-1USE_SASL\s0\fR を有効にすること。
.IP "\fB\s-1SASL_AUTH_ID\s0\fR identity" 4
.IX Item "SASL_AUTH_ID identity"
.\"O The \s-1SASL\s0 user name to use when connecting to the \s-1LDAP\s0 server.
.\"O By default, \fBsudo\fR will use an anonymous connection.
\&\s-1LDAP\s0 サーバに接続するときに使用する \s-1SASL\s0 ユーザ名。
デフォルトでは、\fBsudo\fR は anonymous 接続を使用する。
.IP "\fB\s-1ROOTUSE_SASL\s0\fR on/true/yes/off/false/no" 4
.IX Item "ROOTUSE_SASL on/true/yes/off/false/no"
.\"O Enable \fB\s-1ROOTUSE_SASL\s0\fR to enable \s-1SASL\s0 authentication when connecting
.\"O to an \s-1LDAP\s0 server from a privileged process, such as \fBsudo\fR.
\&\fB\s-1ROOTUSE_SASL\s0\fR を有効にすると、
\&\fBsudo\fR のような特権的なプロセスから \s-1LDAP\s0 サーバに接続するときに
\&\s-1SASL\s0 認証が可能になる。
.IP "\fB\s-1ROOTSASL_AUTH_ID\s0\fR identity" 4
.IX Item "ROOTSASL_AUTH_ID identity"
.\"O The \s-1SASL\s0 user name to use when \fB\s-1ROOTUSE_SASL\s0\fR is enabled.
\&\fB\s-1ROOTUSE_SASL\s0\fR が有効なとき使用する \s-1SASL\s0 ユーザ名。
.IP "\fB\s-1SASL_SECPROPS\s0\fR none/properties" 4
.IX Item "SASL_SECPROPS none/properties"
.\"O \&\s-1SASL\s0 security properties or \fInone\fR for no properties.  See the
.\"O \&\s-1SASL\s0 programmer's manual for details.
\&\s-1SASL\s0 セキュリティ・プロパティを指定する。プロパティなしならば、
\&\fInone\fR である。
詳細については、\s-1SASL\s0 プログラマーズ・マニュアルを参照すること。
.IP "\fB\s-1KRB5_CCNAME\s0\fR file name" 4
.IX Item "KRB5_CCNAME file name"
.\"O The path to the Kerberos 5 credential cache to use when authenticating
.\"O with the remote server.
リモート・サーバに対して認証をするときに使用する Kerberos 5
資格証明キャッシュのパス。
.IP "\fB\s-1DEREF\s0\fR never/searching/finding/always" 4
.IX Item "DEREF never/searching/finding/always"
.\"O How alias dereferencing is to be performed when searching.  See the
.\"O \&\fIldap.conf\fR\|(5) manual for a full description of this option.
.\"O .PP
検索を行うときに、alias の参照をどうするかを指定する。
このオプションについての詳しい説明は、\fIldap.conf\fR\|(5) のマニュアルにある。
.PP
.\"O See the \f(CW\*(C`ldap.conf\*(C'\fR entry in the \s-1EXAMPLES\s0 section.
「用例」セクションにある \f(CW\*(C`ldap.conf\*(C'\fR
のくだりも参照してほしい。
.\"O .SS "Configuring nsswitch.conf"
.SS "nsswitch.conf の設定"
.IX Subsection "Configuring nsswitch.conf"
.\"O Unless it is disabled at build time, \fBsudo\fR consults the Name
.\"O Service Switch file, \fI/etc/nsswitch.conf\fR, to specify the \fIsudoers\fR
.\"O search order.  Sudo looks for a line beginning with \f(CW\*(C`sudoers\*(C'\fR: and
.\"O uses this to determine the search order.  Note that \fBsudo\fR does
.\"O not stop searching after the first match and later matches take
.\"O precedence over earlier ones.
.\"O .PP
ビルド時に無効にしないかぎり、\fBsudo\fR はネームサービス・スイッチ・ファイル
\&\fI/etc/nsswitch.conf\fR を調べて、sudo の設定を参照する順番を決める。
すなわち、\fI/etc/nsswitch.conf\fR で
\&\f(CW\*(C`sudoers\*(C'\fR: という文字列に始まる行を探し、
その行によって参照順を決定するのである。
気をつけてほしいのは、\fBsudo\fR は参照中、
マッチする項目に一度出会ったからと言って、そこで参照を終わりにしないことだ。
後でマッチしたものが前にマッチしたものよりも優先されるのである。
.PP
.\"O The following sources are recognized:
.\"O .PP
以下の参照元が有効である。
.PP
.Vb 2
.\"O \&    files       read sudoers from F</etc/sudoers>
.\"O \&    ldap        read sudoers from LDAP
\&    files       \fI/etc/sudoers\fR から sudo の設定を読み込む
\&    ldap        LDAP から sudo の設定を読み込む
.Ve
.PP
.\"O In addition, the entry \f(CW\*(C`[NOTFOUND=return]\*(C'\fR will short-circuit the
.\"O search if the user was not found in the preceding source.
.\"O .PP
なお、\f(CW\*(C`[NOTFOUND=return]\*(C'\fR の記述があると、
先行する参照元にユーザが見つからなかった場合、参照を中断することになる。
.PP
.\"O To consult \s-1LDAP\s0 first followed by the local sudoers file (if it
.\"O exists), use:
.\"O .PP
最初に \s-1LDAP\s0 を参照し、その後で (もし存在するならば)
ローカルマシン上の sudoers ファイルを調べるには、次のように指定する。
.PP
.Vb 1
\&    sudoers: ldap files
.Ve
.PP
.\"O The local \fIsudoers\fR file can be ignored completely by using:
.\"O .PP
ローカルマシン上の \fIsudoers\fR ファイルをまったく無視するには、
次のようにする。
.PP
.Vb 1
\&    sudoers: ldap
.Ve
.PP
.\"O If the \fI/etc/nsswitch.conf\fR file is not present or there is no
.\"O sudoers line, the following default is assumed:
.\"O .PP
\&\fI/etc/nsswitch.conf\fR ファイルが存在しなかったり、存在しても sudoers
の行がなかったりした場合は、次のデフォルト設定が使用される。
.PP
.Vb 1
\&    sudoers: files
.Ve
.PP
.\"O Note that \fI/etc/nsswitch.conf\fR is supported even when the underlying
.\"O operating system does not use an nsswitch.conf file.
基盤となるオペーレーティング・システムが nsswitch.conf
ファイルを使用しない場合でも、\fBsudo\fR は \fI/etc/nsswitch.conf\fR
をサポートしていることに注意してほしい。
.\"O .SS "Configuring netsvc.conf"
.SS "netsvc.conf の設定"
.IX Subsection "Configuring netsvc.conf"
.\"O On \s-1AIX\s0 systems, the \fI/etc/netsvc.conf\fR file is consulted instead of
.\"O \&\fI/etc/nsswitch.conf\fR.  \fBsudo\fR simply treats \fInetsvc.conf\fR as a
.\"O variant of \fInsswitch.conf\fR; information in the previous section
.\"O unrelated to the file format itself still applies.
.\"O .PP
\&\s-1AIX\s0 システムでは、\fI/etc/nsswitch.conf\fR ではなく、
\&\fI/etc/netsvc.conf\fR ファイルを調べに行く。\fBsudo\fR としては、
\fInetsvc.conf\fR を \fInsswitch.conf\fR のバリエーションとして扱うだけだ。
それ故、上のセクションの記述のうち、ファイルの書式に関係のないものは、
ここでも当てはまることになる。
.PP
.\"O To consult \s-1LDAP\s0 first followed by the local sudoers file (if it
.\"O exists), use:
.\"O .PP
最初に \s-1LDAP\s0 を参照し、その後で (もし存在するならば)
ローカルマシン上の sudoers ファイルを調べるには、次のように指定する。
.PP
.Vb 1
\&    sudoers = ldap, files
.Ve
.PP
.\"O The local \fIsudoers\fR file can be ignored completely by using:
.\"O .PP
ローカルマシン上の \fIsudoers\fR ファイルをまったく無視するには、
次のようにする。
.PP
.Vb 1
\&    sudoers = ldap
.Ve
.PP
.\"O To treat \s-1LDAP\s0 as authoratative and only use the local sudoers file
.\"O if the user is not present in \s-1LDAP\s0, use:
.\"O .PP
\&\s-1LDAP\s0 を正式の参照元と見なし、
\&\s-1LDAP\s0 にユーザが見つからなかったときのみ、
ローカルの sudoers ファイルを使用する。
.PP
.Vb 1
\&    sudoers = ldap = auth, files
.Ve
.PP
.\"O Note that in the above example, the \f(CW\*(C`auth\*(C'\fR qualfier only affects
.\"O user lookups; both \s-1LDAP\s0 and \fIsudoers\fR will be queried for \f(CW\*(C`Defaults\*(C'\fR
.\"O entries.
.\"O .PP
上記の例において、\f(CW\*(C`auth\*(C'\fR 修飾子が影響を及ぼすのは、
ユーザを照合するときだけであることに注意してほしい。
\&\f(CW\*(C`Defaults\*(C'\fR エントリについては、
\&\s-1LDAP\s0 と \fIsudoers\fR の両方が参照される。
.PP
.\"O If the \fI/etc/netsvc.conf\fR file is not present or there is no
.\"O sudoers line, the following default is assumed:
.\"O .PP
\&\fI/etc/netsvc.conf\fR ファイルが存在しなかったり、存在しても
sudoers の行がなかったりした場合は、次のデフォルト設定が使用される。
.PP
.Vb 1
\&    sudoers = files
.Ve
.\"O .SH "FILES"
.SH "ファイル"
.IX Header "FILES"
.ie n .IP "\fI/etc/ldap.conf\fR" 24
.el .IP "\fI/etc/ldap.conf\fR" 24
.IX Item "/etc/ldap.conf"
.\"O \&\s-1LDAP\s0 configuration file
\&\s-1LDAP\s0 の設定ファイル
.ie n .IP "\fI/etc/nsswitch.conf\fR" 24
.el .IP "\fI/etc/nsswitch.conf\fR" 24
.IX Item "/etc/nsswitch.conf"
.\"O determines sudoers source order
sudo の設定の参照元の順番を決める
.ie n .IP "\fI/etc/netsvc.conf\fR" 24
.el .IP "\fI/etc/netsvc.conf\fR" 24
.IX Item "/etc/netsvc.conf"
.\"O determines sudoers source order on \s-1AIX\s0
\&\s-1AIX\s0 で sudo の設定の参照元の順番を決める
.\"O .SH "EXAMPLES"
.SH "用例"
.IX Header "EXAMPLES"
.\"O .SS "Example ldap.conf"
.SS "ldap.conf の一例"
.IX Subsection "Example ldap.conf"
.Vb 10
.\"O \&  # Either specify one or more URIs or one or more host:port pairs.
.\"O \&  # If neither is specified sudo will default to localhost, port 389.
\&  # URI か host:port の組み合わせを一つ以上指定する。
\&  # どちらも指定されていない場合、sudo は localhost と 389 番
\&  # ポートを使用する。
\&  #
\&  #host          ldapserver
\&  #host          ldapserver1 ldapserver2:390
\&  #
.\"O \&  # Default port if host is specified without one, defaults to 389.
\&  # host がポートなしで指定されている場合のポート番号。
\&  # デフォルトは 389 である。
\&  #port          389
\&  #
.\"O \&  # URI will override the host and port settings.
\&  # URI の指定は、host と port による指定に優先する。
\&  uri            ldap://ldapserver
\&  #uri            ldaps://secureldapserver
\&  #uri            ldaps://secureldapserver ldap://ldapserver
\&  #
.\"O \&  # The amount of time, in seconds, to wait while trying to connect to
.\"O \&  # an LDAP server.
\&  #  LDAP サーバに接続しようとしているときの、秒単位の待ち時間。
\&  bind_timelimit 30
\&  #
.\"O \&  # The amount of time, in seconds, to wait while performing an LDAP query.
\&  # LDAP の参照を行っているときの、秒単位の待ち時間。
\&  timelimit 30
\&  #
.\"O \&  # Must be set or sudo will ignore LDAP; may be specified multiple times.
\&  # 必ず設定すること。さもないと、sudo は LDAP を無視することになる。
\&  # 複数回指定してもよい。
\&  sudoers_base   ou=SUDOers,dc=example,dc=com
\&  #
.\"O \&  # verbose sudoers matching from ldap
\&  # LDAP を参照したとき、sudo 設定のマッチングについて詳細情報を
\&  # 表示する。
\&  #sudoers_debug 2
\&  #
.\"O \&  # Enable support for time\-based entries in sudoers.
\&  # sudo 設定中で日時制限のあるエントリのサポートを有効にする。
\&  #sudoers_timed yes
\&  #
.\"O \&  # optional proxy credentials
\&  # LDAP の操作を行う者の認証情報 (設定する、しないは任意)。
\&  #binddn        <who to search as>
\&  #bindpw        <password>
\&  #rootbinddn    <who to search as, uses /etc/ldap.secret for bindpw>
\&  #
.\"O \&  # LDAP protocol version, defaults to 3
\&  # LDAP プロトコルのバージョン。デフォルトは 3 である。
\&  #ldap_version 3
\&  #
.\"O \&  # Define if you want to use an encrypted LDAP connection.
.\"O \&  # Typically, you must also set the port to 636 (ldaps).
\&  # LDAP 接続を暗号化したいなら、on にする。
\&  # 通例、ポートを 636 (ldaps) にすることも必要。
\&  #ssl on
\&  #
.\"O \&  # Define if you want to use port 389 and switch to
.\"O \&  # encryption before the bind credentials are sent.
.\"O \&  # Only supported by LDAP servers that support the start_tls
.\"O \&  # extension such as OpenLDAP.
\&  # ポート 389 を使用し、バインド操作のために認証情報が
\&  # 送信される前に、暗号化セッションに切り替えたい場合に設定する。
\&  # これをサポートしているのは、OpenLDAP のような start_tls 拡張に
\&  # 対応している LDAP サーバだけである。
\&  #ssl start_tls
\&  #
.\"O \&  # Additional TLS options follow that allow tweaking of the
.\"O \&  # SSL/TLS connection.
\&  # さらに以下の TLS 関連オプションを使うことで SSL/TLS 接続を
\&  # 微調整できる。
\&  #
.\"O \&  #tls_checkpeer yes # verify server SSL certificate
.\"O \&  #tls_checkpeer no  # ignore server SSL certificate
\&  #tls_checkpeer yes # サーバの SSL 証明書の正当性をチェックする。
\&  #tls_checkpeer no  # サーバの SSL 証明書の正当性をチェックしない。
\&  #
.\"O \&  # If you enable tls_checkpeer, specify either tls_cacertfile
.\"O \&  # or tls_cacertdir.  Only supported when using OpenLDAP.
\&  # tls_checkpeer を有効にするときは、 tls_cacertfile か
\&  # tls_cacertdir のどちらかを指定すること。tls_cacertfile や
\&  # tls_cacertdir は OpenLDAP の使用時のみ使える。
\&  #
\&  #tls_cacertfile /etc/certs/trusted_signers.pem
\&  #tls_cacertdir  /etc/certs
\&  #
.\"O \&  # For systems that don\*(Aqt have /dev/random
.\"O \&  # use this along with PRNGD or EGD.pl to seed the
.\"O \&  # random number pool to generate cryptographic session keys.
.\"O \&  # Only supported when using OpenLDAP.
\&  # /dev/random がないシステムでは、下記の設定を PRNGD、あるいは
\&  # EGD.pl と一緒に使用すれば、暗号セッション用の鍵を生成するための
\&  # 乱数プールの種を供給できる。このオプションが使えるのは、
\&  # OpenLDAP を使用しているときだけである。
\&  #
\&  #tls_randfile /etc/egd\-pool
\&  #
.\"O \&  # You may restrict which ciphers are used.  Consult your SSL
.\"O \&  # documentation for which options go here.
.\"O \&  # Only supported when using OpenLDAP.
\&  # 使用する暗号を限定することができる。どの暗号が使えるかに
\&  # ついては、SSL の文書を参照してほしい。このオプションが
\&  # 使えるのは、OpenLDAP を使用しているときだけである。
\&  #
\&  #tls_ciphers <cipher\-list>
\&  #
.\"O \&  # Sudo can provide a client certificate when communicating to
.\"O \&  # the LDAP server.
.\"O \&  # Tips:
.\"O \&  #   * Enable both lines at the same time.
.\"O \&  #   * Do not password protect the key file.
.\"O \&  #   * Ensure the keyfile is only readable by root.
\&  # sudo は LDAP サーバと交信するときに、クライアントの証明書を
\&  # 提示することができる。
\&  # 注意:
\&  #   * 両方の行を同時に有効にすること。
\&  #   * キーファイルをパスワードでプロテクトしてはいけない。
\&  #   * キーファイルが読めるのは root だけにするのを忘れずに。
\&  #
.\"O \&  # For OpenLDAP:
\&  # OpenLDAP の場合:
\&  #tls_cert /etc/certs/client_cert.pem
\&  #tls_key  /etc/certs/client_key.pem
\&  #
.\"O \&  # For SunONE or iPlanet LDAP, tls_cert and tls_key may specify either
.\"O \&  # a directory, in which case the files in the directory must have the
.\"O \&  # default names (e.g. cert8.db and key4.db), or the path to the cert
.\"O \&  # and key files themselves.  However, a bug in version 5.0 of the LDAP
.\"O \&  # SDK will prevent specific file names from working.  For this reason
.\"O \&  # it is suggested that tls_cert and tls_key be set to a directory,
.\"O \&  # not a file name.
\&  # SunONE や iPlanet LDAP の場合:
\&  # こちらの場合は、tls_cert や tls_key で指定するのは、
\&  # 証明書やキーファイルの入っているディレクトリでもよく、
\&  # ファイルそのもののパスでもよい。
\&  # 前者の場合、ディレクトリ中のファイルは、既定の名前 (たとえば
\&  # cert8.db と key4.db) でなければならない。もっとも、ファイルの
\&  # パスを指定した場合は、バージョン 5.0 の LDAP SDK にはバグが
\&  # あるので、ファイル名によってはうまく動作しないことがある。
\&  # この理由から、tls_cert や tls_key には、ファイル名ではなく、
\&  # ディレクトリを指定する方をお薦めする。
\&  #
.\"O \&  # The certificate database specified by tls_cert may contain CA certs
.\"O \&  # and/or the client\*(Aqs cert.  If the client\*(Aqs cert is included, tls_key
.\"O \&  # should be specified as well.
.\"O \&  # For backward compatibility, "sslpath" may be used in place of tls_cert.
\&  # tls_cert で指定した証明書のデータベースには、認証局の証明書と
\&  # クライアントの証明書が、どちらか一方だけ入っていてもよく、
\&  # 両方入っていてもよい。クライアントの証明書が入っている場合は、
\&  # tls_key も指定するべきである。
\&  # 後方互換のため、tls_cert のかわりに sslpath を使うこともできる。
\&  #tls_cert /var/ldap
\&  #tls_key /var/ldap
\&  #
.\"O \&  # If using SASL authentication for LDAP (OpenSSL)
\&  # LDAP に SASL 認証を使用する場合 (OpenSSL)
\&  # use_sasl yes
\&  # sasl_auth_id <SASL user name>
\&  # rootuse_sasl yes
\&  # rootsasl_auth_id <SASL user name for root access>
\&  # sasl_secprops none
\&  # krb5_ccname /etc/.ldapcache
.Ve
.\"O .SS "Sudo schema for OpenLDAP"
.SS "OpenLDAP 用の Sudo のスキーマ"
.IX Subsection "Sudo schema for OpenLDAP"
.\"O The following schema, in OpenLDAP format, is included with \fBsudo\fR
.\"O source and binary distributions as \fIschema.OpenLDAP\fR.  Simply copy
.\"O it to the schema directory (e.g. \fI/etc/openldap/schema\fR), add the
.\"O proper \f(CW\*(C`include\*(C'\fR line in \f(CW\*(C`slapd.conf\*(C'\fR and restart \fBslapd\fR.
.\"O .PP
下記のスキーマは OpenLDAP 用の形式になっており、
\&\fBsudo\fR のソースやバイナリの配布に含まれる \fIschema.OpenLDAP\fR と同じものだ。
このとおりの内容のファイルをスキーマ・ディレクトリ (たとえば、
\&\fI/etc/openldap/schema\fR) に作成し、適切な \f(CW\*(C`include\*(C'\fR 行を
\&\f(CW\*(C`slapd.conf\*(C'\fR に追加して、\fBslapd\fR をリスタートすればよい。
.PP
.Vb 6
\& attributetype ( 1.3.6.1.4.1.15953.9.1.1
\&    NAME \*(AqsudoUser\*(Aq
\&    DESC \*(AqUser(s) who may  run sudo\*(Aq
\&    EQUALITY caseExactIA5Match
\&    SUBSTR caseExactIA5SubstringsMatch
\&    SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
\&
\& attributetype ( 1.3.6.1.4.1.15953.9.1.2
\&    NAME \*(AqsudoHost\*(Aq
\&    DESC \*(AqHost(s) who may run sudo\*(Aq
\&    EQUALITY caseExactIA5Match
\&    SUBSTR caseExactIA5SubstringsMatch
\&    SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
\&
\& attributetype ( 1.3.6.1.4.1.15953.9.1.3
\&    NAME \*(AqsudoCommand\*(Aq
\&    DESC \*(AqCommand(s) to be executed by sudo\*(Aq
\&    EQUALITY caseExactIA5Match
\&    SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
\&
\& attributetype ( 1.3.6.1.4.1.15953.9.1.4
\&    NAME \*(AqsudoRunAs\*(Aq
\&    DESC \*(AqUser(s) impersonated by sudo\*(Aq
\&    EQUALITY caseExactIA5Match
\&    SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
\&
\& attributetype ( 1.3.6.1.4.1.15953.9.1.5
\&    NAME \*(AqsudoOption\*(Aq
\&    DESC \*(AqOptions(s) followed by sudo\*(Aq
\&    EQUALITY caseExactIA5Match
\&    SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
\&
\& attributetype ( 1.3.6.1.4.1.15953.9.1.6
\&    NAME \*(AqsudoRunAsUser\*(Aq
\&    DESC \*(AqUser(s) impersonated by sudo\*(Aq
\&    EQUALITY caseExactIA5Match
\&    SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
\&
\& attributetype ( 1.3.6.1.4.1.15953.9.1.7
\&    NAME \*(AqsudoRunAsGroup\*(Aq
\&    DESC \*(AqGroup(s) impersonated by sudo\*(Aq
\&    EQUALITY caseExactIA5Match
\&    SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
\&
\& attributetype ( 1.3.6.1.4.1.15953.9.1.8
\&    NAME \*(AqsudoNotBefore\*(Aq
\&    DESC \*(AqStart of time interval for which the entry is valid\*(Aq
\&    EQUALITY generalizedTimeMatch
\&    ORDERING generalizedTimeOrderingMatch
\&    SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 )
\&
\& attributetype ( 1.3.6.1.4.1.15953.9.1.9
\&    NAME \*(AqsudoNotAfter\*(Aq
\&    DESC \*(AqEnd of time interval for which the entry is valid\*(Aq
\&    EQUALITY generalizedTimeMatch
\&    ORDERING generalizedTimeOrderingMatch
\&    SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 )
\&
\& attributeTypes ( 1.3.6.1.4.1.15953.9.1.10
\&     NAME \*(AqsudoOrder\*(Aq
\&     DESC \*(Aqan integer to order the sudoRole entries\*(Aq
\&     EQUALITY integerMatch
\&     ORDERING integerOrderingMatch
\&     SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 )
\&
\& objectclass ( 1.3.6.1.4.1.15953.9.2.1 NAME \*(AqsudoRole\*(Aq SUP top STRUCTURAL
\&    DESC \*(AqSudoer Entries\*(Aq
\&    MUST ( cn )
\&    MAY ( sudoUser $ sudoHost $ sudoCommand $ sudoRunAs $ sudoRunAsUser $
\&          sudoRunAsGroup $ sudoOption $ sudoNotBefore $ sudoNotAfter $
\&          sudoOrder $ description )
\&    )
.Ve
.\"O .SH "SEE ALSO"
.SH "関連項目"
.IX Header "SEE ALSO"
\&\fIldap.conf\fR\|(5), \fIsudoers\fR\|(5)
.\"O .SH "CAVEATS"
.SH "警告"
.IX Header "CAVEATS"
.\"O Note that there are differences in the way that LDAP-based \fIsudoers\fR
.\"O is parsed compared to file-based \fIsudoers\fR.  See the \*(L"Differences
.\"O between \s-1LDAP\s0 and non-LDAP sudoers\*(R" section for more information.
LDAP を使用する \fBsudo\fR の設定と \fIsudoers\fR ファイルによる \fBsudo\fR の設定では、
設定を解析する仕方に相違があるので、注意してほしい。詳細については、
「\s-1LDAP\s0 を使う場合と使わない場合の
sudo 設定の相違点」のセクションを参照すること。
.\"O .SH "BUGS"
.SH "バグ"
.IX Header "BUGS"
.\"O If you feel you have found a bug in \fBsudo\fR, please submit a bug report
.\"O at http://www.sudo.ws/sudo/bugs/
\&\fBsudo\fR にバグを発見したと思ったら、下記ページにアクセスして、
バグレポートを提出していただきたい。
.br
http://www.sudo.ws/sudo/bugs/
.\"O .SH "SUPPORT"
.SH "サポート"
.IX Header "SUPPORT"
.\"O Limited free support is available via the sudo-users mailing list,
.\"O see http://www.sudo.ws/mailman/listinfo/sudo\-users to subscribe or
.\"O search the archives.
ある程度の無料サポートが sudo-users メーリングリストを通して利用できる。
購読やアーカイブの検索には、下記 URL をご覧になること。
.br
http://www.sudo.ws/mailman/listinfo/sudo\-users
.\"O .SH "DISCLAIMER"
.SH "免責"
.IX Header "DISCLAIMER"
.\"O \&\fBsudo\fR is provided ``\s-1AS\s0 \s-1IS\s0'' and any express or implied warranties,
.\"O including, but not limited to, the implied warranties of merchantability
.\"O and fitness for a particular purpose are disclaimed.  See the \s-1LICENSE\s0
.\"O file distributed with \fBsudo\fR or http://www.sudo.ws/sudo/license.html
.\"O for complete details.
\&\fBsudo\fR は「現状のまま」提供される。
明示的な、あるいは黙示的ないかなる保証も、
商品性や特定目的への適合性についての黙示的な保証を含め、
またそれのみに止まらず、これを否認する。詳細な全文については、
\&\fBsudo\fR と一緒に配布されている \s-1LICENSE\s0 ファイルや、
下記 Web ページをご覧いただきたい。
.br
http://www.sudo.ws/sudo/license.html




linuxjm-discuss メーリングリストの案内
Back to archive index