1SMBCACLS(1) User Commands SMBCACLS(1)
2
3
4
6 smbcacls - Set or get ACLs on an NT file or directory names
7
9 smbcacls {//server/share} {/filename} [-D|--delete acls]
10 [-M|--modify acls] [-a|--add acls] [-S|--set acls] [-C|--chown name]
11 [-G|--chgrp name] [-I allow|romove|copy] [--numeric] [-t]
12 [-U username] [-h] [-d]
13
15 This tool is part of the samba(7) suite.
16
17 The smbcacls program manipulates NT Access Control Lists (ACLs) on SMB
18 file shares.
19
21 The following options are available to the smbcacls program. The format
22 of ACLs is described in the section ACL FORMAT
23
24 -a|--add acls
25 Add the ACLs specified to the ACL list. Existing access control
26 entries are unchanged.
27
28 -M|--modify acls
29 Modify the mask value (permissions) for the ACLs specified on the
30 command line. An error will be printed for each ACL specified that
31 was not already present in the ACL list
32
33 -D|--delete acls
34 Delete any ACLs specified on the command line. An error will be
35 printed for each ACL specified that was not already present in the
36 ACL list.
37
38 -S|--set acls
39 This command sets the ACLs on the file with only the ones specified
40 on the command line. All other ACLs are erased. Note that the ACL
41 specified must contain at least a revision, type, owner and group
42 for the call to succeed.
43
44 -C|--chown name
45 The owner of a file or directory can be changed to the name given
46 using the -C option. The name can be a sid in the form S-1-x-y-z or
47 a name resolved against the server specified in the first argument.
48
49 This command is a shortcut for -M OWNER:name.
50
51 -G|--chgrp name
52 The group owner of a file or directory can be changed to the name
53 given using the -G option. The name can be a sid in the form
54 S-1-x-y-z or a name resolved against the server specified n the
55 first argument.
56
57 This command is a shortcut for -M GROUP:name.
58
59 -I|--inherit allow|remove|copy
60 Set or unset the windows "Allow inheritable permissions" check box
61 using the -I option. To set the check box pass allow. To unset the
62 check box pass either remove or copy. Remove will remove all
63 inherited acls. Copy will copy all the inherited acls.
64
65 --numeric
66 This option displays all ACL information in numeric format. The
67 default is to convert SIDs to names and ACE types and masks to a
68 readable string format.
69
70 -t|--test-args
71 Don't actually do anything, only validate the correctness of the
72 arguments.
73
74 -?|--help
75 Print a summary of command line options.
76
77 -d|--debuglevel=level
78 level is an integer from 0 to 10. The default value if this
79 parameter is not specified is 0.
80
81 The higher this value, the more detail will be logged to the log
82 files about the activities of the server. At level 0, only critical
83 errors and serious warnings will be logged. Level 1 is a reasonable
84 level for day-to-day running - it generates a small amount of
85 information about operations carried out.
86
87 Levels above 1 will generate considerable amounts of log data, and
88 should only be used when investigating a problem. Levels above 3
89 are designed for use only by developers and generate HUGE amounts
90 of log data, most of which is extremely cryptic.
91
92 Note that specifying this parameter here will override the log
93 level parameter in the smb.conf file.
94
95 -V|--version
96 Prints the program version number.
97
98 -s|--configfile <configuration file>
99 The file specified contains the configuration details required by
100 the server. The information in this file includes server-specific
101 information such as what printcap file to use, as well as
102 descriptions of all the services that the server is to provide. See
103 smb.conf for more information. The default configuration file name
104 is determined at compile time.
105
106 -l|--log-basename=logdirectory
107 Base directory name for log/debug files. The extension ".progname"
108 will be appended (e.g. log.smbclient, log.smbd, etc...). The log
109 file is never removed by the client.
110
111 -N|--no-pass
112 If specified, this parameter suppresses the normal password prompt
113 from the client to the user. This is useful when accessing a
114 service that does not require a password.
115
116 Unless a password is specified on the command line or this
117 parameter is specified, the client will request a password.
118
119 If a password is specified on the command line and this option is
120 also defined the password on the command line will be silently
121 ingnored and no password will be used.
122
123 -k|--kerberos
124 Try to authenticate with kerberos. Only useful in an Active
125 Directory environment.
126
127 -C|--use-ccache
128 Try to use the credentials cached by winbind.
129
130 -A|--authentication-file=filename
131 This option allows you to specify a file from which to read the
132 username and password used in the connection. The format of the
133 file is
134
135 username = <value>
136 password = <value>
137 domain = <value>
138
139 Make certain that the permissions on the file restrict access from
140 unwanted users.
141
142 -U|--user=username[%password]
143 Sets the SMB username or username and password.
144
145 If %password is not specified, the user will be prompted. The
146 client will first check the USER environment variable, then the
147 LOGNAME variable and if either exists, the string is uppercased. If
148 these environmental variables are not found, the username GUEST is
149 used.
150
151 A third option is to use a credentials file which contains the
152 plaintext of the username and password. This option is mainly
153 provided for scripts where the admin does not wish to pass the
154 credentials on the command line or via environment variables. If
155 this method is used, make certain that the permissions on the file
156 restrict access from unwanted users. See the -A for more details.
157
158 Be cautious about including passwords in scripts. Also, on many
159 systems the command line of a running process may be seen via the
160 ps command. To be safe always allow rpcclient to prompt for a
161 password and type it in directly.
162
164 The format of an ACL is one or more ACL entries separated by either
165 commas or newlines. An ACL entry is one of the following:
166
167 REVISION:<revision number>
168 OWNER:<sid or name>
169 GROUP:<sid or name>
170 ACL:<sid or name>:<type>/<flags>/<mask>
171
172 The revision of the ACL specifies the internal Windows NT ACL revision
173 for the security descriptor. If not specified it defaults to 1. Using
174 values other than 1 may cause strange behaviour.
175
176 The owner and group specify the owner and group sids for the object. If
177 a SID in the format S-1-x-y-z is specified this is used, otherwise the
178 name specified is resolved using the server on which the file or
179 directory resides.
180
181 ACLs specify permissions granted to the SID. This SID again can be
182 specified in S-1-x-y-z format or as a name in which case it is resolved
183 against the server on which the file or directory resides. The type,
184 flags and mask values determine the type of access granted to the SID.
185
186 The type can be either ALLOWED or DENIED to allow/deny access to the
187 SID. The flags values are generally zero for file ACLs and either 9 or
188 2 for directory ACLs. Some common flags are:
189
190 · #define SEC_ACE_FLAG_OBJECT_INHERIT 0x1
191
192 · #define SEC_ACE_FLAG_CONTAINER_INHERIT 0x2
193
194 · #define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT 0x4
195
196 · #define SEC_ACE_FLAG_INHERIT_ONLY 0x8
197
198
199 At present flags can only be specified as decimal or hexadecimal
200 values.
201
202 The mask is a value which expresses the access right granted to the
203 SID. It can be given as a decimal or hexadecimal value, or by using one
204 of the following text strings which map to the NT file permissions of
205 the same name.
206
207 · R - Allow read access
208
209 · W - Allow write access
210
211 · X - Execute permission on the object
212
213 · D - Delete the object
214
215 · P - Change permissions
216
217 · O - Take ownership
218
219
220 The following combined permissions can be specified:
221
222 · READ - Equivalent to 'RX' permissions
223
224 · CHANGE - Equivalent to 'RXWD' permissions
225
226 · FULL - Equivalent to 'RWXDPO' permissions
227
229 The smbcacls program sets the exit status depending on the success or
230 otherwise of the operations performed. The exit status may be one of
231 the following values.
232
233 If the operation succeeded, smbcacls returns and exit status of 0. If
234 smbcacls couldn't connect to the specified server, or there was an
235 error getting or setting the ACLs, an exit status of 1 is returned. If
236 there was an error parsing any command line arguments, an exit status
237 of 2 is returned.
238
240 This man page is correct for version 3 of the Samba suite.
241
243 The original Samba software and related utilities were created by
244 Andrew Tridgell. Samba is now developed by the Samba Team as an Open
245 Source project similar to the way the Linux kernel is developed.
246
247 smbcacls was written by Andrew Tridgell and Tim Potter.
248
249 The conversion to DocBook for Samba 2.2 was done by Gerald Carter. The
250 conversion to DocBook XML 4.2 for Samba 3.0 was done by Alexander
251 Bokovoy.
252
253
254
255Samba 3.6 04/11/2016 SMBCACLS(1)