1 Copyright (c) 2003-2011
2 Todd C. Miller <Todd.Miller@courtesan.com>
4 Permission to use, copy, modify, and distribute this software for any
5 purpose with or without fee is hereby granted, provided that the above
6 copyright notice and this permission notice appear in all copies.
8 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 sudoers.ldap - sudo LDAP configuration
25 In addition to the standard I<sudoers> file, B<sudo> may be configured
26 via LDAP. This can be especially useful for synchronizing I<sudoers>
27 in a large, distributed environment.
29 Using LDAP for I<sudoers> has several benefits:
35 B<sudo> no longer needs to read I<sudoers> in its entirety. When
36 LDAP is used, there are only two or three LDAP queries per invocation.
37 This makes it especially fast and particularly usable in LDAP
42 B<sudo> no longer exits if there is a typo in I<sudoers>.
43 It is not possible to load LDAP data into the server that does
44 not conform to the sudoers schema, so proper syntax is guaranteed.
45 It is still possible to have typos in a user or host name, but
46 this will not prevent B<sudo> from running.
50 It is possible to specify per-entry options that override the global
51 default options. F<@sysconfdir@/sudoers> only supports default options and
52 limited options associated with user/host/commands/aliases. The
53 syntax is complicated and can be difficult for users to understand.
54 Placing the options directly in the entry is more natural.
58 The B<visudo> program is no longer needed. B<visudo> provides
59 locking and syntax checking of the F<@sysconfdir@/sudoers> file.
60 Since LDAP updates are atomic, locking is no longer necessary.
61 Because syntax is checked when the data is inserted into LDAP, there
62 is no need for a specialized tool to check syntax.
66 Another major difference between LDAP and file-based I<sudoers>
67 is that in LDAP, B<sudo>-specific Aliases are not supported.
69 For the most part, there is really no need for B<sudo>-specific
70 Aliases. Unix groups or user netgroups can be used in place of
71 User_Aliases and Runas_Aliases. Host netgroups can be used in place
72 of Host_Aliases. Since Unix groups and netgroups can also be stored
73 in LDAP there is no real need for B<sudo>-specific aliases.
75 Cmnd_Aliases are not really required either since it is possible
76 to have multiple users listed in a C<sudoRole>. Instead of defining
77 a Cmnd_Alias that is referenced by multiple users, one can create
78 a C<sudoRole> that contains the commands and assign multiple users
81 =head2 SUDOers LDAP container
83 The I<sudoers> configuration is contained in the C<ou=SUDOers> LDAP
86 Sudo first looks for the C<cn=default> entry in the SUDOers container.
87 If found, the multi-valued C<sudoOption> attribute is parsed in the
88 same manner as a global C<Defaults> line in F<@sysconfdir@/sudoers>. In
89 the following example, the C<SSH_AUTH_SOCK> variable will be preserved
90 in the environment for all users.
92 dn: cn=defaults,ou=SUDOers,dc=example,dc=com
96 description: Default sudoOption's go here
97 sudoOption: env_keep+=SSH_AUTH_SOCK
99 The equivalent of a sudoer in LDAP is a C<sudoRole>. It consists of
100 the following attributes:
106 A user name, uid (prefixed with C<'#'>), Unix group (prefixed with
107 a C<'%'>) or user netgroup (prefixed with a C<'+'>).
111 A host name, IP address, IP network, or host netgroup (prefixed
113 The special value C<ALL> will match any host.
117 A Unix command with optional command line arguments, potentially
118 including globbing characters (aka wild cards).
119 The special value C<ALL> will match any command.
120 If a command is prefixed with an exclamation point C<'!'>, the
121 user will be prohibited from running that command.
125 Identical in function to the global options described above, but
126 specific to the C<sudoRole> in which it resides.
128 =item B<sudoRunAsUser>
130 A user name or uid (prefixed with C<'#'>) that commands may be run
131 as or a Unix group (prefixed with a C<'%'>) or user netgroup (prefixed
132 with a C<'+'>) that contains a list of users that commands may be
134 The special value C<ALL> will match any user.
136 The C<sudoRunAsUser> attribute is only available in B<sudo> versions
137 1.7.0 and higher. Older versions of B<sudo> use the C<sudoRunAs>
140 =item B<sudoRunAsGroup>
142 A Unix group or gid (prefixed with C<'#'>) that commands may be run as.
143 The special value C<ALL> will match any group.
145 The C<sudoRunAsGroup> attribute is only available in B<sudo> versions
148 =item B<sudoNotBefore>
150 A timestamp in the form C<yyyymmddHHMMZ> that can be used to provide
151 a start date/time for when the C<sudoRole> will be valid. If
152 multiple C<sudoNotBefore> entries are present, the earliest is used.
153 Note that timestamps must be in Coordinated Universal Time (UTC),
154 not the local timezone.
156 The C<sudoNotBefore> attribute is only available in B<sudo> versions
157 1.7.5 and higher and must be explicitly enabled via the B<SUDOERS_TIMED>
158 option in F<@ldap_conf@>.
160 =item B<sudoNotAfter>
162 A timestamp in the form C<yyyymmddHHMMZ> that indicates an expiration
163 date/time, after which the C<sudoRole> will no longer be valid. If
164 multiple C<sudoNotBefore> entries are present, the last one is used.
165 Note that timestamps must be in Coordinated Universal Time (UTC),
166 not the local timezone.
168 The C<sudoNotAfter> attribute is only available in B<sudo> versions
169 1.7.5 and higher and must be explicitly enabled via the B<SUDOERS_TIMED>
170 option in F<@ldap_conf@>.
174 The C<sudoRole> entries retrieved from the LDAP directory have no
175 inherent order. The C<sudoOrder> attribute is an integer (or
176 floating point value for LDAP servers that support it) that is used
177 to sort the matching entries. This allows LDAP-based sudoers entries
178 to more closely mimic the behaviour of the sudoers file, where the
179 of the entries influences the result. If multiple entries match,
180 the entry with the highest C<sudoOrder> attribute is chosen. This
181 corresponds to the "last match" behavior of the sudoers file. If
182 the C<sudoOrder> attribute is not present, a value of 0 is assumed.
184 The C<sudoOrder> attribute is only available in B<sudo> versions
189 Each attribute listed above should contain a single value, but there
190 may be multiple instances of each attribute type. A C<sudoRole> must
191 contain at least one C<sudoUser>, C<sudoHost> and C<sudoCommand>.
193 The following example allows users in group wheel to run any command
194 on any host via B<sudo>:
196 dn: cn=%wheel,ou=SUDOers,dc=example,dc=com
198 objectClass: sudoRole
204 =head2 Anatomy of LDAP sudoers lookup
206 When looking up a sudoer using LDAP there are only two or three
207 LDAP queries per invocation. The first query is to parse the global
208 options. The second is to match against the user's name and the
209 groups that the user belongs to. (The special ALL tag is matched
210 in this query too.) If no match is returned for the user's name
211 and groups, a third query returns all entries containing user
212 netgroups and checks to see if the user belongs to any of them.
214 If timed entries are enabled with the B<SUDOERS_TIMED> configuration
215 directive, the LDAP queries include a subfilter that limits retrieval
216 to entries that satisfy the time constraints, if any.
218 =head2 Differences between LDAP and non-LDAP sudoers
220 There are some subtle differences in the way sudoers is handled
221 once in LDAP. Probably the biggest is that according to the RFC,
222 LDAP ordering is arbitrary and you cannot expect that Attributes
223 and Entries are returned in any specific order.
225 The order in which different entries are applied can be controlled
226 using the C<sudoOrder> attribute, but there is no way to guarantee
227 the order of attributes within a specific entry. If there are
228 conflicting command rules in an entry, the negative takes precedence.
229 This is called paranoid behavior (not necessarily the most specific
235 # Allow all commands except shell
236 johnny ALL=(root) ALL,!/bin/sh
237 # Always allows all commands because ALL is matched last
238 puddles ALL=(root) !/bin/sh,ALL
240 # LDAP equivalent of johnny
241 # Allows all commands except shell
242 dn: cn=role1,ou=Sudoers,dc=my-domain,dc=com
243 objectClass: sudoRole
249 sudoCommand: !/bin/sh
251 # LDAP equivalent of puddles
252 # Notice that even though ALL comes last, it still behaves like
253 # role1 since the LDAP code assumes the more paranoid configuration
254 dn: cn=role2,ou=Sudoers,dc=my-domain,dc=com
255 objectClass: sudoRole
260 sudoCommand: !/bin/sh
263 Another difference is that negations on the Host, User or Runas are
264 currently ignored. For example, the following attributes do not
265 behave the way one might expect.
267 # does not match all but joe
268 # rather, does not match anyone
271 # does not match all but joe
272 # rather, matches everyone including Joe
276 # does not match all but web01
277 # rather, matches all hosts including web01
281 =head2 Sudoers Schema
283 In order to use B<sudo>'s LDAP support, the B<sudo> schema must be
284 installed on your LDAP server. In addition, be sure to index the
285 'sudoUser' attribute.
287 Three versions of the schema: one for OpenLDAP servers (F<schema.OpenLDAP>),
288 one for Netscape-derived servers (F<schema.iPlanet>), and one for
289 Microsoft Active Directory (F<schema.ActiveDirectory>) may
290 be found in the B<sudo> distribution.
292 The schema for B<sudo> in OpenLDAP form is included in the L<EXAMPLES>
295 =head2 Configuring ldap.conf
297 Sudo reads the F<@ldap_conf@> file for LDAP-specific configuration.
298 Typically, this file is shared amongst different LDAP-aware clients.
299 As such, most of the settings are not B<sudo>-specific. Note that
300 B<sudo> parses F<@ldap_conf@> itself and may support options
301 that differ from those described in the L<ldap.conf(5)> manual.
303 Also note that on systems using the OpenLDAP libraries, default
304 values specified in F</etc/openldap/ldap.conf> or the user's
305 F<.ldaprc> files are not used.
307 Only those options explicitly listed in F<@ldap_conf@> as being
308 supported by B<sudo> are honored. Configuration options are listed
309 below in upper case but are parsed in a case-independent manner.
313 =item B<URI> ldap[s]://[hostname[:port]] ...
315 Specifies a whitespace-delimited list of one or more URIs describing
316 the LDAP server(s) to connect to. The I<protocol> may be either
317 B<ldap> or B<ldaps>, the latter being for servers that support TLS
318 (SSL) encryption. If no I<port> is specified, the default is port
319 389 for C<ldap://> or port 636 for C<ldaps://>. If no I<hostname>
320 is specified, B<sudo> will connect to B<localhost>. Multiple B<URI>
321 lines are treated identically to a B<URI> line containing multiple
322 entries. Only systems using the OpenSSL libraries support the
323 mixing of C<ldap://> and C<ldaps://> URIs. The Netscape-derived
324 libraries used on most commercial versions of Unix are only capable
325 of supporting one or the other.
327 =item B<HOST> name[:port] ...
329 If no B<URI> is specified, the B<HOST> parameter specifies a
330 whitespace-delimited list of LDAP servers to connect to. Each host
331 may include an optional I<port> separated by a colon (':'). The
332 B<HOST> parameter is deprecated in favor of the B<URI> specification
333 and is included for backwards compatibility.
335 =item B<PORT> port_number
337 If no B<URI> is specified, the B<PORT> parameter specifies the
338 default port to connect to on the LDAP server if a B<HOST> parameter
339 does not specify the port itself. If no B<PORT> parameter is used,
340 the default is port 389 for LDAP and port 636 for LDAP over TLS
341 (SSL). The B<PORT> parameter is deprecated in favor of the B<URI>
342 specification and is included for backwards compatibility.
344 =item B<BIND_TIMELIMIT> seconds
346 The B<BIND_TIMELIMIT> parameter specifies the amount of time, in seconds,
347 to wait while trying to connect to an LDAP server. If multiple B<URI>s or
348 B<HOST>s are specified, this is the amount of time to wait before trying
349 the next one in the list.
351 =item B<NETWORK_TIMEOUT> seconds
353 An alias for B<BIND_TIMELIMIT> for OpenLDAP compatibility.
355 =item B<TIMELIMIT> seconds
357 The B<TIMELIMIT> parameter specifies the amount of time, in seconds,
358 to wait for a response to an LDAP query.
360 =item B<TIMEOUT> seconds
362 The B<TIMEOUT> parameter specifies the amount of time, in seconds,
363 to wait for a response from the various LDAP APIs.
365 =item B<SUDOERS_BASE> base
367 The base DN to use when performing B<sudo> LDAP queries. Typically
368 this is of the form C<ou=SUDOers,dc=example,dc=com> for the domain
369 C<example.com>. Multiple B<SUDOERS_BASE> lines may be specified,
370 in which case they are queried in the order specified.
372 =item B<SUDOERS_SEARCH_FILTER> ldap_filter
374 An LDAP filter which is used to restrict the set of records returned
375 when performing a B<sudo> LDAP query. Typically, this is of the
376 form C<attribute=value> or C<(&(attribute=value)(attribute2=value2))>.
378 =item B<SUDOERS_TIMED> on/true/yes/off/false/no
380 Whether or not to evaluate the C<sudoNotBefore> and C<sudoNotAfter>
381 attributes that implement time-dependent sudoers entries.
383 =item B<SUDOERS_DEBUG> debug_level
385 This sets the debug level for B<sudo> LDAP queries. Debugging
386 information is printed to the standard error. A value of 1 results
387 in a moderate amount of debugging information. A value of 2 shows
388 the results of the matches themselves. This parameter should not
389 be set in a production environment as the extra information is
390 likely to confuse users.
394 The B<BINDDN> parameter specifies the identity, in the form of a
395 Distinguished Name (DN), to use when performing LDAP operations.
396 If not specified, LDAP operations are performed with an anonymous
397 identity. By default, most LDAP servers will allow anonymous access.
399 =item B<BINDPW> secret
401 The B<BINDPW> parameter specifies the password to use when performing
402 LDAP operations. This is typically used in conjunction with the
405 =item B<ROOTBINDDN> DN
407 The B<ROOTBINDDN> parameter specifies the identity, in the form of
408 a Distinguished Name (DN), to use when performing privileged LDAP
409 operations, such as I<sudoers> queries. The password corresponding
410 to the identity should be stored in F<@ldap_secret@>.
411 If not specified, the B<BINDDN> identity is used (if any).
413 =item B<LDAP_VERSION> number
415 The version of the LDAP protocol to use when connecting to the server.
416 The default value is protocol version 3.
418 =item B<SSL> on/true/yes/off/false/no
420 If the B<SSL> parameter is set to C<on>, C<true> or C<yes>, TLS
421 (SSL) encryption is always used when communicating with the LDAP
422 server. Typically, this involves connecting to the server on port
425 =item B<SSL> start_tls
427 If the B<SSL> parameter is set to C<start_tls>, the LDAP server
428 connection is initiated normally and TLS encryption is begun before
429 the bind credentials are sent. This has the advantage of not
430 requiring a dedicated port for encrypted communications. This
431 parameter is only supported by LDAP servers that honor the C<start_tls>
432 extension, such as the OpenLDAP server.
434 =item B<TLS_CHECKPEER> on/true/yes/off/false/no
436 If enabled, B<TLS_CHECKPEER> will cause the LDAP server's TLS
437 certificated to be verified. If the server's TLS certificate cannot
438 be verified (usually because it is signed by an unknown certificate
439 authority), B<sudo> will be unable to connect to it. If B<TLS_CHECKPEER>
440 is disabled, no check is made. Note that disabling the check creates
441 an opportunity for man-in-the-middle attacks since the server's
442 identity will not be authenticated. If possible, the CA's certificate
443 should be installed locally so it can be verified.
445 =item B<TLS_CACERT> file name
447 An alias for B<TLS_CACERTFILE> for OpenLDAP compatibility.
449 =item B<TLS_CACERTFILE> file name
451 The path to a certificate authority bundle which contains the certificates
452 for all the Certificate Authorities the client knows to be valid,
453 e.g. F</etc/ssl/ca-bundle.pem>.
454 This option is only supported by the OpenLDAP libraries.
455 Netscape-derived LDAP libraries use the same certificate
456 database for CA and client certificates (see B<TLS_CERT>).
458 =item B<TLS_CACERTDIR> directory
460 Similar to B<TLS_CACERTFILE> but instead of a file, it is a
461 directory containing individual Certificate Authority certificates,
462 e.g. F</etc/ssl/certs>.
463 The directory specified by B<TLS_CACERTDIR> is checked after
465 This option is only supported by the OpenLDAP libraries.
467 =item B<TLS_CERT> file name
469 The path to a file containing the client certificate which can
470 be used to authenticate the client to the LDAP server.
471 The certificate type depends on the LDAP libraries used.
474 C<tls_cert /etc/ssl/client_cert.pem>
477 C<tls_cert /var/ldap/cert7.db>
479 When using Netscape-derived libraries, this file may also contain
480 Certificate Authority certificates.
482 =item B<TLS_KEY> file name
484 The path to a file containing the private key which matches the
485 certificate specified by B<TLS_CERT>. The private key must not be
486 password-protected. The key type depends on the LDAP libraries
490 C<tls_key /etc/ssl/client_key.pem>
493 C<tls_key /var/ldap/key3.db>
495 =item B<TLS_RANDFILE> file name
497 The B<TLS_RANDFILE> parameter specifies the path to an entropy
498 source for systems that lack a random device. It is generally used
499 in conjunction with I<prngd> or I<egd>.
500 This option is only supported by the OpenLDAP libraries.
502 =item B<TLS_CIPHERS> cipher list
504 The B<TLS_CIPHERS> parameter allows the administer to restrict
505 which encryption algorithms may be used for TLS (SSL) connections.
506 See the OpenSSL manual for a list of valid ciphers.
507 This option is only supported by the OpenLDAP libraries.
509 =item B<USE_SASL> on/true/yes/off/false/no
511 Enable B<USE_SASL> for LDAP servers that support SASL authentication.
513 =item B<SASL_AUTH_ID> identity
515 The SASL user name to use when connecting to the LDAP server.
516 By default, B<sudo> will use an anonymous connection.
518 =item B<ROOTUSE_SASL> on/true/yes/off/false/no
520 Enable B<ROOTUSE_SASL> to enable SASL authentication when connecting
521 to an LDAP server from a privileged process, such as B<sudo>.
523 =item B<ROOTSASL_AUTH_ID> identity
525 The SASL user name to use when B<ROOTUSE_SASL> is enabled.
527 =item B<SASL_SECPROPS> none/properties
529 SASL security properties or I<none> for no properties. See the
530 SASL programmer's manual for details.
532 =item B<KRB5_CCNAME> file name
534 The path to the Kerberos 5 credential cache to use when authenticating
535 with the remote server.
539 See the C<ldap.conf> entry in the L<EXAMPLES> section.
541 =head2 Configuring nsswitch.conf
543 Unless it is disabled at build time, B<sudo> consults the Name
544 Service Switch file, F<@nsswitch_conf@>, to specify the I<sudoers>
545 search order. Sudo looks for a line beginning with C<sudoers>: and
546 uses this to determine the search order. Note that B<sudo> does
547 not stop searching after the first match and later matches take
548 precedence over earlier ones.
550 The following sources are recognized:
552 files read sudoers from F<@sysconfdir@/sudoers>
553 ldap read sudoers from LDAP
555 In addition, the entry C<[NOTFOUND=return]> will short-circuit the
556 search if the user was not found in the preceding source.
558 To consult LDAP first followed by the local sudoers file (if it
563 The local I<sudoers> file can be ignored completely by using:
567 If the F<@nsswitch_conf@> file is not present or there is no
568 sudoers line, the following default is assumed:
572 Note that F<@nsswitch_conf@> is supported even when the underlying
573 operating system does not use an nsswitch.conf file.
575 =head2 Configuring netsvc.conf
577 On AIX systems, the F<@netsvc_conf@> file is consulted instead of
578 F<@nsswitch_conf@>. B<sudo> simply treats I<netsvc.conf> as a
579 variant of I<nsswitch.conf>; information in the previous section
580 unrelated to the file format itself still applies.
582 To consult LDAP first followed by the local sudoers file (if it
585 sudoers = ldap, files
587 The local I<sudoers> file can be ignored completely by using:
591 To treat LDAP as authoratative and only use the local sudoers file
592 if the user is not present in LDAP, use:
594 sudoers = ldap = auth, files
596 Note that in the above example, the C<auth> qualfier only affects
597 user lookups; both LDAP and I<sudoers> will be queried for C<Defaults>
600 If the F<@netsvc_conf@> file is not present or there is no
601 sudoers line, the following default is assumed:
611 LDAP configuration file
613 =item F<@nsswitch_conf@>
615 determines sudoers source order
617 =item F<@netsvc_conf@>
619 determines sudoers source order on AIX
625 =head2 Example ldap.conf
627 # Either specify one or more URIs or one or more host:port pairs.
628 # If neither is specified sudo will default to localhost, port 389.
631 #host ldapserver1 ldapserver2:390
633 # Default port if host is specified without one, defaults to 389.
636 # URI will override the host and port settings.
637 uri ldap://ldapserver
638 #uri ldaps://secureldapserver
639 #uri ldaps://secureldapserver ldap://ldapserver
641 # The amount of time, in seconds, to wait while trying to connect to
645 # The amount of time, in seconds, to wait while performing an LDAP query.
648 # Must be set or sudo will ignore LDAP; may be specified multiple times.
649 sudoers_base ou=SUDOers,dc=example,dc=com
651 # verbose sudoers matching from ldap
654 # Enable support for time-based entries in sudoers.
657 # optional proxy credentials
658 #binddn <who to search as>
660 #rootbinddn <who to search as, uses /etc/ldap.secret for bindpw>
662 # LDAP protocol version, defaults to 3
665 # Define if you want to use an encrypted LDAP connection.
666 # Typically, you must also set the port to 636 (ldaps).
669 # Define if you want to use port 389 and switch to
670 # encryption before the bind credentials are sent.
671 # Only supported by LDAP servers that support the start_tls
672 # extension such as OpenLDAP.
675 # Additional TLS options follow that allow tweaking of the
676 # SSL/TLS connection.
678 #tls_checkpeer yes # verify server SSL certificate
679 #tls_checkpeer no # ignore server SSL certificate
681 # If you enable tls_checkpeer, specify either tls_cacertfile
682 # or tls_cacertdir. Only supported when using OpenLDAP.
684 #tls_cacertfile /etc/certs/trusted_signers.pem
685 #tls_cacertdir /etc/certs
687 # For systems that don't have /dev/random
688 # use this along with PRNGD or EGD.pl to seed the
689 # random number pool to generate cryptographic session keys.
690 # Only supported when using OpenLDAP.
692 #tls_randfile /etc/egd-pool
694 # You may restrict which ciphers are used. Consult your SSL
695 # documentation for which options go here.
696 # Only supported when using OpenLDAP.
698 #tls_ciphers <cipher-list>
700 # Sudo can provide a client certificate when communicating to
703 # * Enable both lines at the same time.
704 # * Do not password protect the key file.
705 # * Ensure the keyfile is only readable by root.
708 #tls_cert /etc/certs/client_cert.pem
709 #tls_key /etc/certs/client_key.pem
711 # For SunONE or iPlanet LDAP, tls_cert and tls_key may specify either
712 # a directory, in which case the files in the directory must have the
713 # default names (e.g. cert8.db and key4.db), or the path to the cert
714 # and key files themselves. However, a bug in version 5.0 of the LDAP
715 # SDK will prevent specific file names from working. For this reason
716 # it is suggested that tls_cert and tls_key be set to a directory,
719 # The certificate database specified by tls_cert may contain CA certs
720 # and/or the client's cert. If the client's cert is included, tls_key
721 # should be specified as well.
722 # For backward compatibility, "sslpath" may be used in place of tls_cert.
726 # If using SASL authentication for LDAP (OpenSSL)
728 # sasl_auth_id <SASL user name>
730 # rootsasl_auth_id <SASL user name for root access>
732 # krb5_ccname /etc/.ldapcache
734 =head2 Sudo schema for OpenLDAP
736 The following schema, in OpenLDAP format, is included with B<sudo>
737 source and binary distributions as F<schema.OpenLDAP>. Simply copy
738 it to the schema directory (e.g. F</etc/openldap/schema>), add the
739 proper C<include> line in C<slapd.conf> and restart B<slapd>.
741 attributetype ( 1.3.6.1.4.1.15953.9.1.1
743 DESC 'User(s) who may run sudo'
744 EQUALITY caseExactIA5Match
745 SUBSTR caseExactIA5SubstringsMatch
746 SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
748 attributetype ( 1.3.6.1.4.1.15953.9.1.2
750 DESC 'Host(s) who may run sudo'
751 EQUALITY caseExactIA5Match
752 SUBSTR caseExactIA5SubstringsMatch
753 SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
755 attributetype ( 1.3.6.1.4.1.15953.9.1.3
757 DESC 'Command(s) to be executed by sudo'
758 EQUALITY caseExactIA5Match
759 SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
761 attributetype ( 1.3.6.1.4.1.15953.9.1.4
763 DESC 'User(s) impersonated by sudo'
764 EQUALITY caseExactIA5Match
765 SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
767 attributetype ( 1.3.6.1.4.1.15953.9.1.5
769 DESC 'Options(s) followed by sudo'
770 EQUALITY caseExactIA5Match
771 SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
773 attributetype ( 1.3.6.1.4.1.15953.9.1.6
775 DESC 'User(s) impersonated by sudo'
776 EQUALITY caseExactIA5Match
777 SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
779 attributetype ( 1.3.6.1.4.1.15953.9.1.7
780 NAME 'sudoRunAsGroup'
781 DESC 'Group(s) impersonated by sudo'
782 EQUALITY caseExactIA5Match
783 SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
785 attributetype ( 1.3.6.1.4.1.15953.9.1.8
787 DESC 'Start of time interval for which the entry is valid'
788 EQUALITY generalizedTimeMatch
789 ORDERING generalizedTimeOrderingMatch
790 SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 )
792 attributetype ( 1.3.6.1.4.1.15953.9.1.9
794 DESC 'End of time interval for which the entry is valid'
795 EQUALITY generalizedTimeMatch
796 ORDERING generalizedTimeOrderingMatch
797 SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 )
799 attributeTypes ( 1.3.6.1.4.1.15953.9.1.10
801 DESC 'an integer to order the sudoRole entries'
802 EQUALITY integerMatch
803 ORDERING integerOrderingMatch
804 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 )
806 objectclass ( 1.3.6.1.4.1.15953.9.2.1 NAME 'sudoRole' SUP top STRUCTURAL
807 DESC 'Sudoer Entries'
809 MAY ( sudoUser $ sudoHost $ sudoCommand $ sudoRunAs $ sudoRunAsUser $
810 sudoRunAsGroup $ sudoOption $ sudoNotBefore $ sudoNotAfter $
811 sudoOrder $ description )
816 L<ldap.conf(5)>, L<sudoers(5)>
820 Note that there are differences in the way that LDAP-based I<sudoers>
821 is parsed compared to file-based I<sudoers>. See the L<Differences
822 between LDAP and non-LDAP sudoers> section for more information.
826 If you feel you have found a bug in B<sudo>, please submit a bug report
827 at http://www.sudo.ws/sudo/bugs/
831 Limited free support is available via the sudo-users mailing list,
832 see http://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or
837 B<sudo> is provided ``AS IS'' and any express or implied warranties,
838 including, but not limited to, the implied warranties of merchantability
839 and fitness for a particular purpose are disclaimed. See the LICENSE
840 file distributed with B<sudo> or http://www.sudo.ws/sudo/license.html
841 for complete details.