source: vendor/current/docs/manpages/sharesec.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: 6.3 KB
Line 
1'\" t
2.\" Title: sharesec
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 "SHARESEC" "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"
31sharesec \- Set or get share ACLs
32.SH "SYNOPSIS"
33.HP \w'\ 'u
34sharesec {sharename} [\-r,\ \-\-remove=ACL] [\-m,\ \-\-modify=ACL] [\-a,\ \-\-add=ACL] [\-R,\ \-\-replace=ACLs] [\-D,\ \-\-delete] [\-v,\ \-\-view] [\-\-view\-all] [\-M,\ \-\-machine\-sid] [\-F,\ \-\-force] [\-d,\ \-\-debuglevel=DEBUGLEVEL] [\-s,\ \-\-configfile=CONFIGFILE] [\-l,\ \-\-log\-basename=LOGFILEBASE] [\-\-version] [\-?,\ \-\-help] [\-\-usage] [\-S,\ \-\-setsddl=STRING] [\-V,\ \-\-viewsddl]
35.SH "DESCRIPTION"
36.PP
37This tool is part of the
38\fBsamba\fR(7)
39suite\&.
40.PP
41The
42sharesec
43program manipulates share permissions on SMB file shares\&.
44.SH "OPTIONS"
45.PP
46The following options are available to the
47sharesec
48program\&. The format of ACLs is described in the section ACL FORMAT
49.PP
50\-a|\-\-add=ACL
51.RS 4
52Add the ACEs specified to the ACL list\&.
53.RE
54.PP
55\-D|\-\-delete
56.RS 4
57Delete the entire security descriptor\&.
58.RE
59.PP
60\-F|\-\-force
61.RS 4
62Force storing the ACL\&.
63.RE
64.PP
65\-m|\-\-modify=ACL
66.RS 4
67Modify existing ACEs\&.
68.RE
69.PP
70\-M|\-\-machine\-sid
71.RS 4
72Initialize the machine SID\&.
73.RE
74.PP
75\-r|\-\-remove=ACL
76.RS 4
77Remove ACEs\&.
78.RE
79.PP
80\-R|\-\-replace=ACLS
81.RS 4
82Overwrite an existing share permission ACL\&.
83.RE
84.PP
85\-v|\-\-view
86.RS 4
87List a share acl
88.RE
89.PP
90\-\-view\-all
91.RS 4
92List all share acls
93.RE
94.PP
95\-S|\-\-setsddl=STRING
96.RS 4
97Set security descriptor by providing ACL in SDDL format\&.
98.RE
99.PP
100\-V|\-\-viewsddl
101.RS 4
102List a share acl in SDDL format\&.
103.RE
104.SH "ACL FORMAT"
105.PP
106The format of an ACL is one or more ACL entries separated by either commas or newlines\&. An ACL entry is one of the following:
107.PP
108.if n \{\
109.RS 4
110.\}
111.nf
112 REVISION:<revision number>
113 OWNER:<sid or name>
114 GROUP:<sid or name>
115 ACL:<sid or name>:<type>/<flags>/<mask>
116
117.fi
118.if n \{\
119.RE
120.\}
121.PP
122The 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\&.
123.PP
124The owner and group specify the owner and group SIDs for the object\&. Share ACLs do not specify an owner or a group, so these fields are empty\&.
125.PP
126ACLs specify permissions granted to the SID\&. This SID 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\&.
127.PP
128The type can be either ALLOWED or DENIED to allow/deny access to the SID\&. The flags values are generally zero for share ACLs\&.
129.PP
130The 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\&.
131.sp
132.RS 4
133.ie n \{\
134\h'-04'\(bu\h'+03'\c
135.\}
136.el \{\
137.sp -1
138.IP \(bu 2.3
139.\}
140\fIR\fR
141\- Allow read access
142.RE
143.sp
144.RS 4
145.ie n \{\
146\h'-04'\(bu\h'+03'\c
147.\}
148.el \{\
149.sp -1
150.IP \(bu 2.3
151.\}
152\fIW\fR
153\- Allow write access
154.RE
155.sp
156.RS 4
157.ie n \{\
158\h'-04'\(bu\h'+03'\c
159.\}
160.el \{\
161.sp -1
162.IP \(bu 2.3
163.\}
164\fIX\fR
165\- Execute permission on the object
166.RE
167.sp
168.RS 4
169.ie n \{\
170\h'-04'\(bu\h'+03'\c
171.\}
172.el \{\
173.sp -1
174.IP \(bu 2.3
175.\}
176\fID\fR
177\- Delete the object
178.RE
179.sp
180.RS 4
181.ie n \{\
182\h'-04'\(bu\h'+03'\c
183.\}
184.el \{\
185.sp -1
186.IP \(bu 2.3
187.\}
188\fIP\fR
189\- Change permissions
190.RE
191.sp
192.RS 4
193.ie n \{\
194\h'-04'\(bu\h'+03'\c
195.\}
196.el \{\
197.sp -1
198.IP \(bu 2.3
199.\}
200\fIO\fR
201\- Take ownership
202.RE
203.sp
204.RE
205.PP
206The following combined permissions can be specified:
207.sp
208.RS 4
209.ie n \{\
210\h'-04'\(bu\h'+03'\c
211.\}
212.el \{\
213.sp -1
214.IP \(bu 2.3
215.\}
216\fIREAD\fR
217\- Equivalent to \*(AqRX\*(Aq permissions
218.RE
219.sp
220.RS 4
221.ie n \{\
222\h'-04'\(bu\h'+03'\c
223.\}
224.el \{\
225.sp -1
226.IP \(bu 2.3
227.\}
228\fICHANGE\fR
229\- Equivalent to \*(AqRXWD\*(Aq permissions
230.RE
231.sp
232.RS 4
233.ie n \{\
234\h'-04'\(bu\h'+03'\c
235.\}
236.el \{\
237.sp -1
238.IP \(bu 2.3
239.\}
240\fIFULL\fR
241\- Equivalent to \*(AqRWXDPO\*(Aq permissions
242.RE
243.SH "EXIT STATUS"
244.PP
245The
246sharesec
247program sets the exit status depending on the success or otherwise of the operations performed\&. The exit status may be one of the following values\&.
248.PP
249If the operation succeeded, sharesec returns and exit status of 0\&. If
250sharesec
251couldn\*(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\&.
252.SH "EXAMPLES"
253.PP
254Add full access for SID
255\fIS\-1\-5\-21\-1866488690\-1365729215\-3963860297\-17724\fR
256on
257\fIshare\fR:
258.sp
259.if n \{\
260.RS 4
261.\}
262.nf
263 host:~ # sharesec share \-a S\-1\-5\-21\-1866488690\-1365729215\-3963860297\-17724:ALLOWED/0/FULL
264
265.fi
266.if n \{\
267.RE
268.\}
269.PP
270List all ACEs for
271\fIshare\fR:
272.sp
273.if n \{\
274.RS 4
275.\}
276.nf
277 host:~ # sharesec share \-v
278 REVISION:1
279 CONTROL:SR|DP
280 OWNER:
281 GROUP:
282 ACL:S\-1\-1\-0:ALLOWED/0x0/FULL
283 ACL:S\-1\-5\-21\-1866488690\-1365729215\-3963860297\-17724:ALLOWED/0x0/FULL
284
285.fi
286.if n \{\
287.RE
288.\}
289.SH "VERSION"
290.PP
291This man page is correct for version 3 of the Samba suite\&.
292.SH "AUTHOR"
293.PP
294The 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\&.
Note: See TracBrowser for help on using the repository browser.