1 | '\" t
|
---|
2 | .\" Title: smbcacls
|
---|
3 | .\" Author: [see the "AUTHOR" section]
|
---|
4 | .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
---|
5 | .\" Date: 10/25/2016
|
---|
6 | .\" Manual: User Commands
|
---|
7 | .\" Source: Samba 4.4
|
---|
8 | .\" Language: English
|
---|
9 | .\"
|
---|
10 | .TH "SMBCACLS" "1" "10/25/2016" "Samba 4\&.4" "User Commands"
|
---|
11 | .\" -----------------------------------------------------------------
|
---|
12 | .\" * Define some portability stuff
|
---|
13 | .\" -----------------------------------------------------------------
|
---|
14 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
---|
15 | .\" http://bugs.debian.org/507673
|
---|
16 | .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
---|
17 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
---|
18 | .ie \n(.g .ds Aq \(aq
|
---|
19 | .el .ds Aq '
|
---|
20 | .\" -----------------------------------------------------------------
|
---|
21 | .\" * set default formatting
|
---|
22 | .\" -----------------------------------------------------------------
|
---|
23 | .\" disable hyphenation
|
---|
24 | .nh
|
---|
25 | .\" disable justification (adjust text to left margin only)
|
---|
26 | .ad l
|
---|
27 | .\" -----------------------------------------------------------------
|
---|
28 | .\" * MAIN CONTENT STARTS HERE *
|
---|
29 | .\" -----------------------------------------------------------------
|
---|
30 | .SH "NAME"
|
---|
31 | smbcacls \- Set or get ACLs on an NT file or directory names
|
---|
32 | .SH "SYNOPSIS"
|
---|
33 | .HP \w'\ 'u
|
---|
34 | smbcacls {//server/share} {/filename} [\-D|\-\-delete\ acl] [\-M|\-\-modify\ acl] [\-a|\-\-add\ acl] [\-S|\-\-set\ acl] [\-C|\-\-chown\ name] [\-G|\-\-chgrp\ name] [\-I\ allow|remove|copy] [\-\-numeric] [\-t] [\-U\ username] [\-d] [\-e] [\-m|\-\-max\-protocol\ LEVEL] [\-\-query\-security\-info\ FLAGS] [\-\-set\-security\-info\ FLAGS] [\-\-sddl] [\-\-domain\-sid\ SID]
|
---|
35 | .SH "DESCRIPTION"
|
---|
36 | .PP
|
---|
37 | This tool is part of the
|
---|
38 | \fBsamba\fR(7)
|
---|
39 | suite\&.
|
---|
40 | .PP
|
---|
41 | The
|
---|
42 | smbcacls
|
---|
43 | program manipulates NT Access Control Lists (ACLs) on SMB file shares\&. An ACL is comprised zero or more Access Control Entries (ACEs), which define access restrictions for a specific user or group\&.
|
---|
44 | .SH "OPTIONS"
|
---|
45 | .PP
|
---|
46 | The following options are available to the
|
---|
47 | smbcacls
|
---|
48 | program\&. The format of ACLs is described in the section ACL FORMAT
|
---|
49 | .PP
|
---|
50 | \-a|\-\-add acl
|
---|
51 | .RS 4
|
---|
52 | Add the entries specified to the ACL\&. Existing access control entries are unchanged\&.
|
---|
53 | .RE
|
---|
54 | .PP
|
---|
55 | \-M|\-\-modify acl
|
---|
56 | .RS 4
|
---|
57 | Modify the mask value (permissions) for the ACEs specified on the command line\&. An error will be printed for each ACE specified that was not already present in the object\*(Aqs ACL\&.
|
---|
58 | .RE
|
---|
59 | .PP
|
---|
60 | \-D|\-\-delete acl
|
---|
61 | .RS 4
|
---|
62 | Delete any ACEs specified on the command line\&. An error will be printed for each ACE specified that was not already present in the object\*(Aqs ACL\&.
|
---|
63 | .RE
|
---|
64 | .PP
|
---|
65 | \-S|\-\-set acl
|
---|
66 | .RS 4
|
---|
67 | This command sets the ACL on the object with only what is specified on the command line\&. Any existing ACL is erased\&. Note that the ACL specified must contain at least a revision, type, owner and group for the call to succeed\&.
|
---|
68 | .RE
|
---|
69 | .PP
|
---|
70 | \-C|\-\-chown name
|
---|
71 | .RS 4
|
---|
72 | The owner of a file or directory can be changed to the name given using the
|
---|
73 | \fI\-C\fR
|
---|
74 | option\&. The name can be a sid in the form S\-1\-x\-y\-z or a name resolved against the server specified in the first argument\&.
|
---|
75 | .sp
|
---|
76 | This command is a shortcut for \-M OWNER:name\&.
|
---|
77 | .RE
|
---|
78 | .PP
|
---|
79 | \-G|\-\-chgrp name
|
---|
80 | .RS 4
|
---|
81 | The group owner of a file or directory can be changed to the name given using the
|
---|
82 | \fI\-G\fR
|
---|
83 | option\&. The name can be a sid in the form S\-1\-x\-y\-z or a name resolved against the server specified n the first argument\&.
|
---|
84 | .sp
|
---|
85 | This command is a shortcut for \-M GROUP:name\&.
|
---|
86 | .RE
|
---|
87 | .PP
|
---|
88 | \-I|\-\-inherit allow|remove|copy
|
---|
89 | .RS 4
|
---|
90 | Set or unset the windows "Allow inheritable permissions" check box using the
|
---|
91 | \fI\-I\fR
|
---|
92 | option\&. To set the check box pass allow\&. To unset the check box pass either remove or copy\&. Remove will remove all inherited acls\&. Copy will copy all the inherited acls\&.
|
---|
93 | .RE
|
---|
94 | .PP
|
---|
95 | \-\-numeric
|
---|
96 | .RS 4
|
---|
97 | This option displays all ACL information in numeric format\&. The default is to convert SIDs to names and ACE types and masks to a readable string format\&.
|
---|
98 | .RE
|
---|
99 | .PP
|
---|
100 | \-m|\-\-max\-protocol PROTOCOL_NAME
|
---|
101 | .RS 4
|
---|
102 | This allows the user to select the highest SMB protocol level that smbcacls will use to connect to the server\&. By default this is set to NT1, which is the highest available SMB1 protocol\&. To connect using SMB2 or SMB3 protocol, use the strings SMB2 or SMB3 respectively\&. Note that to connect to a Windows 2012 server with encrypted transport selecting a max\-protocol of SMB3 is required\&.
|
---|
103 | .RE
|
---|
104 | .PP
|
---|
105 | \-t|\-\-test\-args
|
---|
106 | .RS 4
|
---|
107 | Don\*(Aqt actually do anything, only validate the correctness of the arguments\&.
|
---|
108 | .RE
|
---|
109 | .PP
|
---|
110 | \-\-query\-security\-info FLAGS
|
---|
111 | .RS 4
|
---|
112 | The security\-info flags for queries\&.
|
---|
113 | .RE
|
---|
114 | .PP
|
---|
115 | \-\-set\-security\-info FLAGS
|
---|
116 | .RS 4
|
---|
117 | The security\-info flags for queries\&.
|
---|
118 | .RE
|
---|
119 | .PP
|
---|
120 | \-\-sddl
|
---|
121 | .RS 4
|
---|
122 | Output and input acls in sddl format\&.
|
---|
123 | .RE
|
---|
124 | .PP
|
---|
125 | \-\-domain\-sid SID
|
---|
126 | .RS 4
|
---|
127 | SID used for sddl processing\&.
|
---|
128 | .RE
|
---|
129 | .SH "ACL FORMAT"
|
---|
130 | .PP
|
---|
131 | The format of an ACL is one or more entries separated by either commas or newlines\&. An ACL entry is one of the following:
|
---|
132 | .PP
|
---|
133 | .if n \{\
|
---|
134 | .RS 4
|
---|
135 | .\}
|
---|
136 | .nf
|
---|
137 |
|
---|
138 | REVISION:<revision number>
|
---|
139 | OWNER:<sid or name>
|
---|
140 | GROUP:<sid or name>
|
---|
141 | ACL:<sid or name>:<type>/<flags>/<mask>
|
---|
142 | .fi
|
---|
143 | .if n \{\
|
---|
144 | .RE
|
---|
145 | .\}
|
---|
146 | .PP
|
---|
147 | The revision of the ACL specifies the internal Windows NT ACL revision for the security descriptor\&. If not specified it defaults to 1\&. Using values other than 1 may cause strange behaviour\&.
|
---|
148 | .PP
|
---|
149 | The owner and group specify the owner and group sids for the object\&. If a SID in the format S\-1\-x\-y\-z is specified this is used, otherwise the name specified is resolved using the server on which the file or directory resides\&.
|
---|
150 | .PP
|
---|
151 | ACEs are specified with an "ACL:" prefix, and define permissions granted to an SID\&. The SID again can be specified in S\-1\-x\-y\-z format or as a name in which case it is resolved against the server on which the file or directory resides\&. The type, flags and mask values determine the type of access granted to the SID\&.
|
---|
152 | .PP
|
---|
153 | The type can be either ALLOWED or DENIED to allow/deny access to the SID\&. The flags values are generally zero for file ACEs and either 9 or 2 for directory ACEs\&. Some common flags are:
|
---|
154 | .sp
|
---|
155 | .RS 4
|
---|
156 | .ie n \{\
|
---|
157 | \h'-04'\(bu\h'+03'\c
|
---|
158 | .\}
|
---|
159 | .el \{\
|
---|
160 | .sp -1
|
---|
161 | .IP \(bu 2.3
|
---|
162 | .\}
|
---|
163 | \fB#define SEC_ACE_FLAG_OBJECT_INHERIT 0x1\fR
|
---|
164 | .RE
|
---|
165 | .sp
|
---|
166 | .RS 4
|
---|
167 | .ie n \{\
|
---|
168 | \h'-04'\(bu\h'+03'\c
|
---|
169 | .\}
|
---|
170 | .el \{\
|
---|
171 | .sp -1
|
---|
172 | .IP \(bu 2.3
|
---|
173 | .\}
|
---|
174 | \fB#define SEC_ACE_FLAG_CONTAINER_INHERIT 0x2\fR
|
---|
175 | .RE
|
---|
176 | .sp
|
---|
177 | .RS 4
|
---|
178 | .ie n \{\
|
---|
179 | \h'-04'\(bu\h'+03'\c
|
---|
180 | .\}
|
---|
181 | .el \{\
|
---|
182 | .sp -1
|
---|
183 | .IP \(bu 2.3
|
---|
184 | .\}
|
---|
185 | \fB#define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT 0x4\fR
|
---|
186 | .RE
|
---|
187 | .sp
|
---|
188 | .RS 4
|
---|
189 | .ie n \{\
|
---|
190 | \h'-04'\(bu\h'+03'\c
|
---|
191 | .\}
|
---|
192 | .el \{\
|
---|
193 | .sp -1
|
---|
194 | .IP \(bu 2.3
|
---|
195 | .\}
|
---|
196 | \fB#define SEC_ACE_FLAG_INHERIT_ONLY 0x8\fR
|
---|
197 | .RE
|
---|
198 | .sp
|
---|
199 | .RE
|
---|
200 | .PP
|
---|
201 | At present, flags can only be specified as decimal or hexadecimal values\&.
|
---|
202 | .PP
|
---|
203 | The mask is a value which expresses the access right granted to the SID\&. It can be given as a decimal or hexadecimal value, or by using one of the following text strings which map to the NT file permissions of the same name\&.
|
---|
204 | .sp
|
---|
205 | .RS 4
|
---|
206 | .ie n \{\
|
---|
207 | \h'-04'\(bu\h'+03'\c
|
---|
208 | .\}
|
---|
209 | .el \{\
|
---|
210 | .sp -1
|
---|
211 | .IP \(bu 2.3
|
---|
212 | .\}
|
---|
213 | \fIR\fR
|
---|
214 | \- Allow read access
|
---|
215 | .RE
|
---|
216 | .sp
|
---|
217 | .RS 4
|
---|
218 | .ie n \{\
|
---|
219 | \h'-04'\(bu\h'+03'\c
|
---|
220 | .\}
|
---|
221 | .el \{\
|
---|
222 | .sp -1
|
---|
223 | .IP \(bu 2.3
|
---|
224 | .\}
|
---|
225 | \fIW\fR
|
---|
226 | \- Allow write access
|
---|
227 | .RE
|
---|
228 | .sp
|
---|
229 | .RS 4
|
---|
230 | .ie n \{\
|
---|
231 | \h'-04'\(bu\h'+03'\c
|
---|
232 | .\}
|
---|
233 | .el \{\
|
---|
234 | .sp -1
|
---|
235 | .IP \(bu 2.3
|
---|
236 | .\}
|
---|
237 | \fIX\fR
|
---|
238 | \- Execute permission on the object
|
---|
239 | .RE
|
---|
240 | .sp
|
---|
241 | .RS 4
|
---|
242 | .ie n \{\
|
---|
243 | \h'-04'\(bu\h'+03'\c
|
---|
244 | .\}
|
---|
245 | .el \{\
|
---|
246 | .sp -1
|
---|
247 | .IP \(bu 2.3
|
---|
248 | .\}
|
---|
249 | \fID\fR
|
---|
250 | \- Delete the object
|
---|
251 | .RE
|
---|
252 | .sp
|
---|
253 | .RS 4
|
---|
254 | .ie n \{\
|
---|
255 | \h'-04'\(bu\h'+03'\c
|
---|
256 | .\}
|
---|
257 | .el \{\
|
---|
258 | .sp -1
|
---|
259 | .IP \(bu 2.3
|
---|
260 | .\}
|
---|
261 | \fIP\fR
|
---|
262 | \- Change permissions
|
---|
263 | .RE
|
---|
264 | .sp
|
---|
265 | .RS 4
|
---|
266 | .ie n \{\
|
---|
267 | \h'-04'\(bu\h'+03'\c
|
---|
268 | .\}
|
---|
269 | .el \{\
|
---|
270 | .sp -1
|
---|
271 | .IP \(bu 2.3
|
---|
272 | .\}
|
---|
273 | \fIO\fR
|
---|
274 | \- Take ownership
|
---|
275 | .RE
|
---|
276 | .sp
|
---|
277 | .RE
|
---|
278 | .PP
|
---|
279 | The following combined permissions can be specified:
|
---|
280 | .sp
|
---|
281 | .RS 4
|
---|
282 | .ie n \{\
|
---|
283 | \h'-04'\(bu\h'+03'\c
|
---|
284 | .\}
|
---|
285 | .el \{\
|
---|
286 | .sp -1
|
---|
287 | .IP \(bu 2.3
|
---|
288 | .\}
|
---|
289 | \fIREAD\fR
|
---|
290 | \- Equivalent to \*(AqRX\*(Aq permissions
|
---|
291 | .RE
|
---|
292 | .sp
|
---|
293 | .RS 4
|
---|
294 | .ie n \{\
|
---|
295 | \h'-04'\(bu\h'+03'\c
|
---|
296 | .\}
|
---|
297 | .el \{\
|
---|
298 | .sp -1
|
---|
299 | .IP \(bu 2.3
|
---|
300 | .\}
|
---|
301 | \fICHANGE\fR
|
---|
302 | \- Equivalent to \*(AqRXWD\*(Aq permissions
|
---|
303 | .RE
|
---|
304 | .sp
|
---|
305 | .RS 4
|
---|
306 | .ie n \{\
|
---|
307 | \h'-04'\(bu\h'+03'\c
|
---|
308 | .\}
|
---|
309 | .el \{\
|
---|
310 | .sp -1
|
---|
311 | .IP \(bu 2.3
|
---|
312 | .\}
|
---|
313 | \fIFULL\fR
|
---|
314 | \- Equivalent to \*(AqRWXDPO\*(Aq permissions
|
---|
315 | .RE
|
---|
316 | .SH "EXIT STATUS"
|
---|
317 | .PP
|
---|
318 | The
|
---|
319 | smbcacls
|
---|
320 | program sets the exit status depending on the success or otherwise of the operations performed\&. The exit status may be one of the following values\&.
|
---|
321 | .PP
|
---|
322 | If the operation succeeded, smbcacls returns and exit status of 0\&. If
|
---|
323 | smbcacls
|
---|
324 | couldn\*(Aqt connect to the specified server, or there was an error getting or setting the ACLs, an exit status of 1 is returned\&. If there was an error parsing any command line arguments, an exit status of 2 is returned\&.
|
---|
325 | .SH "VERSION"
|
---|
326 | .PP
|
---|
327 | This man page is correct for version 4 of the Samba suite\&.
|
---|
328 | .SH "AUTHOR"
|
---|
329 | .PP
|
---|
330 | The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.
|
---|
331 | .PP
|
---|
332 | smbcacls
|
---|
333 | was written by Andrew Tridgell and Tim Potter\&.
|
---|
334 | .PP
|
---|
335 | The conversion to DocBook for Samba 2\&.2 was done by Gerald Carter\&. The conversion to DocBook XML 4\&.2 for Samba 3\&.0 was done by Alexander Bokovoy\&.
|
---|