1 | '\" t
|
---|
2 | .\" Title: sharesec
|
---|
3 | .\" Author: [see the "AUTHOR" section]
|
---|
4 | .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
|
---|
5 | .\" Date: 09/18/2013
|
---|
6 | .\" Manual: User Commands
|
---|
7 | .\" Source: Samba 3.6
|
---|
8 | .\" Language: English
|
---|
9 | .\"
|
---|
10 | .TH "SHARESEC" "1" "09/18/2013" "Samba 3\&.6" "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 | sharesec \- Set or get share ACLs
|
---|
32 | .SH "SYNOPSIS"
|
---|
33 | .HP \w'\ 'u
|
---|
34 | sharesec {sharename} [\-r,\ \-\-remove=ACL] [\-m,\ \-\-modify=ACL] [\-a,\ \-\-add=ACL] [\-R,\ \-\-replace=ACLs] [\-D,\ \-\-delete] [\-v,\ \-\-view] [\-M,\ \-\-machine\-sid] [\-F,\ \-\-force] [\-d,\ \-\-debuglevel=DEBUGLEVEL] [\-s,\ \-\-configfile=CONFIGFILE] [\-l,\ \-\-log\-basename=LOGFILEBASE] [\-V,\ \-\-version] [\-?,\ \-\-help] [\-\-usage]
|
---|
35 | .SH "DESCRIPTION"
|
---|
36 | .PP
|
---|
37 | This tool is part of the
|
---|
38 | \fBsamba\fR(7)
|
---|
39 | suite\&.
|
---|
40 | .PP
|
---|
41 | The
|
---|
42 | sharesec
|
---|
43 | program manipulates share permissions on SMB file shares\&.
|
---|
44 | .SH "OPTIONS"
|
---|
45 | .PP
|
---|
46 | The following options are available to the
|
---|
47 | sharesec
|
---|
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 ACEs specified to the ACL list\&.
|
---|
53 | .RE
|
---|
54 | .PP
|
---|
55 | \-D|\-\-delete
|
---|
56 | .RS 4
|
---|
57 | Delete the entire security descriptor\&.
|
---|
58 | .RE
|
---|
59 | .PP
|
---|
60 | \-F|\-\-force
|
---|
61 | .RS 4
|
---|
62 | Force storing the ACL\&.
|
---|
63 | .RE
|
---|
64 | .PP
|
---|
65 | \-m|\-\-modify=ACL
|
---|
66 | .RS 4
|
---|
67 | Modify existing ACEs\&.
|
---|
68 | .RE
|
---|
69 | .PP
|
---|
70 | \-M|\-\-machine\-sid
|
---|
71 | .RS 4
|
---|
72 | Initialize the machine SID\&.
|
---|
73 | .RE
|
---|
74 | .PP
|
---|
75 | \-r|\-\-remove=ACL
|
---|
76 | .RS 4
|
---|
77 | Remove ACEs\&.
|
---|
78 | .RE
|
---|
79 | .PP
|
---|
80 | \-R|\-\-replace=ACLS
|
---|
81 | .RS 4
|
---|
82 | Overwrite an existing share permission ACL\&.
|
---|
83 | .RE
|
---|
84 | .PP
|
---|
85 | \-h|\-\-help
|
---|
86 | .RS 4
|
---|
87 | Print a summary of command line options\&.
|
---|
88 | .RE
|
---|
89 | .PP
|
---|
90 | \-d|\-\-debuglevel=level
|
---|
91 | .RS 4
|
---|
92 | \fIlevel\fR
|
---|
93 | is an integer from 0 to 10\&. The default value if this parameter is not specified is 0\&.
|
---|
94 | .sp
|
---|
95 | The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&.
|
---|
96 | .sp
|
---|
97 | Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&.
|
---|
98 | .sp
|
---|
99 | Note that specifying this parameter here will override the
|
---|
100 | \m[blue]\fBlog level\fR\m[]
|
---|
101 | parameter in the
|
---|
102 | smb\&.conf
|
---|
103 | file\&.
|
---|
104 | .RE
|
---|
105 | .PP
|
---|
106 | \-V|\-\-version
|
---|
107 | .RS 4
|
---|
108 | Prints the program version number\&.
|
---|
109 | .RE
|
---|
110 | .PP
|
---|
111 | \-s|\-\-configfile <configuration file>
|
---|
112 | .RS 4
|
---|
113 | The file specified contains the configuration details required by the server\&. The information in this file includes server\-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide\&. See
|
---|
114 | smb\&.conf
|
---|
115 | for more information\&. The default configuration file name is determined at compile time\&.
|
---|
116 | .RE
|
---|
117 | .PP
|
---|
118 | \-l|\-\-log\-basename=logdirectory
|
---|
119 | .RS 4
|
---|
120 | Base directory name for log/debug files\&. The extension
|
---|
121 | \fB"\&.progname"\fR
|
---|
122 | will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&.
|
---|
123 | .RE
|
---|
124 | .SH "ACL FORMAT"
|
---|
125 | .PP
|
---|
126 | The format of an ACL is one or more ACL entries separated by either commas or newlines\&. An ACL entry is one of the following:
|
---|
127 | .PP
|
---|
128 | .if n \{\
|
---|
129 | .RS 4
|
---|
130 | .\}
|
---|
131 | .nf
|
---|
132 | REVISION:<revision number>
|
---|
133 | OWNER:<sid or name>
|
---|
134 | GROUP:<sid or name>
|
---|
135 | ACL:<sid or name>:<type>/<flags>/<mask>
|
---|
136 |
|
---|
137 | .fi
|
---|
138 | .if n \{\
|
---|
139 | .RE
|
---|
140 | .\}
|
---|
141 | .PP
|
---|
142 | 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\&.
|
---|
143 | .PP
|
---|
144 | 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\&.
|
---|
145 | .PP
|
---|
146 | ACLs 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\&.
|
---|
147 | .PP
|
---|
148 | The type can be either ALLOWED or DENIED to allow/deny access to the SID\&. The flags values are generally zero for share ACLs\&.
|
---|
149 | .PP
|
---|
150 | 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\&.
|
---|
151 | .sp
|
---|
152 | .RS 4
|
---|
153 | .ie n \{\
|
---|
154 | \h'-04'\(bu\h'+03'\c
|
---|
155 | .\}
|
---|
156 | .el \{\
|
---|
157 | .sp -1
|
---|
158 | .IP \(bu 2.3
|
---|
159 | .\}
|
---|
160 | \fIR\fR
|
---|
161 | \- Allow read access
|
---|
162 | .RE
|
---|
163 | .sp
|
---|
164 | .RS 4
|
---|
165 | .ie n \{\
|
---|
166 | \h'-04'\(bu\h'+03'\c
|
---|
167 | .\}
|
---|
168 | .el \{\
|
---|
169 | .sp -1
|
---|
170 | .IP \(bu 2.3
|
---|
171 | .\}
|
---|
172 | \fIW\fR
|
---|
173 | \- Allow write access
|
---|
174 | .RE
|
---|
175 | .sp
|
---|
176 | .RS 4
|
---|
177 | .ie n \{\
|
---|
178 | \h'-04'\(bu\h'+03'\c
|
---|
179 | .\}
|
---|
180 | .el \{\
|
---|
181 | .sp -1
|
---|
182 | .IP \(bu 2.3
|
---|
183 | .\}
|
---|
184 | \fIX\fR
|
---|
185 | \- Execute permission on the object
|
---|
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 | \fID\fR
|
---|
197 | \- Delete the object
|
---|
198 | .RE
|
---|
199 | .sp
|
---|
200 | .RS 4
|
---|
201 | .ie n \{\
|
---|
202 | \h'-04'\(bu\h'+03'\c
|
---|
203 | .\}
|
---|
204 | .el \{\
|
---|
205 | .sp -1
|
---|
206 | .IP \(bu 2.3
|
---|
207 | .\}
|
---|
208 | \fIP\fR
|
---|
209 | \- Change permissions
|
---|
210 | .RE
|
---|
211 | .sp
|
---|
212 | .RS 4
|
---|
213 | .ie n \{\
|
---|
214 | \h'-04'\(bu\h'+03'\c
|
---|
215 | .\}
|
---|
216 | .el \{\
|
---|
217 | .sp -1
|
---|
218 | .IP \(bu 2.3
|
---|
219 | .\}
|
---|
220 | \fIO\fR
|
---|
221 | \- Take ownership
|
---|
222 | .RE
|
---|
223 | .sp
|
---|
224 | .RE
|
---|
225 | .PP
|
---|
226 | The following combined permissions can be specified:
|
---|
227 | .sp
|
---|
228 | .RS 4
|
---|
229 | .ie n \{\
|
---|
230 | \h'-04'\(bu\h'+03'\c
|
---|
231 | .\}
|
---|
232 | .el \{\
|
---|
233 | .sp -1
|
---|
234 | .IP \(bu 2.3
|
---|
235 | .\}
|
---|
236 | \fIREAD\fR
|
---|
237 | \- Equivalent to \*(AqRX\*(Aq permissions
|
---|
238 | .RE
|
---|
239 | .sp
|
---|
240 | .RS 4
|
---|
241 | .ie n \{\
|
---|
242 | \h'-04'\(bu\h'+03'\c
|
---|
243 | .\}
|
---|
244 | .el \{\
|
---|
245 | .sp -1
|
---|
246 | .IP \(bu 2.3
|
---|
247 | .\}
|
---|
248 | \fICHANGE\fR
|
---|
249 | \- Equivalent to \*(AqRXWD\*(Aq permissions
|
---|
250 | .RE
|
---|
251 | .sp
|
---|
252 | .RS 4
|
---|
253 | .ie n \{\
|
---|
254 | \h'-04'\(bu\h'+03'\c
|
---|
255 | .\}
|
---|
256 | .el \{\
|
---|
257 | .sp -1
|
---|
258 | .IP \(bu 2.3
|
---|
259 | .\}
|
---|
260 | \fIFULL\fR
|
---|
261 | \- Equivalent to \*(AqRWXDPO\*(Aq permissions
|
---|
262 | .RE
|
---|
263 | .SH "EXIT STATUS"
|
---|
264 | .PP
|
---|
265 | The
|
---|
266 | sharesec
|
---|
267 | 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\&.
|
---|
268 | .PP
|
---|
269 | If the operation succeeded, sharesec returns and exit status of 0\&. If
|
---|
270 | sharesec
|
---|
271 | 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\&.
|
---|
272 | .SH "EXAMPLES"
|
---|
273 | .PP
|
---|
274 | Add full access for SID
|
---|
275 | \fIS\-1\-5\-21\-1866488690\-1365729215\-3963860297\-17724\fR
|
---|
276 | on
|
---|
277 | \fIshare\fR:
|
---|
278 | .sp
|
---|
279 | .if n \{\
|
---|
280 | .RS 4
|
---|
281 | .\}
|
---|
282 | .nf
|
---|
283 | host:~ # sharesec share \-a S\-1\-5\-21\-1866488690\-1365729215\-3963860297\-17724:ALLOWED/0/FULL
|
---|
284 |
|
---|
285 | .fi
|
---|
286 | .if n \{\
|
---|
287 | .RE
|
---|
288 | .\}
|
---|
289 | .PP
|
---|
290 | List all ACEs for
|
---|
291 | \fIshare\fR:
|
---|
292 | .sp
|
---|
293 | .if n \{\
|
---|
294 | .RS 4
|
---|
295 | .\}
|
---|
296 | .nf
|
---|
297 | host:~ # sharesec share \-v
|
---|
298 | REVISION:1
|
---|
299 | OWNER:(NULL SID)
|
---|
300 | GROUP:(NULL SID)
|
---|
301 | ACL:S\-1\-1\-0:ALLOWED/0/0x101f01ff
|
---|
302 | ACL:S\-1\-5\-21\-1866488690\-1365729215\-3963860297\-17724:ALLOWED/0/FULL
|
---|
303 |
|
---|
304 | .fi
|
---|
305 | .if n \{\
|
---|
306 | .RE
|
---|
307 | .\}
|
---|
308 | .SH "VERSION"
|
---|
309 | .PP
|
---|
310 | This man page is correct for version 3 of the Samba suite\&.
|
---|
311 | .SH "AUTHOR"
|
---|
312 | .PP
|
---|
313 | 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\&.
|
---|