]> git.sur5r.net Git - openldap/blob - doc/man/man8/slapacl.8
Sync with HEAD
[openldap] / doc / man / man8 / slapacl.8
1 .TH SLAPACL 8C "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 2004-2006 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4 .SH NAME
5 slapacl \- Check access to a list of attributes.
6 .SH SYNOPSIS
7 .B SBINDIR/slapacl
8 .B \-b DN
9 .B [\-d level]
10 .B [\-D authcDN | \-U authcID]
11 .B [\-f slapd.conf]
12 .B [\-F confdir]
13 .B [\-o name[=value]
14 .B [\-u]
15 .B [\-v]
16 .B [\-X authzID | \-o authzDN=DN]
17 .B [attr[/access][:value]] [...]
18 .LP
19 .SH DESCRIPTION
20 .LP
21 .B Slapacl
22 is used to check the behavior of the slapd in verifying access to data
23 according to ACLs, as specified in 
24 .BR slapd.access (5).
25 It opens the
26 .BR slapd.conf (5)
27 configuration file, reads in the 
28 .B access
29 and
30 .B defaultaccess
31 directives, and then parses the 
32 .B attr
33 list given on the command-line; if none is given, access to the
34 .B entry
35 pseudo-attribute is tested.
36 .LP
37 .SH OPTIONS
38 .TP
39 .BI \-b " DN"
40 specify the 
41 .B DN 
42 which access is requested to; the corresponding entry is fetched 
43 from the database, and thus it must exist.
44 The DN is also used to determine what rules apply; thus, it must be
45 in the naming context of a configured database.  See also
46 .BR \-u .
47 .TP
48 .BI \-d " level"
49 enable debugging messages as defined by the specified
50 .IR level .
51 .TP
52 .BI \-D " authcDN"
53 specify a DN to be used as identity through the test session
54 when selecting appropriate
55 .B <by> 
56 clauses in access lists.
57 .TP
58 .BI \-f " slapd.conf"
59 specify an alternative
60 .BR slapd.conf (5)
61 file.
62 .TP
63 .BI \-F " confdir"
64 specify a config directory.
65 If both
66 .B -f
67 and
68 .B -F
69 are specified, the config file will be read and converted to
70 config directory format and written to the specified directory.
71 If neither option is specified, an attempt to read the
72 default config directory will be made before trying to use the default
73 config file. If a valid config directory exists then the
74 default config file is ignored.
75 .TP
76 .BI \-o " option[=value]"
77 Specify an
78 .BR option
79 with a(n optional)
80 .BR value .
81 Possible generic options/values are:
82 .LP
83 .nf
84               syslog=<subsystems>  (see `\-s' in slapd(8))
85               syslog-level=<level> (see `\-S' in slapd(8))
86               syslog-user=<user>   (see `\-l' in slapd(8))
87
88 .fi
89 .RS
90 Possible options/values specific to
91 .B slapacl
92 are:
93 .RE
94 .nf
95
96               authzDN
97               domain
98               peername
99               sasl_ssf
100               sockname
101               sockurl
102               ssf
103               tls_ssf
104               transport_ssf
105
106 .fi
107 .RS
108 See the related fields in
109 .BR slapd.access (5)
110 for details.
111 .RE
112 .TP
113 .BI \-u
114 do not fetch the entry from the database.
115 In this case, if the entry does not exist, a fake entry with the DN
116 given with the
117 .B \-b
118 option is used, with no attributes.
119 As a consequence, those rules that depend on the contents 
120 of the target object will not behave as with the real object.
121 The DN given with the
122 .B \-b
123 option is still used to select what rules apply; thus, it must be
124 in the naming context of a configured database.
125 See also
126 .BR \-b .
127 .TP
128 .BI \-U " authcID"
129 specify an ID to be mapped to a 
130 .B DN 
131 as by means of 
132 .B authz-regexp
133 or
134 .B authz-rewrite
135 rules (see 
136 .BR slapd.conf (5)
137 for details); mutually exclusive with
138 .BR \-D .
139 .TP
140 .B \-v
141 enable verbose mode.
142 .TP
143 .BI \-X " authzID"
144 specify an authorization ID to be mapped to a
145 .B DN
146 as by means of
147 .B authz-regexp
148 or
149 .B authz-rewrite
150 rules (see
151 .BR slapd.conf (5)
152 for details); mutually exclusive with \fB\-o\fP \fIauthzDN=DN\fP.
153 .SH EXAMPLES
154 The command
155 .LP
156 .nf
157 .ft tt
158         SBINDIR/slapacl -f /ETCDIR/slapd.conf -v \\
159             -U bjorn -b "o=University of Michigan,c=US" \\
160             "o/read:University of Michigan"
161
162 .ft
163 .fi
164 tests whether the user
165 .I bjorn
166 can access the attribute 
167 .I o
168 of the entry
169 .I o=University of Michigan,c=US
170 at
171 .I read
172 level.
173 .SH "SEE ALSO"
174 .BR ldap (3),
175 .BR slapd (8)
176 .BR slaptest (8)
177 .BR slapauth (8)
178 .LP
179 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
180 .SH ACKNOWLEDGEMENTS
181 .so ../Project