source: vendor/current/docs/manpages/smbcacls.1

Last change on this file was 989, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.7

File size: 8.9 KB
Line 
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"
31smbcacls \- Set or get ACLs on an NT file or directory names
32.SH "SYNOPSIS"
33.HP \w'\ 'u
34smbcacls {//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
37This tool is part of the
38\fBsamba\fR(7)
39suite\&.
40.PP
41The
42smbcacls
43program 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
46The following options are available to the
47smbcacls
48program\&. The format of ACLs is described in the section ACL FORMAT
49.PP
50\-a|\-\-add acl
51.RS 4
52Add the entries specified to the ACL\&. Existing access control entries are unchanged\&.
53.RE
54.PP
55\-M|\-\-modify acl
56.RS 4
57Modify 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
62Delete 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
67This 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
72The owner of a file or directory can be changed to the name given using the
73\fI\-C\fR
74option\&. 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
76This command is a shortcut for \-M OWNER:name\&.
77.RE
78.PP
79\-G|\-\-chgrp name
80.RS 4
81The group owner of a file or directory can be changed to the name given using the
82\fI\-G\fR
83option\&. 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
85This command is a shortcut for \-M GROUP:name\&.
86.RE
87.PP
88\-I|\-\-inherit allow|remove|copy
89.RS 4
90Set or unset the windows "Allow inheritable permissions" check box using the
91\fI\-I\fR
92option\&. 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
97This 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
102This 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
107Don\*(Aqt actually do anything, only validate the correctness of the arguments\&.
108.RE
109.PP
110\-\-query\-security\-info FLAGS
111.RS 4
112The security\-info flags for queries\&.
113.RE
114.PP
115\-\-set\-security\-info FLAGS
116.RS 4
117The security\-info flags for queries\&.
118.RE
119.PP
120\-\-sddl
121.RS 4
122Output and input acls in sddl format\&.
123.RE
124.PP
125\-\-domain\-sid SID
126.RS 4
127SID used for sddl processing\&.
128.RE
129.SH "ACL FORMAT"
130.PP
131The 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
138REVISION:<revision number>
139OWNER:<sid or name>
140GROUP:<sid or name>
141ACL:<sid or name>:<type>/<flags>/<mask>
142.fi
143.if n \{\
144.RE
145.\}
146.PP
147The 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
149The 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
151ACEs 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
153The 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
201At present, flags can only be specified as decimal or hexadecimal values\&.
202.PP
203The 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
279The 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
318The
319smbcacls
320program 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
322If the operation succeeded, smbcacls returns and exit status of 0\&. If
323smbcacls
324couldn\*(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
327This man page is correct for version 4 of the Samba suite\&.
328.SH "AUTHOR"
329.PP
330The 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
332smbcacls
333was written by Andrew Tridgell and Tim Potter\&.
334.PP
335The 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\&.
Note: See TracBrowser for help on using the repository browser.