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

Last change on this file was 478, checked in by Silvan Scherrer, 15 years ago

Samba 3.5: vendor update to 3.5.4

File size: 14.6 KB
Line 
1.\" Title: smbcacls
2.\" Author: [see the "AUTHOR" section]
3.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
4.\" Date: 06/18/2010
5.\" Manual: User Commands
6.\" Source: Samba 3.5
7.\" Language: English
8.\"
9.TH "SMBCACLS" "1" "06/18/2010" "Samba 3\&.5" "User Commands"
10.\" -----------------------------------------------------------------
11.\" * (re)Define some macros
12.\" -----------------------------------------------------------------
13.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14.\" toupper - uppercase a string (locale-aware)
15.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16.de toupper
17.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
18\\$*
19.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
20..
21.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22.\" SH-xref - format a cross-reference to an SH section
23.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24.de SH-xref
25.ie n \{\
26.\}
27.toupper \\$*
28.el \{\
29\\$*
30.\}
31..
32.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33.\" SH - level-one heading that works better for non-TTY output
34.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35.de1 SH
36.\" put an extra blank line of space above the head in non-TTY output
37.if t \{\
38.sp 1
39.\}
40.sp \\n[PD]u
41.nr an-level 1
42.set-an-margin
43.nr an-prevailing-indent \\n[IN]
44.fi
45.in \\n[an-margin]u
46.ti 0
47.HTML-TAG ".NH \\n[an-level]"
48.it 1 an-trap
49.nr an-no-space-flag 1
50.nr an-break-flag 1
51\." make the size of the head bigger
52.ps +3
53.ft B
54.ne (2v + 1u)
55.ie n \{\
56.\" if n (TTY output), use uppercase
57.toupper \\$*
58.\}
59.el \{\
60.nr an-break-flag 0
61.\" if not n (not TTY), use normal case (not uppercase)
62\\$1
63.in \\n[an-margin]u
64.ti 0
65.\" if not n (not TTY), put a border/line under subheading
66.sp -.6
67\l'\n(.lu'
68.\}
69..
70.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71.\" SS - level-two heading that works better for non-TTY output
72.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73.de1 SS
74.sp \\n[PD]u
75.nr an-level 1
76.set-an-margin
77.nr an-prevailing-indent \\n[IN]
78.fi
79.in \\n[IN]u
80.ti \\n[SN]u
81.it 1 an-trap
82.nr an-no-space-flag 1
83.nr an-break-flag 1
84.ps \\n[PS-SS]u
85\." make the size of the head bigger
86.ps +2
87.ft B
88.ne (2v + 1u)
89.if \\n[.$] \&\\$*
90..
91.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92.\" BB/BE - put background/screen (filled box) around block of text
93.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94.de BB
95.if t \{\
96.sp -.5
97.br
98.in +2n
99.ll -2n
100.gcolor red
101.di BX
102.\}
103..
104.de EB
105.if t \{\
106.if "\\$2"adjust-for-leading-newline" \{\
107.sp -1
108.\}
109.br
110.di
111.in
112.ll
113.gcolor
114.nr BW \\n(.lu-\\n(.i
115.nr BH \\n(dn+.5v
116.ne \\n(BHu+.5v
117.ie "\\$2"adjust-for-leading-newline" \{\
118\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
119.\}
120.el \{\
121\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
122.\}
123.in 0
124.sp -.5v
125.nf
126.BX
127.in
128.sp .5v
129.fi
130.\}
131..
132.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133.\" BM/EM - put colored marker in margin next to block of text
134.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135.de BM
136.if t \{\
137.br
138.ll -2n
139.gcolor red
140.di BX
141.\}
142..
143.de EM
144.if t \{\
145.br
146.di
147.ll
148.gcolor
149.nr BH \\n(dn
150.ne \\n(BHu
151\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
152.in 0
153.nf
154.BX
155.in
156.fi
157.\}
158..
159.\" -----------------------------------------------------------------
160.\" * set default formatting
161.\" -----------------------------------------------------------------
162.\" disable hyphenation
163.nh
164.\" disable justification (adjust text to left margin only)
165.ad l
166.\" -----------------------------------------------------------------
167.\" * MAIN CONTENT STARTS HERE *
168.\" -----------------------------------------------------------------
169.SH "Name"
170smbcacls \- Set or get ACLs on an NT file or directory names
171.SH "Synopsis"
172.fam C
173.HP \w'\ 'u
174\FCsmbcacls\F[] {//server/share} {filename} [\-D\ acls] [\-M\ acls] [\-a\ acls] [\-S\ acls] [\-C\ name] [\-G\ name] [\-\-numeric] [\-t] [\-U\ username] [\-h] [\-d]
175.fam
176.SH "DESCRIPTION"
177.PP
178This tool is part of the
179\fBsamba\fR(7)
180suite\&.
181.PP
182The
183\FCsmbcacls\F[]
184program manipulates NT Access Control Lists (ACLs) on SMB file shares\&.
185.SH "OPTIONS"
186.PP
187The following options are available to the
188\FCsmbcacls\F[]
189program\&. The format of ACLs is described in the section ACL FORMAT
190.PP
191\-a|\-\-add acls
192.RS 4
193Add the ACLs specified to the ACL list\&. Existing access control entries are unchanged\&.
194.RE
195.PP
196\-M|\-\-modify acls
197.RS 4
198Modify the mask value (permissions) for the ACLs specified on the command line\&. An error will be printed for each ACL specified that was not already present in the ACL list
199.RE
200.PP
201\-D|\-\-delete acls
202.RS 4
203Delete any ACLs specified on the command line\&. An error will be printed for each ACL specified that was not already present in the ACL list\&.
204.RE
205.PP
206\-S|\-\-set acls
207.RS 4
208This command sets the ACLs on the file with only the ones specified on the command line\&. All other ACLs are erased\&. Note that the ACL specified must contain at least a revision, type, owner and group for the call to succeed\&.
209.RE
210.PP
211\-C|\-\-chown name
212.RS 4
213The owner of a file or directory can be changed to the name given using the
214\fI\-C\fR
215option\&. 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\&.
216.sp
217This command is a shortcut for \-M OWNER:name\&.
218.RE
219.PP
220\-G|\-\-chgrp name
221.RS 4
222The group owner of a file or directory can be changed to the name given using the
223\fI\-G\fR
224option\&. 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\&.
225.sp
226This command is a shortcut for \-M GROUP:name\&.
227.RE
228.PP
229\-\-numeric
230.RS 4
231This 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\&.
232.RE
233.PP
234\-t|\-\-test\-args
235.RS 4
236Don\'t actually do anything, only validate the correctness of the arguments\&.
237.RE
238.PP
239\-h|\-\-help
240.RS 4
241Print a summary of command line options\&.
242.RE
243.PP
244\-d|\-\-debuglevel=level
245.RS 4
246\fIlevel\fR
247is an integer from 0 to 10\&. The default value if this parameter is not specified is 0\&.
248.sp
249The 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\&.
250.sp
251Levels 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\&.
252.sp
253Note that specifying this parameter here will override the
254\m[blue]\fB\%smb.conf.5.html#\fR\m[]
255parameter in the
256\FCsmb\&.conf\F[]
257file\&.
258.RE
259.PP
260\-V|\-\-version
261.RS 4
262Prints the program version number\&.
263.RE
264.PP
265\-s|\-\-configfile <configuration file>
266.RS 4
267The 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
268\FCsmb\&.conf\F[]
269for more information\&. The default configuration file name is determined at compile time\&.
270.RE
271.PP
272\-l|\-\-log\-basename=logdirectory
273.RS 4
274Base directory name for log/debug files\&. The extension
275\fB"\&.progname"\fR
276will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&.
277.RE
278.PP
279\-N|\-\-no\-pass
280.RS 4
281If specified, this parameter suppresses the normal password prompt from the client to the user\&. This is useful when accessing a service that does not require a password\&.
282.sp
283Unless a password is specified on the command line or this parameter is specified, the client will request a password\&.
284.sp
285If a password is specified on the command line and this option is also defined the password on the command line will be silently ingnored and no password will be used\&.
286.RE
287.PP
288\-k|\-\-kerberos
289.RS 4
290Try to authenticate with kerberos\&. Only useful in an Active Directory environment\&.
291.RE
292.PP
293\-C|\-\-use\-ccache
294.RS 4
295Try to use the credentials cached by winbind\&.
296.RE
297.PP
298\-A|\-\-authentication\-file=filename
299.RS 4
300This option allows you to specify a file from which to read the username and password used in the connection\&. The format of the file is
301.sp
302.if n \{\
303.RS 4
304.\}
305.fam C
306.ps -1
307.nf
308.if t \{\
309.sp -1
310.\}
311.BB lightgray adjust-for-leading-newline
312.sp -1
313
314username = <value>
315password = <value>
316domain = <value>
317.EB lightgray adjust-for-leading-newline
318.if t \{\
319.sp 1
320.\}
321.fi
322.fam
323.ps +1
324.if n \{\
325.RE
326.\}
327.sp
328Make certain that the permissions on the file restrict access from unwanted users\&.
329.RE
330.PP
331\-U|\-\-user=username[%password]
332.RS 4
333Sets the SMB username or username and password\&.
334.sp
335If %password is not specified, the user will be prompted\&. The client will first check the
336\fBUSER\fR
337environment variable, then the
338\fBLOGNAME\fR
339variable and if either exists, the string is uppercased\&. If these environmental variables are not found, the username
340\fBGUEST\fR
341is used\&.
342.sp
343A third option is to use a credentials file which contains the plaintext of the username and password\&. This option is mainly provided for scripts where the admin does not wish to pass the credentials on the command line or via environment variables\&. If this method is used, make certain that the permissions on the file restrict access from unwanted users\&. See the
344\fI\-A\fR
345for more details\&.
346.sp
347Be cautious about including passwords in scripts\&. Also, on many systems the command line of a running process may be seen via the
348\FCps\F[]
349command\&. To be safe always allow
350\FCrpcclient\F[]
351to prompt for a password and type it in directly\&.
352.RE
353.SH "ACL FORMAT"
354.PP
355The format of an ACL is one or more ACL entries separated by either commas or newlines\&. An ACL entry is one of the following:
356.PP
357.if n \{\
358.RS 4
359.\}
360.fam C
361.ps -1
362.nf
363.BB lightgray
364
365REVISION:<revision number>
366OWNER:<sid or name>
367GROUP:<sid or name>
368ACL:<sid or name>:<type>/<flags>/<mask>
369.EB lightgray
370.fi
371.fam
372.ps +1
373.if n \{\
374.RE
375.\}
376.PP
377The 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\&.
378.PP
379The 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\&.
380.PP
381ACLs specify permissions granted to the SID\&. This 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\&.
382.PP
383The type can be either ALLOWED or DENIED to allow/deny access to the SID\&. The flags values are generally zero for file ACLs and either 9 or 2 for directory ACLs\&. Some common flags are:
384.sp
385.RS 4
386.ie n \{\
387\h'-04'\(bu\h'+03'\c
388.\}
389.el \{\
390.sp -1
391.IP \(bu 2.3
392.\}
393\fB#define SEC_ACE_FLAG_OBJECT_INHERIT 0x1\fR
394.RE
395.sp
396.RS 4
397.ie n \{\
398\h'-04'\(bu\h'+03'\c
399.\}
400.el \{\
401.sp -1
402.IP \(bu 2.3
403.\}
404\fB#define SEC_ACE_FLAG_CONTAINER_INHERIT 0x2\fR
405.RE
406.sp
407.RS 4
408.ie n \{\
409\h'-04'\(bu\h'+03'\c
410.\}
411.el \{\
412.sp -1
413.IP \(bu 2.3
414.\}
415\fB#define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT 0x4\fR
416.RE
417.sp
418.RS 4
419.ie n \{\
420\h'-04'\(bu\h'+03'\c
421.\}
422.el \{\
423.sp -1
424.IP \(bu 2.3
425.\}
426\fB#define SEC_ACE_FLAG_INHERIT_ONLY 0x8\fR
427.sp
428.RE
429.PP
430At present flags can only be specified as decimal or hexadecimal values\&.
431.PP
432The 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\&.
433.sp
434.RS 4
435.ie n \{\
436\h'-04'\(bu\h'+03'\c
437.\}
438.el \{\
439.sp -1
440.IP \(bu 2.3
441.\}
442\fIR\fR
443\- Allow read access
444.RE
445.sp
446.RS 4
447.ie n \{\
448\h'-04'\(bu\h'+03'\c
449.\}
450.el \{\
451.sp -1
452.IP \(bu 2.3
453.\}
454\fIW\fR
455\- Allow write access
456.RE
457.sp
458.RS 4
459.ie n \{\
460\h'-04'\(bu\h'+03'\c
461.\}
462.el \{\
463.sp -1
464.IP \(bu 2.3
465.\}
466\fIX\fR
467\- Execute permission on the object
468.RE
469.sp
470.RS 4
471.ie n \{\
472\h'-04'\(bu\h'+03'\c
473.\}
474.el \{\
475.sp -1
476.IP \(bu 2.3
477.\}
478\fID\fR
479\- Delete the object
480.RE
481.sp
482.RS 4
483.ie n \{\
484\h'-04'\(bu\h'+03'\c
485.\}
486.el \{\
487.sp -1
488.IP \(bu 2.3
489.\}
490\fIP\fR
491\- Change permissions
492.RE
493.sp
494.RS 4
495.ie n \{\
496\h'-04'\(bu\h'+03'\c
497.\}
498.el \{\
499.sp -1
500.IP \(bu 2.3
501.\}
502\fIO\fR
503\- Take ownership
504.sp
505.RE
506.PP
507The following combined permissions can be specified:
508.sp
509.RS 4
510.ie n \{\
511\h'-04'\(bu\h'+03'\c
512.\}
513.el \{\
514.sp -1
515.IP \(bu 2.3
516.\}
517\fIREAD\fR
518\- Equivalent to \'RX\' permissions
519.RE
520.sp
521.RS 4
522.ie n \{\
523\h'-04'\(bu\h'+03'\c
524.\}
525.el \{\
526.sp -1
527.IP \(bu 2.3
528.\}
529\fICHANGE\fR
530\- Equivalent to \'RXWD\' permissions
531.RE
532.sp
533.RS 4
534.ie n \{\
535\h'-04'\(bu\h'+03'\c
536.\}
537.el \{\
538.sp -1
539.IP \(bu 2.3
540.\}
541\fIFULL\fR
542\- Equivalent to \'RWXDPO\' permissions
543.SH "EXIT STATUS"
544.PP
545The
546\FCsmbcacls\F[]
547program sets the exit status depending on the success or otherwise of the operations performed\&. The exit status may be one of the following values\&.
548.PP
549If the operation succeeded, smbcacls returns and exit status of 0\&. If
550\FCsmbcacls\F[]
551couldn\'t 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\&.
552.SH "VERSION"
553.PP
554This man page is correct for version 3 of the Samba suite\&.
555.SH "AUTHOR"
556.PP
557The 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\&.
558.PP
559\FCsmbcacls\F[]
560was written by Andrew Tridgell and Tim Potter\&.
561.PP
562The 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.