]> git.gag.com Git - debian/sudo/blobdiff - doc/sudoers.ldap.cat
Merge tag 'debian/1.8.5p2-1' into squeeze
[debian/sudo] / doc / sudoers.ldap.cat
diff --git a/doc/sudoers.ldap.cat b/doc/sudoers.ldap.cat
new file mode 100644 (file)
index 0000000..67d6d86
--- /dev/null
@@ -0,0 +1,750 @@
+SUDOERS.LDAP(4)              MAINTENANCE COMMANDS              SUDOERS.LDAP(4)
+
+
+
+N\bNA\bAM\bME\bE
+       sudoers.ldap - sudo LDAP configuration
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+       In addition to the standard _\bs_\bu_\bd_\bo_\be_\br_\bs file, s\bsu\bud\bdo\bo may be configured via
+       LDAP.  This can be especially useful for synchronizing _\bs_\bu_\bd_\bo_\be_\br_\bs in a
+       large, distributed environment.
+
+       Using LDAP for _\bs_\bu_\bd_\bo_\be_\br_\bs has several benefits:
+
+       o   s\bsu\bud\bdo\bo no longer needs to read _\bs_\bu_\bd_\bo_\be_\br_\bs in its entirety.  When LDAP is
+           used, there are only two or three LDAP queries per invocation.
+           This makes it especially fast and particularly usable in LDAP
+           environments.
+
+       o   s\bsu\bud\bdo\bo no longer exits if there is a typo in _\bs_\bu_\bd_\bo_\be_\br_\bs.  It is not
+           possible to load LDAP data into the server that does not conform to
+           the sudoers schema, so proper syntax is guaranteed.  It is still
+           possible to have typos in a user or host name, but this will not
+           prevent s\bsu\bud\bdo\bo from running.
+
+       o   It is possible to specify per-entry options that override the
+           global default options.  _\b/_\be_\bt_\bc_\b/_\bs_\bu_\bd_\bo_\be_\br_\bs only supports default options
+           and limited options associated with user/host/commands/aliases.
+           The syntax is complicated and can be difficult for users to
+           understand.  Placing the options directly in the entry is more
+           natural.
+
+       o   The v\bvi\bis\bsu\bud\bdo\bo program is no longer needed.  v\bvi\bis\bsu\bud\bdo\bo provides locking
+           and syntax checking of the _\b/_\be_\bt_\bc_\b/_\bs_\bu_\bd_\bo_\be_\br_\bs file.  Since LDAP updates
+           are atomic, locking is no longer necessary.  Because syntax is
+           checked when the data is inserted into LDAP, there is no need for a
+           specialized tool to check syntax.
+
+       Another major difference between LDAP and file-based _\bs_\bu_\bd_\bo_\be_\br_\bs is that in
+       LDAP, s\bsu\bud\bdo\bo-specific Aliases are not supported.
+
+       For the most part, there is really no need for s\bsu\bud\bdo\bo-specific Aliases.
+       Unix groups or user netgroups can be used in place of User_Aliases and
+       Runas_Aliases.  Host netgroups can be used in place of Host_Aliases.
+       Since Unix groups and netgroups can also be stored in LDAP there is no
+       real need for s\bsu\bud\bdo\bo-specific aliases.
+
+       Cmnd_Aliases are not really required either since it is possible to
+       have multiple users listed in a sudoRole.  Instead of defining a
+       Cmnd_Alias that is referenced by multiple users, one can create a
+       sudoRole that contains the commands and assign multiple users to it.
+
+   S\bSU\bUD\bDO\bOe\ber\brs\bs L\bLD\bDA\bAP\bP c\bco\bon\bnt\bta\bai\bin\bne\ber\br
+       The _\bs_\bu_\bd_\bo_\be_\br_\bs configuration is contained in the ou=SUDOers LDAP
+       container.
+
+       Sudo first looks for the cn=default entry in the SUDOers container.  If
+       found, the multi-valued sudoOption attribute is parsed in the same
+       manner as a global Defaults line in _\b/_\be_\bt_\bc_\b/_\bs_\bu_\bd_\bo_\be_\br_\bs.  In the following
+       example, the SSH_AUTH_SOCK variable will be preserved in the
+       environment for all users.
+
+           dn: cn=defaults,ou=SUDOers,dc=example,dc=com
+           objectClass: top
+           objectClass: sudoRole
+           cn: defaults
+           description: Default sudoOption's go here
+           sudoOption: env_keep+=SSH_AUTH_SOCK
+
+       The equivalent of a sudoer in LDAP is a sudoRole.  It consists of the
+       following attributes:
+
+       s\bsu\bud\bdo\boU\bUs\bse\ber\br
+           A user name, user ID (prefixed with '#'), Unix group (prefixed with
+           '%'), Unix group ID (prefixed with '%#'), or user netgroup
+           (prefixed with '+').
+
+       s\bsu\bud\bdo\boH\bHo\bos\bst\bt
+           A host name, IP address, IP network, or host netgroup (prefixed
+           with a '+').  The special value ALL will match any host.
+
+       s\bsu\bud\bdo\boC\bCo\bom\bmm\bma\ban\bnd\bd
+           A Unix command with optional command line arguments, potentially
+           including globbing characters (aka wild cards).  The special value
+           ALL will match any command.  If a command is prefixed with an
+           exclamation point '!', the user will be prohibited from running
+           that command.
+
+       s\bsu\bud\bdo\boO\bOp\bpt\bti\bio\bon\bn
+           Identical in function to the global options described above, but
+           specific to the sudoRole in which it resides.
+
+       s\bsu\bud\bdo\boR\bRu\bun\bnA\bAs\bsU\bUs\bse\ber\br
+           A user name or uid (prefixed with '#') that commands may be run as
+           or a Unix group (prefixed with a '%') or user netgroup (prefixed
+           with a '+') that contains a list of users that commands may be run
+           as.  The special value ALL will match any user.
+
+           The sudoRunAsUser attribute is only available in s\bsu\bud\bdo\bo versions
+           1.7.0 and higher.  Older versions of s\bsu\bud\bdo\bo use the sudoRunAs
+           attribute instead.
+
+       s\bsu\bud\bdo\boR\bRu\bun\bnA\bAs\bsG\bGr\bro\bou\bup\bp
+           A Unix group or gid (prefixed with '#') that commands may be run
+           as.  The special value ALL will match any group.
+
+           The sudoRunAsGroup attribute is only available in s\bsu\bud\bdo\bo versions
+           1.7.0 and higher.
+
+       s\bsu\bud\bdo\boN\bNo\bot\btB\bBe\bef\bfo\bor\bre\be
+           A timestamp in the form yyyymmddHHMMSSZ that can be used to provide
+           a start date/time for when the sudoRole will be valid.  If multiple
+           sudoNotBefore entries are present, the earliest is used.  Note that
+           timestamps must be in Coordinated Universal Time (UTC), not the
+           local timezone.  The minute and seconds portions are optional, but
+           some LDAP servers require that they be present (contrary to the
+           RFC).
+
+           The sudoNotBefore attribute is only available in s\bsu\bud\bdo\bo versions
+           1.7.5 and higher and must be explicitly enabled via the
+           S\bSU\bUD\bDO\bOE\bER\bRS\bS_\b_T\bTI\bIM\bME\bED\bD option in _\b/_\be_\bt_\bc_\b/_\bl_\bd_\ba_\bp_\b._\bc_\bo_\bn_\bf.
+
+       s\bsu\bud\bdo\boN\bNo\bot\btA\bAf\bft\bte\ber\br
+           A timestamp in the form yyyymmddHHMMSSZ that indicates an
+           expiration date/time, after which the sudoRole will no longer be
+           valid.  If multiple sudoNotBefore entries are present, the last one
+           is used.  Note that timestamps must be in Coordinated Universal
+           Time (UTC), not the local timezone.  The minute and seconds
+           portions are optional, but some LDAP servers require that they be
+           present (contrary to the RFC).
+
+           The sudoNotAfter attribute is only available in s\bsu\bud\bdo\bo versions 1.7.5
+           and higher and must be explicitly enabled via the S\bSU\bUD\bDO\bOE\bER\bRS\bS_\b_T\bTI\bIM\bME\bED\bD
+           option in _\b/_\be_\bt_\bc_\b/_\bl_\bd_\ba_\bp_\b._\bc_\bo_\bn_\bf.
+
+       s\bsu\bud\bdo\boO\bOr\brd\bde\ber\br
+           The sudoRole entries retrieved from the LDAP directory have no
+           inherent order.  The sudoOrder attribute is an integer (or floating
+           point value for LDAP servers that support it) that is used to sort
+           the matching entries.  This allows LDAP-based sudoers entries to
+           more closely mimic the behaviour of the sudoers file, where the of
+           the entries influences the result.  If multiple entries match, the
+           entry with the highest sudoOrder attribute is chosen.  This
+           corresponds to the "last match" behavior of the sudoers file.  If
+           the sudoOrder attribute is not present, a value of 0 is assumed.
+
+           The sudoOrder attribute is only available in s\bsu\bud\bdo\bo versions 1.7.5
+           and higher.
+
+       Each attribute listed above should contain a single value, but there
+       may be multiple instances of each attribute type.  A sudoRole must
+       contain at least one sudoUser, sudoHost and sudoCommand.
+
+       The following example allows users in group wheel to run any command on
+       any host via s\bsu\bud\bdo\bo:
+
+           dn: cn=%wheel,ou=SUDOers,dc=example,dc=com
+           objectClass: top
+           objectClass: sudoRole
+           cn: %wheel
+           sudoUser: %wheel
+           sudoHost: ALL
+           sudoCommand: ALL
+
+   A\bAn\bna\bat\bto\bom\bmy\by o\bof\bf L\bLD\bDA\bAP\bP s\bsu\bud\bdo\boe\ber\brs\bs l\blo\boo\bok\bku\bup\bp
+       When looking up a sudoer using LDAP there are only two or three LDAP
+       queries per invocation.  The first query is to parse the global
+       options.  The second is to match against the user's name and the groups
+       that the user belongs to.  (The special ALL tag is matched in this
+       query too.)  If no match is returned for the user's name and groups, a
+       third query returns all entries containing user netgroups and checks to
+       see if the user belongs to any of them.
+
+       If timed entries are enabled with the S\bSU\bUD\bDO\bOE\bER\bRS\bS_\b_T\bTI\bIM\bME\bED\bD configuration
+       directive, the LDAP queries include a subfilter that limits retrieval
+       to entries that satisfy the time constraints, if any.
+
+   D\bDi\bif\bff\bfe\ber\bre\ben\bnc\bce\bes\bs b\bbe\bet\btw\bwe\bee\ben\bn L\bLD\bDA\bAP\bP a\ban\bnd\bd n\bno\bon\bn-\b-L\bLD\bDA\bAP\bP s\bsu\bud\bdo\boe\ber\brs\bs
+       There are some subtle differences in the way sudoers is handled once in
+       LDAP.  Probably the biggest is that according to the RFC, LDAP ordering
+       is arbitrary and you cannot expect that Attributes and Entries are
+       returned in any specific order.
+
+       The order in which different entries are applied can be controlled
+       using the sudoOrder attribute, but there is no way to guarantee the
+       order of attributes within a specific entry.  If there are conflicting
+       command rules in an entry, the negative takes precedence.  This is
+       called paranoid behavior (not necessarily the most specific match).
+
+       Here is an example:
+
+           # /etc/sudoers:
+           # Allow all commands except shell
+           johnny  ALL=(root) ALL,!/bin/sh
+           # Always allows all commands because ALL is matched last
+           puddles ALL=(root) !/bin/sh,ALL
+
+           # LDAP equivalent of johnny
+           # Allows all commands except 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
+
+           # LDAP equivalent of puddles
+           # Notice that even though ALL comes last, it still behaves like
+           # role1 since the LDAP code assumes the more paranoid configuration
+           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
+
+       Another difference is that negations on the Host, User or Runas are
+       currently ignored.  For example, the following attributes do not behave
+       the way one might expect.
+
+           # does not match all but joe
+           # rather, does not match anyone
+           sudoUser: !joe
+
+           # does not match all but joe
+           # rather, matches everyone including Joe
+           sudoUser: ALL
+           sudoUser: !joe
+
+           # does not match all but web01
+           # rather, matches all hosts including web01
+           sudoHost: ALL
+           sudoHost: !web01
+
+   S\bSu\bud\bdo\boe\ber\brs\bs S\bSc\bch\bhe\bem\bma\ba
+       In order to use s\bsu\bud\bdo\bo's LDAP support, the s\bsu\bud\bdo\bo schema must be installed
+       on your LDAP server.  In addition, be sure to index the 'sudoUser'
+       attribute.
+
+       Three versions of the schema: one for OpenLDAP servers
+       (_\bs_\bc_\bh_\be_\bm_\ba_\b._\bO_\bp_\be_\bn_\bL_\bD_\bA_\bP), one for Netscape-derived servers (_\bs_\bc_\bh_\be_\bm_\ba_\b._\bi_\bP_\bl_\ba_\bn_\be_\bt),
+       and one for Microsoft Active Directory (_\bs_\bc_\bh_\be_\bm_\ba_\b._\bA_\bc_\bt_\bi_\bv_\be_\bD_\bi_\br_\be_\bc_\bt_\bo_\br_\by) may be
+       found in the s\bsu\bud\bdo\bo distribution.
+
+       The schema for s\bsu\bud\bdo\bo in OpenLDAP form is included in the EXAMPLES
+       section.
+
+   C\bCo\bon\bnf\bfi\big\bgu\bur\bri\bin\bng\bg l\bld\bda\bap\bp.\b.c\bco\bon\bnf\bf
+       Sudo reads the _\b/_\be_\bt_\bc_\b/_\bl_\bd_\ba_\bp_\b._\bc_\bo_\bn_\bf file for LDAP-specific configuration.
+       Typically, this file is shared amongst different LDAP-aware clients.
+       As such, most of the settings are not s\bsu\bud\bdo\bo-specific.  Note that s\bsu\bud\bdo\bo
+       parses _\b/_\be_\bt_\bc_\b/_\bl_\bd_\ba_\bp_\b._\bc_\bo_\bn_\bf itself and may support options that differ from
+       those described in the _\bl_\bd_\ba_\bp_\b._\bc_\bo_\bn_\bf(4) manual.
+
+       Also note that on systems using the OpenLDAP libraries, default values
+       specified in _\b/_\be_\bt_\bc_\b/_\bo_\bp_\be_\bn_\bl_\bd_\ba_\bp_\b/_\bl_\bd_\ba_\bp_\b._\bc_\bo_\bn_\bf or the user's _\b._\bl_\bd_\ba_\bp_\br_\bc files are
+       not used.
+
+       Only those options explicitly listed in _\b/_\be_\bt_\bc_\b/_\bl_\bd_\ba_\bp_\b._\bc_\bo_\bn_\bf as being
+       supported by s\bsu\bud\bdo\bo are honored.  Configuration options are listed below
+       in upper case but are parsed in a case-independent manner.
+
+       U\bUR\bRI\bI ldap[s]://[hostname[:port]] ...
+           Specifies a whitespace-delimited list of one or more URIs
+           describing the LDAP server(s) to connect to.  The _\bp_\br_\bo_\bt_\bo_\bc_\bo_\bl may be
+           either l\bld\bda\bap\bp or l\bld\bda\bap\bps\bs, the latter being for servers that support TLS
+           (SSL) encryption.  If no _\bp_\bo_\br_\bt is specified, the default is port 389
+           for ldap:// or port 636 for ldaps://.  If no _\bh_\bo_\bs_\bt_\bn_\ba_\bm_\be is specified,
+           s\bsu\bud\bdo\bo will connect to l\blo\boc\bca\bal\blh\bho\bos\bst\bt.  Multiple U\bUR\bRI\bI lines are treated
+           identically to a U\bUR\bRI\bI line containing multiple entries.  Only
+           systems using the OpenSSL libraries support the mixing of ldap://
+           and ldaps:// URIs.  The Netscape-derived libraries used on most
+           commercial versions of Unix are only capable of supporting one or
+           the other.
+
+       H\bHO\bOS\bST\bT name[:port] ...
+           If no U\bUR\bRI\bI is specified, the H\bHO\bOS\bST\bT parameter specifies a whitespace-
+           delimited list of LDAP servers to connect to.  Each host may
+           include an optional _\bp_\bo_\br_\bt separated by a colon (':').  The H\bHO\bOS\bST\bT
+           parameter is deprecated in favor of the U\bUR\bRI\bI specification and is
+           included for backwards compatibility.
+
+       P\bPO\bOR\bRT\bT port_number
+           If no U\bUR\bRI\bI is specified, the P\bPO\bOR\bRT\bT parameter specifies the default
+           port to connect to on the LDAP server if a H\bHO\bOS\bST\bT parameter does not
+           specify the port itself.  If no P\bPO\bOR\bRT\bT parameter is used, the default
+           is port 389 for LDAP and port 636 for LDAP over TLS (SSL).  The
+           P\bPO\bOR\bRT\bT parameter is deprecated in favor of the U\bUR\bRI\bI specification and
+           is included for backwards compatibility.
+
+       B\bBI\bIN\bND\bD_\b_T\bTI\bIM\bME\bEL\bLI\bIM\bMI\bIT\bT seconds
+           The B\bBI\bIN\bND\bD_\b_T\bTI\bIM\bME\bEL\bLI\bIM\bMI\bIT\bT parameter specifies the amount of time, in
+           seconds, to wait while trying to connect to an LDAP server.  If
+           multiple U\bUR\bRI\bIs or H\bHO\bOS\bST\bTs are specified, this is the amount of time to
+           wait before trying the next one in the list.
+
+       N\bNE\bET\bTW\bWO\bOR\bRK\bK_\b_T\bTI\bIM\bME\bEO\bOU\bUT\bT seconds
+           An alias for B\bBI\bIN\bND\bD_\b_T\bTI\bIM\bME\bEL\bLI\bIM\bMI\bIT\bT for OpenLDAP compatibility.
+
+       T\bTI\bIM\bME\bEL\bLI\bIM\bMI\bIT\bT seconds
+           The T\bTI\bIM\bME\bEL\bLI\bIM\bMI\bIT\bT parameter specifies the amount of time, in seconds,
+           to wait for a response to an LDAP query.
+
+       T\bTI\bIM\bME\bEO\bOU\bUT\bT seconds
+           The T\bTI\bIM\bME\bEO\bOU\bUT\bT parameter specifies the amount of time, in seconds, to
+           wait for a response from the various LDAP APIs.
+
+       S\bSU\bUD\bDO\bOE\bER\bRS\bS_\b_B\bBA\bAS\bSE\bE base
+           The base DN to use when performing s\bsu\bud\bdo\bo LDAP queries.  Typically
+           this is of the form ou=SUDOers,dc=example,dc=com for the domain
+           example.com.  Multiple S\bSU\bUD\bDO\bOE\bER\bRS\bS_\b_B\bBA\bAS\bSE\bE lines may be specified, in
+           which case they are queried in the order specified.
+
+       S\bSU\bUD\bDO\bOE\bER\bRS\bS_\b_S\bSE\bEA\bAR\bRC\bCH\bH_\b_F\bFI\bIL\bLT\bTE\bER\bR ldap_filter
+           An LDAP filter which is used to restrict the set of records
+           returned when performing a s\bsu\bud\bdo\bo LDAP query.  Typically, this is of
+           the form attribute=value or
+           (&(attribute=value)(attribute2=value2)).
+
+       S\bSU\bUD\bDO\bOE\bER\bRS\bS_\b_T\bTI\bIM\bME\bED\bD on/true/yes/off/false/no
+           Whether or not to evaluate the sudoNotBefore and sudoNotAfter
+           attributes that implement time-dependent sudoers entries.
+
+       S\bSU\bUD\bDO\bOE\bER\bRS\bS_\b_D\bDE\bEB\bBU\bUG\bG debug_level
+           This sets the debug level for s\bsu\bud\bdo\bo LDAP queries.  Debugging
+           information is printed to the standard error.  A value of 1 results
+           in a moderate amount of debugging information.  A value of 2 shows
+           the results of the matches themselves.  This parameter should not
+           be set in a production environment as the extra information is
+           likely to confuse users.
+
+       B\bBI\bIN\bND\bDD\bDN\bN DN
+           The B\bBI\bIN\bND\bDD\bDN\bN parameter specifies the identity, in the form of a
+           Distinguished Name (DN), to use when performing LDAP operations.
+           If not specified, LDAP operations are performed with an anonymous
+           identity.  By default, most LDAP servers will allow anonymous
+           access.
+
+       B\bBI\bIN\bND\bDP\bPW\bW secret
+           The B\bBI\bIN\bND\bDP\bPW\bW parameter specifies the password to use when performing
+           LDAP operations.  This is typically used in conjunction with the
+           B\bBI\bIN\bND\bDD\bDN\bN parameter.
+
+       R\bRO\bOO\bOT\bTB\bBI\bIN\bND\bDD\bDN\bN DN
+           The R\bRO\bOO\bOT\bTB\bBI\bIN\bND\bDD\bDN\bN parameter specifies the identity, in the form of a
+           Distinguished Name (DN), to use when performing privileged LDAP
+           operations, such as _\bs_\bu_\bd_\bo_\be_\br_\bs queries.  The password corresponding to
+           the identity should be stored in _\b/_\be_\bt_\bc_\b/_\bl_\bd_\ba_\bp_\b._\bs_\be_\bc_\br_\be_\bt.  If not
+           specified, the B\bBI\bIN\bND\bDD\bDN\bN identity is used (if any).
+
+       L\bLD\bDA\bAP\bP_\b_V\bVE\bER\bRS\bSI\bIO\bON\bN number
+           The version of the LDAP protocol to use when connecting to the
+           server.  The default value is protocol version 3.
+
+       S\bSS\bSL\bL on/true/yes/off/false/no
+           If the S\bSS\bSL\bL parameter is set to on, true or yes, TLS (SSL)
+           encryption is always used when communicating with the LDAP server.
+           Typically, this involves connecting to the server on port 636
+           (ldaps).
+
+       S\bSS\bSL\bL start_tls
+           If the S\bSS\bSL\bL parameter is set to start_tls, the LDAP server
+           connection is initiated normally and TLS encryption is begun before
+           the bind credentials are sent.  This has the advantage of not
+           requiring a dedicated port for encrypted communications.  This
+           parameter is only supported by LDAP servers that honor the
+           start_tls extension, such as the OpenLDAP server.
+
+       T\bTL\bLS\bS_\b_C\bCH\bHE\bEC\bCK\bKP\bPE\bEE\bER\bR on/true/yes/off/false/no
+           If enabled, T\bTL\bLS\bS_\b_C\bCH\bHE\bEC\bCK\bKP\bPE\bEE\bER\bR will cause the LDAP server's TLS
+           certificated to be verified.  If the server's TLS certificate
+           cannot be verified (usually because it is signed by an unknown
+           certificate authority), s\bsu\bud\bdo\bo will be unable to connect to it.  If
+           T\bTL\bLS\bS_\b_C\bCH\bHE\bEC\bCK\bKP\bPE\bEE\bER\bR is disabled, no check is made.  Note that disabling
+           the check creates an opportunity for man-in-the-middle attacks
+           since the server's identity will not be authenticated.  If
+           possible, the CA's certificate should be installed locally so it
+           can be verified.
+
+       T\bTL\bLS\bS_\b_C\bCA\bAC\bCE\bER\bRT\bT file name
+           An alias for T\bTL\bLS\bS_\b_C\bCA\bAC\bCE\bER\bRT\bTF\bFI\bIL\bLE\bE for OpenLDAP compatibility.
+
+       T\bTL\bLS\bS_\b_C\bCA\bAC\bCE\bER\bRT\bTF\bFI\bIL\bLE\bE file name
+           The path to a certificate authority bundle which contains the
+           certificates for all the Certificate Authorities the client knows
+           to be valid, e.g. _\b/_\be_\bt_\bc_\b/_\bs_\bs_\bl_\b/_\bc_\ba_\b-_\bb_\bu_\bn_\bd_\bl_\be_\b._\bp_\be_\bm.  This option is only
+           supported by the OpenLDAP libraries.  Netscape-derived LDAP
+           libraries use the same certificate database for CA and client
+           certificates (see T\bTL\bLS\bS_\b_C\bCE\bER\bRT\bT).
+
+       T\bTL\bLS\bS_\b_C\bCA\bAC\bCE\bER\bRT\bTD\bDI\bIR\bR directory
+           Similar to T\bTL\bLS\bS_\b_C\bCA\bAC\bCE\bER\bRT\bTF\bFI\bIL\bLE\bE but instead of a file, it is a directory
+           containing individual Certificate Authority certificates, e.g.
+           _\b/_\be_\bt_\bc_\b/_\bs_\bs_\bl_\b/_\bc_\be_\br_\bt_\bs.  The directory specified by T\bTL\bLS\bS_\b_C\bCA\bAC\bCE\bER\bRT\bTD\bDI\bIR\bR is
+           checked after T\bTL\bLS\bS_\b_C\bCA\bAC\bCE\bER\bRT\bTF\bFI\bIL\bLE\bE.  This option is only supported by the
+           OpenLDAP libraries.
+
+       T\bTL\bLS\bS_\b_C\bCE\bER\bRT\bT file name
+           The path to a file containing the client certificate which can be
+           used to authenticate the client to the LDAP server.  The
+           certificate type depends on the LDAP libraries used.
+
+           OpenLDAP:
+               tls_cert /etc/ssl/client_cert.pem
+
+           Netscape-derived:
+               tls_cert /var/ldap/cert7.db
+
+           When using Netscape-derived libraries, this file may also contain
+           Certificate Authority certificates.
+
+       T\bTL\bLS\bS_\b_K\bKE\bEY\bY file name
+           The path to a file containing the private key which matches the
+           certificate specified by T\bTL\bLS\bS_\b_C\bCE\bER\bRT\bT.  The private key must not be
+           password-protected.  The key type depends on the LDAP libraries
+           used.
+
+           OpenLDAP:
+               tls_key /etc/ssl/client_key.pem
+
+           Netscape-derived:
+               tls_key /var/ldap/key3.db
+
+       T\bTL\bLS\bS_\b_R\bRA\bAN\bND\bDF\bFI\bIL\bLE\bE file name
+           The T\bTL\bLS\bS_\b_R\bRA\bAN\bND\bDF\bFI\bIL\bLE\bE parameter specifies the path to an entropy source
+           for systems that lack a random device.  It is generally used in
+           conjunction with _\bp_\br_\bn_\bg_\bd or _\be_\bg_\bd.  This option is only supported by
+           the OpenLDAP libraries.
+
+       T\bTL\bLS\bS_\b_C\bCI\bIP\bPH\bHE\bER\bRS\bS cipher list
+           The T\bTL\bLS\bS_\b_C\bCI\bIP\bPH\bHE\bER\bRS\bS parameter allows the administer to restrict which
+           encryption algorithms may be used for TLS (SSL) connections.  See
+           the OpenSSL manual for a list of valid ciphers.  This option is
+           only supported by the OpenLDAP libraries.
+
+       U\bUS\bSE\bE_\b_S\bSA\bAS\bSL\bL on/true/yes/off/false/no
+           Enable U\bUS\bSE\bE_\b_S\bSA\bAS\bSL\bL for LDAP servers that support SASL authentication.
+
+       S\bSA\bAS\bSL\bL_\b_A\bAU\bUT\bTH\bH_\b_I\bID\bD identity
+           The SASL user name to use when connecting to the LDAP server.  By
+           default, s\bsu\bud\bdo\bo will use an anonymous connection.
+
+       R\bRO\bOO\bOT\bTU\bUS\bSE\bE_\b_S\bSA\bAS\bSL\bL on/true/yes/off/false/no
+           Enable R\bRO\bOO\bOT\bTU\bUS\bSE\bE_\b_S\bSA\bAS\bSL\bL to enable SASL authentication when connecting
+           to an LDAP server from a privileged process, such as s\bsu\bud\bdo\bo.
+
+       R\bRO\bOO\bOT\bTS\bSA\bAS\bSL\bL_\b_A\bAU\bUT\bTH\bH_\b_I\bID\bD identity
+           The SASL user name to use when R\bRO\bOO\bOT\bTU\bUS\bSE\bE_\b_S\bSA\bAS\bSL\bL is enabled.
+
+       S\bSA\bAS\bSL\bL_\b_S\bSE\bEC\bCP\bPR\bRO\bOP\bPS\bS none/properties
+           SASL security properties or _\bn_\bo_\bn_\be for no properties.  See the SASL
+           programmer's manual for details.
+
+       K\bKR\bRB\bB5\b5_\b_C\bCC\bCN\bNA\bAM\bME\bE file name
+           The path to the Kerberos 5 credential cache to use when
+           authenticating with the remote server.
+
+       D\bDE\bER\bRE\bEF\bF never/searching/finding/always
+           How alias dereferencing is to be performed when searching.  See the
+           _\bl_\bd_\ba_\bp_\b._\bc_\bo_\bn_\bf(4) manual for a full description of this option.
+
+       See the ldap.conf entry in the EXAMPLES section.
+
+   C\bCo\bon\bnf\bfi\big\bgu\bur\bri\bin\bng\bg n\bns\bss\bsw\bwi\bit\btc\bch\bh.\b.c\bco\bon\bnf\bf
+       Unless it is disabled at build time, s\bsu\bud\bdo\bo consults the Name Service
+       Switch file, _\b/_\be_\bt_\bc_\b/_\bn_\bs_\bs_\bw_\bi_\bt_\bc_\bh_\b._\bc_\bo_\bn_\bf, to specify the _\bs_\bu_\bd_\bo_\be_\br_\bs search order.
+       Sudo looks for a line beginning with sudoers: and uses this to
+       determine the search order.  Note that s\bsu\bud\bdo\bo does not stop searching
+       after the first match and later matches take precedence over earlier
+       ones.
+
+       The following sources are recognized:
+
+           files       read sudoers from F</etc/sudoers>
+           ldap        read sudoers from LDAP
+
+       In addition, the entry [NOTFOUND=return] will short-circuit the search
+       if the user was not found in the preceding source.
+
+       To consult LDAP first followed by the local sudoers file (if it
+       exists), use:
+
+           sudoers: ldap files
+
+       The local _\bs_\bu_\bd_\bo_\be_\br_\bs file can be ignored completely by using:
+
+           sudoers: ldap
+
+       If the _\b/_\be_\bt_\bc_\b/_\bn_\bs_\bs_\bw_\bi_\bt_\bc_\bh_\b._\bc_\bo_\bn_\bf file is not present or there is no sudoers
+       line, the following default is assumed:
+
+           sudoers: files
+
+       Note that _\b/_\be_\bt_\bc_\b/_\bn_\bs_\bs_\bw_\bi_\bt_\bc_\bh_\b._\bc_\bo_\bn_\bf is supported even when the underlying
+       operating system does not use an nsswitch.conf file.
+
+   C\bCo\bon\bnf\bfi\big\bgu\bur\bri\bin\bng\bg n\bne\bet\bts\bsv\bvc\bc.\b.c\bco\bon\bnf\bf
+       On AIX systems, the _\b/_\be_\bt_\bc_\b/_\bn_\be_\bt_\bs_\bv_\bc_\b._\bc_\bo_\bn_\bf file is consulted instead of
+       _\b/_\be_\bt_\bc_\b/_\bn_\bs_\bs_\bw_\bi_\bt_\bc_\bh_\b._\bc_\bo_\bn_\bf.  s\bsu\bud\bdo\bo simply treats _\bn_\be_\bt_\bs_\bv_\bc_\b._\bc_\bo_\bn_\bf as a variant of
+       _\bn_\bs_\bs_\bw_\bi_\bt_\bc_\bh_\b._\bc_\bo_\bn_\bf; information in the previous section unrelated to the
+       file format itself still applies.
+
+       To consult LDAP first followed by the local sudoers file (if it
+       exists), use:
+
+           sudoers = ldap, files
+
+       The local _\bs_\bu_\bd_\bo_\be_\br_\bs file can be ignored completely by using:
+
+           sudoers = ldap
+
+       To treat LDAP as authoratative and only use the local sudoers file if
+       the user is not present in LDAP, use:
+
+           sudoers = ldap = auth, files
+
+       Note that in the above example, the auth qualfier only affects user
+       lookups; both LDAP and _\bs_\bu_\bd_\bo_\be_\br_\bs will be queried for Defaults entries.
+
+       If the _\b/_\be_\bt_\bc_\b/_\bn_\be_\bt_\bs_\bv_\bc_\b._\bc_\bo_\bn_\bf file is not present or there is no sudoers
+       line, the following default is assumed:
+
+           sudoers = files
+
+F\bFI\bIL\bLE\bES\bS
+       _\b/_\be_\bt_\bc_\b/_\bl_\bd_\ba_\bp_\b._\bc_\bo_\bn_\bf          LDAP configuration file
+
+       _\b/_\be_\bt_\bc_\b/_\bn_\bs_\bs_\bw_\bi_\bt_\bc_\bh_\b._\bc_\bo_\bn_\bf      determines sudoers source order
+
+       _\b/_\be_\bt_\bc_\b/_\bn_\be_\bt_\bs_\bv_\bc_\b._\bc_\bo_\bn_\bf        determines sudoers source order on AIX
+
+E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
+   E\bEx\bxa\bam\bmp\bpl\ble\be l\bld\bda\bap\bp.\b.c\bco\bon\bnf\bf
+         # Either specify one or more URIs or one or more host:port pairs.
+         # If neither is specified sudo will default to localhost, port 389.
+         #
+         #host          ldapserver
+         #host          ldapserver1 ldapserver2:390
+         #
+         # Default port if host is specified without one, defaults to 389.
+         #port          389
+         #
+         # URI will override the host and port settings.
+         uri            ldap://ldapserver
+         #uri            ldaps://secureldapserver
+         #uri            ldaps://secureldapserver ldap://ldapserver
+         #
+         # The amount of time, in seconds, to wait while trying to connect to
+         # an LDAP server.
+         bind_timelimit 30
+         #
+         # The amount of time, in seconds, to wait while performing an LDAP query.
+         timelimit 30
+         #
+         # Must be set or sudo will ignore LDAP; may be specified multiple times.
+         sudoers_base   ou=SUDOers,dc=example,dc=com
+         #
+         # verbose sudoers matching from ldap
+         #sudoers_debug 2
+         #
+         # Enable support for time-based entries in sudoers.
+         #sudoers_timed yes
+         #
+         # optional proxy credentials
+         #binddn        <who to search as>
+         #bindpw        <password>
+         #rootbinddn    <who to search as, uses /etc/ldap.secret for bindpw>
+         #
+         # LDAP protocol version, defaults to 3
+         #ldap_version 3
+         #
+         # Define if you want to use an encrypted LDAP connection.
+         # Typically, you must also set the port to 636 (ldaps).
+         #ssl on
+         #
+         # Define if you want to use port 389 and switch to
+         # encryption before the bind credentials are sent.
+         # Only supported by LDAP servers that support the start_tls
+         # extension such as OpenLDAP.
+         #ssl start_tls
+         #
+         # Additional TLS options follow that allow tweaking of the
+         # SSL/TLS connection.
+         #
+         #tls_checkpeer yes # verify server SSL certificate
+         #tls_checkpeer no  # ignore server SSL certificate
+         #
+         # If you enable tls_checkpeer, specify either tls_cacertfile
+         # or tls_cacertdir.  Only supported when using OpenLDAP.
+         #
+         #tls_cacertfile /etc/certs/trusted_signers.pem
+         #tls_cacertdir  /etc/certs
+         #
+         # For systems that don't have /dev/random
+         # use this along with PRNGD or EGD.pl to seed the
+         # random number pool to generate cryptographic session keys.
+         # Only supported when using OpenLDAP.
+         #
+         #tls_randfile /etc/egd-pool
+         #
+         # You may restrict which ciphers are used.  Consult your SSL
+         # documentation for which options go here.
+         # Only supported when using OpenLDAP.
+         #
+         #tls_ciphers <cipher-list>
+         #
+         # Sudo can provide a client certificate when communicating to
+         # the LDAP server.
+         # Tips:
+         #   * Enable both lines at the same time.
+         #   * Do not password protect the key file.
+         #   * Ensure the keyfile is only readable by root.
+         #
+         # For OpenLDAP:
+         #tls_cert /etc/certs/client_cert.pem
+         #tls_key  /etc/certs/client_key.pem
+         #
+         # For SunONE or iPlanet LDAP, tls_cert and tls_key may specify either
+         # a directory, in which case the files in the directory must have the
+         # default names (e.g. cert8.db and key4.db), or the path to the cert
+         # and key files themselves.  However, a bug in version 5.0 of the LDAP
+         # SDK will prevent specific file names from working.  For this reason
+         # it is suggested that tls_cert and tls_key be set to a directory,
+         # not a file name.
+         #
+         # The certificate database specified by tls_cert may contain CA certs
+         # and/or the client's cert.  If the client's cert is included, tls_key
+         # should be specified as well.
+         # For backward compatibility, "sslpath" may be used in place of tls_cert.
+         #tls_cert /var/ldap
+         #tls_key /var/ldap
+         #
+         # If using SASL authentication for LDAP (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
+
+   S\bSu\bud\bdo\bo s\bsc\bch\bhe\bem\bma\ba f\bfo\bor\br O\bOp\bpe\ben\bnL\bLD\bDA\bAP\bP
+       The following schema, in OpenLDAP format, is included with s\bsu\bud\bdo\bo source
+       and binary distributions as _\bs_\bc_\bh_\be_\bm_\ba_\b._\bO_\bp_\be_\bn_\bL_\bD_\bA_\bP.  Simply copy it to the
+       schema directory (e.g. _\b/_\be_\bt_\bc_\b/_\bo_\bp_\be_\bn_\bl_\bd_\ba_\bp_\b/_\bs_\bc_\bh_\be_\bm_\ba), add the proper include
+       line in slapd.conf and restart s\bsl\bla\bap\bpd\bd.
+
+        attributetype ( 1.3.6.1.4.1.15953.9.1.1
+           NAME 'sudoUser'
+           DESC 'User(s) who may  run sudo'
+           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 'sudoHost'
+           DESC 'Host(s) who may run sudo'
+           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 'sudoCommand'
+           DESC 'Command(s) to be executed by sudo'
+           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 'sudoRunAs'
+           DESC 'User(s) impersonated by sudo'
+           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 'sudoOption'
+           DESC 'Options(s) followed by sudo'
+           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 'sudoRunAsUser'
+           DESC 'User(s) impersonated by sudo'
+           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 'sudoRunAsGroup'
+           DESC 'Group(s) impersonated by sudo'
+           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 'sudoNotBefore'
+           DESC 'Start of time interval for which the entry is valid'
+           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 'sudoNotAfter'
+           DESC 'End of time interval for which the entry is valid'
+           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 'sudoOrder'
+            DESC 'an integer to order the sudoRole entries'
+            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 'sudoRole' SUP top STRUCTURAL
+           DESC 'Sudoer Entries'
+           MUST ( cn )
+           MAY ( sudoUser $ sudoHost $ sudoCommand $ sudoRunAs $ sudoRunAsUser $
+                 sudoRunAsGroup $ sudoOption $ sudoNotBefore $ sudoNotAfter $
+                 sudoOrder $ description )
+           )
+
+S\bSE\bEE\bE A\bAL\bLS\bSO\bO
+       _\bl_\bd_\ba_\bp_\b._\bc_\bo_\bn_\bf(4), _\bs_\bu_\bd_\bo_\be_\br_\bs(4)
+
+C\bCA\bAV\bVE\bEA\bAT\bTS\bS
+       Note that there are differences in the way that LDAP-based _\bs_\bu_\bd_\bo_\be_\br_\bs is
+       parsed compared to file-based _\bs_\bu_\bd_\bo_\be_\br_\bs.  See the "Differences between
+       LDAP and non-LDAP sudoers" section for more information.
+
+B\bBU\bUG\bGS\bS
+       If you feel you have found a bug in s\bsu\bud\bdo\bo, please submit a bug report at
+       http://www.sudo.ws/sudo/bugs/
+
+S\bSU\bUP\bPP\bPO\bOR\bRT\bT
+       Limited free support is available via the sudo-users mailing list, see
+       http://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or search
+       the archives.
+
+D\bDI\bIS\bSC\bCL\bLA\bAI\bIM\bME\bER\bR
+       s\bsu\bud\bdo\bo is provided ``AS IS'' and any express or implied warranties,
+       including, but not limited to, the implied warranties of
+       merchantability and fitness for a particular purpose are disclaimed.
+       See the LICENSE file distributed with s\bsu\bud\bdo\bo or
+       http://www.sudo.ws/sudo/license.html for complete details.
+
+
+
+1.8.5                           March 14, 2012                 SUDOERS.LDAP(4)