1SMBCACLS(1)                      User Commands                     SMBCACLS(1)
2
3
4

NAME

6       smbcacls - Set or get ACLs on an NT file or directory names
7

SYNOPSIS

9       smbcacls {//server/share} {filename} [-D acls] [-M acls] [-a acls]
10        [-S acls] [-C name] [-G name] [--numeric] [-t] [-U username] [-h] [-d]
11

DESCRIPTION

13       This tool is part of the samba(7) suite.
14
15       The smbcacls program manipulates NT Access Control Lists (ACLs) on SMB
16       file shares.
17

OPTIONS

19       The following options are available to the smbcacls program. The format
20       of ACLs is described in the section ACL FORMAT
21
22       -a|--add acls
23           Add the ACLs specified to the ACL list. Existing access control
24           entries are unchanged.
25
26       -M|--modify acls
27           Modify the mask value (permissions) for the ACLs specified on the
28           command line. An error will be printed for each ACL specified that
29           was not already present in the ACL list
30
31       -D|--delete acls
32           Delete any ACLs specified on the command line. An error will be
33           printed for each ACL specified that was not already present in the
34           ACL list.
35
36       -S|--set acls
37           This command sets the ACLs on the file with only the ones specified
38           on the command line. All other ACLs are erased. Note that the ACL
39           specified must contain at least a revision, type, owner and group
40           for the call to succeed.
41
42       -C|--chown name
43           The owner of a file or directory can be changed to the name given
44           using the -C option. The name can be a sid in the form S-1-x-y-z or
45           a name resolved against the server specified in the first argument.
46
47           This command is a shortcut for -M OWNER:name.
48
49       -G|--chgrp name
50           The group owner of a file or directory can be changed to the name
51           given using the -G option. The name can be a sid in the form
52           S-1-x-y-z or a name resolved against the server specified n the
53           first argument.
54
55           This command is a shortcut for -M GROUP:name.
56
57       --numeric
58           This option displays all ACL information in numeric format. The
59           default is to convert SIDs to names and ACE types and masks to a
60           readable string format.
61
62       -t|--test-args
63           Don´t actually do anything, only validate the correctness of the
64           arguments.
65
66       -h|--help
67           Print a summary of command line options.
68
69       -d|--debuglevel=level
70           level is an integer from 0 to 10. The default value if this
71           parameter is not specified is 0.
72
73           The higher this value, the more detail will be logged to the log
74           files about the activities of the server. At level 0, only critical
75           errors and serious warnings will be logged. Level 1 is a reasonable
76           level for day-to-day running - it generates a small amount of
77           information about operations carried out.
78
79           Levels above 1 will generate considerable amounts of log data, and
80           should only be used when investigating a problem. Levels above 3
81           are designed for use only by developers and generate HUGE amounts
82           of log data, most of which is extremely cryptic.
83
84           Note that specifying this parameter here will override the
85           smb.conf.5.html# parameter in the smb.conf file.
86
87       -V|--version
88           Prints the program version number.
89
90       -s|--configfile <configuration file>
91           The file specified contains the configuration details required by
92           the server. The information in this file includes server-specific
93           information such as what printcap file to use, as well as
94           descriptions of all the services that the server is to provide. See
95           smb.conf for more information. The default configuration file name
96           is determined at compile time.
97
98       -l|--log-basename=logdirectory
99           Base directory name for log/debug files. The extension ".progname"
100           will be appended (e.g. log.smbclient, log.smbd, etc...). The log
101           file is never removed by the client.
102
103       -N|--no-pass
104           If specified, this parameter suppresses the normal password prompt
105           from the client to the user. This is useful when accessing a
106           service that does not require a password.
107
108           Unless a password is specified on the command line or this
109           parameter is specified, the client will request a password.
110
111           If a password is specified on the command line and this option is
112           also defined the password on the command line will be silently
113           ingnored and no password will be used.
114
115       -k|--kerberos
116           Try to authenticate with kerberos. Only useful in an Active
117           Directory environment.
118
119       -C|--use-ccache
120           Try to use the credentials cached by winbind.
121
122       -A|--authentication-file=filename
123           This option allows you to specify a file from which to read the
124           username and password used in the connection. The format of the
125           file is
126
127               username = <value>
128               password = <value>
129               domain   = <value>
130
131           Make certain that the permissions on the file restrict access from
132           unwanted users.
133
134       -U|--user=username[%password]
135           Sets the SMB username or username and password.
136
137           If %password is not specified, the user will be prompted. The
138           client will first check the USER environment variable, then the
139           LOGNAME variable and if either exists, the string is uppercased. If
140           these environmental variables are not found, the username GUEST is
141           used.
142
143           A third option is to use a credentials file which contains the
144           plaintext of the username and password. This option is mainly
145           provided for scripts where the admin does not wish to pass the
146           credentials on the command line or via environment variables. If
147           this method is used, make certain that the permissions on the file
148           restrict access from unwanted users. See the -A for more details.
149
150           Be cautious about including passwords in scripts. Also, on many
151           systems the command line of a running process may be seen via the
152           ps command. To be safe always allow rpcclient to prompt for a
153           password and type it in directly.
154

ACL FORMAT

156       The format of an ACL is one or more ACL entries separated by either
157       commas or newlines. An ACL entry is one of the following:
158
159           REVISION:<revision number>
160           OWNER:<sid or name>
161           GROUP:<sid or name>
162           ACL:<sid or name>:<type>/<flags>/<mask>
163
164       The revision of the ACL specifies the internal Windows NT ACL revision
165       for the security descriptor. If not specified it defaults to 1. Using
166       values other than 1 may cause strange behaviour.
167
168       The owner and group specify the owner and group sids for the object. If
169       a SID in the format S-1-x-y-z is specified this is used, otherwise the
170       name specified is resolved using the server on which the file or
171       directory resides.
172
173       ACLs specify permissions granted to the SID. This SID again can be
174       specified in S-1-x-y-z format or as a name in which case it is resolved
175       against the server on which the file or directory resides. The type,
176       flags and mask values determine the type of access granted to the SID.
177
178       The type can be either ALLOWED or DENIED to allow/deny access to the
179       SID. The flags values are generally zero for file ACLs and either 9 or
180       2 for directory ACLs. Some common flags are:
181
182       ·   #define SEC_ACE_FLAG_OBJECT_INHERIT 0x1
183
184       ·   #define SEC_ACE_FLAG_CONTAINER_INHERIT 0x2
185
186       ·   #define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT 0x4
187
188       ·   #define SEC_ACE_FLAG_INHERIT_ONLY 0x8
189
190
191       At present flags can only be specified as decimal or hexadecimal
192       values.
193
194       The mask is a value which expresses the access right granted to the
195       SID. It can be given as a decimal or hexadecimal value, or by using one
196       of the following text strings which map to the NT file permissions of
197       the same name.
198
199       ·   R - Allow read access
200
201       ·   W - Allow write access
202
203       ·   X - Execute permission on the object
204
205       ·   D - Delete the object
206
207       ·   P - Change permissions
208
209       ·   O - Take ownership
210
211
212       The following combined permissions can be specified:
213
214       ·   READ - Equivalent to ´RX´ permissions
215
216       ·   CHANGE - Equivalent to ´RXWD´ permissions
217
218       ·   FULL - Equivalent to ´RWXDPO´ permissions
219

EXIT STATUS

221       The smbcacls program sets the exit status depending on the success or
222       otherwise of the operations performed. The exit status may be one of
223       the following values.
224
225       If the operation succeeded, smbcacls returns and exit status of 0. If
226       smbcacls couldn´t connect to the specified server, or there was an
227       error getting or setting the ACLs, an exit status of 1 is returned. If
228       there was an error parsing any command line arguments, an exit status
229       of 2 is returned.
230

VERSION

232       This man page is correct for version 3 of the Samba suite.
233

AUTHOR

235       The original Samba software and related utilities were created by
236       Andrew Tridgell. Samba is now developed by the Samba Team as an Open
237       Source project similar to the way the Linux kernel is developed.
238
239       smbcacls was written by Andrew Tridgell and Tim Potter.
240
241       The conversion to DocBook for Samba 2.2 was done by Gerald Carter. The
242       conversion to DocBook XML 4.2 for Samba 3.0 was done by Alexander
243       Bokovoy.
244
245
246
247Samba 3.5                         08/02/2011                       SMBCACLS(1)
Impressum