Debian Codegraph @

upstream/mageia-cauldron/man8/net.8

raw
1 '\" t
2 .\" Title: net
3 .\" Author: [see the "AUTHOR" section]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\" Date: 05/28/2026
6 .\" Manual: System Administration tools
7 .\" Source: Samba 4.23.8
8 .\" Language: English
9 .\"
10 .TH "NET" "8" "05/28/2026" "Samba 4\&.23\&.8" "System Administration tools"
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 net \- Tool for administration of Samba and remote CIFS servers\&.
32 .SH "SYNOPSIS"
33 .HP \w'\ 'u
34 net {<ads|rap|rpc>} [\-h|\-\-help] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] [\-\-configfile=CONFIGFILE] [\-\-option=name=value] [\-l|\-\-log\-basename=LOGFILEBASE] [\-\-leak\-report] [\-\-leak\-report\-full] [\-R|\-\-name\-resolve=NAME\-RESOLVE\-ORDER] [\-O|\-\-socket\-options=SOCKETOPTIONS] [\-m|\-\-max\-protocol=MAXPROTOCOL] [\-n|\-\-netbiosname=NETBIOSNAME] [\-\-netbios\-scope=SCOPE] [\-W|\-\-workgroup=WORKGROUP] [\-\-realm=REALM] [\-U|\-\-user=[DOMAIN/]USERNAME[%PASSWORD]] [\-N|\-\-no\-pass] [\-\-password=STRING] [\-\-pw\-nt\-hash] [\-A|\-\-authentication\-file=FILE] [\-P|\-\-machine\-pass] [\-\-simple\-bind\-dn=DN] [\-\-use\-kerberos=desired|required|off] [\-\-use\-krb5\-ccache=CCACHE] [\-\-use\-winbind\-ccache] [\-\-client\-protection=sign|encrypt|off] [\-V|\-\-version] [\-w|\-\-target\-workgroup\ workgroup] [\-I|\-\-ipaddress\ ip\-address] [\-p|\-\-port\ port] [\-\-myname] [\-S|\-\-server\ server] [\-\-long] [\-v|\-\-verbose] [\-f|\-\-force] [\-\-request\-timeout\ seconds] [\-t|\-\-timeout\ seconds] [\-\-dns\-ttl\ TTL\-IN\-SECONDS] [\-i|\-\-stdin] [\-\-witness\-registration=REGISTRATION_UUID] [\-\-witness\-net\-name=REGEX] [\-\-witness\-share\-name=REGEX] [\-\-witness\-ip\-address=REGEX] [\-\-witness\-client\-computer\-name=REGEX] [\-\-witness\-apply\-to\-all] [\-\-witness\-new\-node=NODEID] [\-\-witness\-new\-ip=IPADDRESS] [\-\-witness\-forced\-response=JSON]
35 .SH "DESCRIPTION"
36 .PP
37 This tool is part of the
38 \fBsamba\fR(7)
39 suite\&.
40 .PP
41 The Samba net utility is meant to work just like the net utility available for windows and DOS\&. The first argument should be used to specify the protocol to use when executing a certain command\&. ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3) clients and RPC can be used for NT4 and Windows 2000\&. If this argument is omitted, net will try to determine it automatically\&. Not all commands are available on all protocols\&.
42 .SH "OPTIONS"
43 .PP
44 \-w|\-\-target\-workgroup target\-workgroup
45 .RS 4
46 Sets target workgroup or domain\&. You have to specify either this option or the IP address or the name of a server\&.
47 .RE
48 .PP
49 \-I|\-\-ipaddress ip\-address
50 .RS 4
51 IP address of target server to use\&. You have to specify either this option or a target workgroup or a target server\&.
52 .RE
53 .PP
54 \-p|\-\-port port
55 .RS 4
56 Port on the target server to connect to (usually 139 or 445)\&. Defaults to trying 445 first, then 139\&.
57 .RE
58 .PP
59 \-S|\-\-server server
60 .RS 4
61 Name of target server\&. You should specify either this option or a target workgroup or a target IP address\&.
62 .RE
63 .PP
64 \-\-long
65 .RS 4
66 When listing data, give more information on each item\&.
67 .RE
68 .PP
69 \-v|\-\-verbose
70 .RS 4
71 When listing data, give more verbose information on each item\&.
72 .RE
73 .PP
74 \-f|\-\-force
75 .RS 4
76 Enforcing a net command\&.
77 .RE
78 .PP
79 \-\-request\-timeout 30
80 .RS 4
81 Let client requests timeout after 30 seconds the default is 10 seconds\&.
82 .RE
83 .PP
84 \-t|\-\-timeout 30
85 .RS 4
86 Set timeout for client operations to 30 seconds\&.
87 .RE
88 .PP
89 \-i|\-\-stdin
90 .RS 4
91 Take input for net commands from standard input\&.
92 .RE
93 .PP
94 \-T|\-\-test
95 .RS 4
96 Only test command sequence, dry\-run\&.
97 .RE
98 .PP
99 \-F|\-\-flags FLAGS
100 .RS 4
101 Pass down integer flags to a net subcommand\&.
102 .RE
103 .PP
104 \-C|\-\-comment COMMENT
105 .RS 4
106 Pass down a comment string to a net subcommand\&.
107 .RE
108 .PP
109 \-\-myname MYNAME
110 .RS 4
111 Use MYNAME as a requester name for a net subcommand\&.
112 .RE
113 .PP
114 \-c|\-\-container CONTAINER
115 .RS 4
116 Use a specific AD container for net ads operations\&.
117 .RE
118 .PP
119 \-M|\-\-maxusers MAXUSERS
120 .RS 4
121 Fill in the maxusers field in net rpc share operations\&.
122 .RE
123 .PP
124 \-r|\-\-reboot
125 .RS 4
126 Reboot a remote machine after a command has been successfully executed (e\&.g\&. in remote join operations)\&.
127 .RE
128 .PP
129 \-\-force\-full\-repl
130 .RS 4
131 When calling "net rpc vampire keytab" this option enforces a full re\-creation of the generated keytab file\&.
132 .RE
133 .PP
134 \-\-single\-obj\-repl
135 .RS 4
136 When calling "net rpc vampire keytab" this option allows one to replicate just a single object to the generated keytab file\&.
137 .RE
138 .PP
139 \-\-clean\-old\-entries
140 .RS 4
141 When calling "net rpc vampire keytab" this option allows one to cleanup old entries from the generated keytab file\&.
142 .RE
143 .PP
144 \-\-db
145 .RS 4
146 Define dbfile for "net idmap" commands\&.
147 .RE
148 .PP
149 \-\-lock
150 .RS 4
151 Activates locking of the dbfile for "net idmap check" command\&.
152 .RE
153 .PP
154 \-a|\-\-auto
155 .RS 4
156 Activates noninteractive mode in "net idmap check"\&.
157 .RE
158 .PP
159 \-\-repair
160 .RS 4
161 Activates repair mode in "net idmap check"\&.
162 .RE
163 .PP
164 \-\-acls
165 .RS 4
166 Includes ACLs to be copied in "net rpc share migrate"\&.
167 .RE
168 .PP
169 \-\-attrs
170 .RS 4
171 Includes file attributes to be copied in "net rpc share migrate"\&.
172 .RE
173 .PP
174 \-\-timestamps
175 .RS 4
176 Includes timestamps to be copied in "net rpc share migrate"\&.
177 .RE
178 .PP
179 \-X|\-\-exclude DIRECTORY
180 .RS 4
181 Allows one to exclude directories when copying with "net rpc share migrate"\&.
182 .RE
183 .PP
184 \-\-destination SERVERNAME
185 .RS 4
186 Defines the target servername of migration process (defaults to localhost)\&.
187 .RE
188 .PP
189 \-L|\-\-local
190 .RS 4
191 Sets the type of group mapping to local (used in "net groupmap set")\&.
192 .RE
193 .PP
194 \-D|\-\-domain
195 .RS 4
196 Sets the type of group mapping to domain (used in "net groupmap set")\&.
197 .RE
198 .PP
199 \-N|\-\-ntname NTNAME
200 .RS 4
201 Sets the ntname of a group mapping (used in "net groupmap set")\&.
202 .RE
203 .PP
204 \-\-rid RID
205 .RS 4
206 Sets the rid of a group mapping (used in "net groupmap set")\&.
207 .RE
208 .PP
209 \-\-reg\-version REG_VERSION
210 .RS 4
211 Assume database version {n|1,2,3} (used in "net registry check")\&.
212 .RE
213 .PP
214 \-o|\-\-output FILENAME
215 .RS 4
216 Output database file (used in "net registry check")\&.
217 .RE
218 .PP
219 \-\-wipe
220 .RS 4
221 Create a new database from scratch (used in "net registry check")\&.
222 .RE
223 .PP
224 \-\-precheck PRECHECK_DB_FILENAME
225 .RS 4
226 Defines filename for database prechecking (used in "net registry import")\&.
227 .RE
228 .PP
229 \-\-no\-dns\-updates
230 .RS 4
231 Do not perform DNS updates as part of "net ads join"\&.
232 .RE
233 .PP
234 \-\-keep\-account
235 .RS 4
236 Prevent the machine account removal as part of "net ads leave"\&.
237 .RE
238 .PP
239 \-\-json
240 .RS 4
241 Report results in JSON format for "net ads info" and "net ads lookup"\&.
242 .RE
243 .PP
244 \-\-recursive
245 .RS 4
246 Traverse a directory hierarchy\&.
247 .RE
248 .PP
249 \-\-continue
250 .RS 4
251 Continue traversing a directory hierarchy in case conversion of one file fails\&.
252 .RE
253 .PP
254 \-\-follow\-symlinks
255 .RS 4
256 Follow symlinks encountered while traversing a directory\&.
257 .RE
258 .PP
259 \-\-dns\-ttl TTL\-IN\-SECONDS
260 .RS 4
261 Specify the Time to Live (TTL) of DNS records\&. DNS records will be created or updated with the given TTL\&. The TTL is specified in seconds\&. Can be used with "net ads dns register" and "net ads join"\&. The default is 3600 seconds\&.
262 .RE
263 .PP
264 \-\-witness\-registration=REGISTRATION_UUID
265 .RS 4
266 This does a direct lookup for REGISTRATION_UUID instead of doing a database traversal\&.
267 .RE
268 .PP
269 \-\-witness\-net\-name=REGEX
270 .RS 4
271 This specifies the \*(Aqserver name\*(Aq the client registered for monitoring\&.
272 .RE
273 .PP
274 \-\-witness\-share\-name=REGEX
275 .RS 4
276 This specifies the \*(Aqshare name\*(Aq the client registered for monitoring\&. Note that the share name is optional in the registration, otherwise an empty string is matched\&.
277 .RE
278 .PP
279 \-\-witness\-ip\-address=REGEX
280 .RS 4
281 This specifies the ip address the client registered for monitoring\&.
282 .RE
283 .PP
284 \-\-witness\-client\-computer\-name=REGEX
285 .RS 4
286 This specifies the client computer name the client specified in the registration\&. Note it is just a string chosen by the client itself\&.
287 .RE
288 .PP
289 \-\-witness\-apply\-to\-all
290 .RS 4
291 This selects all registrations\&.
292 .RE
293 .PP
294 \-\-witness\-new\-node=NODEID
295 .RS 4
296 By specifying a NODEID all ip addresses currently available on the given node are included in the response\&. By specifying \*(Aq\-1\*(Aq as NODEID all ip addresses of the cluster are included in the response\&.
297 .RE
298 .PP
299 \-\-witness\-new\-ip=IPADDRESS
300 .RS 4
301 By specifying an IPADDRESS only the specified ip address is included in the response\&.
302 .RE
303 .PP
304 \-\-witness\-forced\-response=JSON
305 .RS 4
306 This allows the generation of very complex witness_notifyResponse structures\&.
307 .RE
308 .PP
309 \-d|\-\-debuglevel=level
310 .RS 4
311 \fIlevel\fR
312 is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&.
313 .sp
314 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\&.
315 .sp
316 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\&.
317 .sp
318 Note that specifying this parameter here will override the
319 \m[blue]\fBlog level\fR\m[]
320 parameter in the
321 /etc/samba/smb\&.conf
322 file\&.
323 .RE
324 .PP
325 \-\-debug\-stdout
326 .RS 4
327 This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&.
328 .RE
329 .PP
330 \-\-configfile=<configuration file>
331 .RS 4
332 The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as
333 \m[blue]\fBclient smb encrypt\fR\m[]\&. See
334 /etc/samba/smb\&.conf
335 for more information\&. The default configuration file name is determined at compile time\&.
336 .RE
337 .PP
338 \-\-option=<name>=<value>
339 .RS 4
340 Set the
341 \fBsmb.conf\fR(5)
342 option "<name>" to value "<value>" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&.
343 .RE
344 .PP
345 \-l|\-\-log\-basename=logdirectory
346 .RS 4
347 Base directory name for log/debug files\&. The extension
348 \fB"\&.progname"\fR
349 will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&.
350 .RE
351 .PP
352 \-\-leak\-report
353 .RS 4
354 Enable talloc leak reporting on exit\&.
355 .RE
356 .PP
357 \-\-leak\-report\-full
358 .RS 4
359 Enable full talloc leak reporting on exit\&.
360 .RE
361 .PP
362 \-V|\-\-version
363 .RS 4
364 Prints the program version number\&.
365 .RE
366 .PP
367 \-R|\-\-name\-resolve=NAME\-RESOLVE\-ORDER
368 .RS 4
369 This option is used to determine what naming services and in what order to resolve host names to IP addresses\&. The option takes a space\-separated string of different name resolution options\&. The best is to wrap the whole \-\-name\-resolve=NAME\-RESOLVE\-ORDER into quotes\&.
370 .sp
371 The options are: "lmhosts", "host", "wins" and "bcast"\&. They cause names to be resolved as follows:
372 .RS
373 .sp
374 .RS 4
375 .ie n \{\
376 \h'-04'\(bu\h'+03'\c
377 .\}
378 .el \{\
379 .sp -1
380 .IP \(bu 2.3
381 .\}
382 \fBlmhosts\fR: Lookup an IP address in the Samba lmhosts file\&. If the line in lmhosts has no name type attached to the NetBIOS name (see the
383 \fBlmhosts\fR(5)
384 for details) then any name type matches for lookup\&.
385 .RE
386 .sp
387 .RS 4
388 .ie n \{\
389 \h'-04'\(bu\h'+03'\c
390 .\}
391 .el \{\
392 .sp -1
393 .IP \(bu 2.3
394 .\}
395 \fBhost\fR: Do a standard host name to IP address resolution, using the system
396 /etc/hosts, NIS, or DNS lookups\&. This method of name resolution is operating system dependent, for instance on IRIX or Solaris this may be controlled by the
397 /etc/nsswitch\&.conf
398 file)\&. Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored\&.
399 .RE
400 .sp
401 .RS 4
402 .ie n \{\
403 \h'-04'\(bu\h'+03'\c
404 .\}
405 .el \{\
406 .sp -1
407 .IP \(bu 2.3
408 .\}
409 \fBwins\fR: Query a name with the IP address listed in the
410 \fIwins server\fR
411 parameter\&. If no WINS server has been specified this method will be ignored\&.
412 .RE
413 .sp
414 .RS 4
415 .ie n \{\
416 \h'-04'\(bu\h'+03'\c
417 .\}
418 .el \{\
419 .sp -1
420 .IP \(bu 2.3
421 .\}
422 \fBbcast\fR: Do a broadcast on each of the known local interfaces listed in the
423 \fIinterfaces\fR
424 parameter\&. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet\&.
425 .RE
426 .sp
427 .RE
428 If this parameter is not set then the name resolve order defined in the
429 /etc/samba/smb\&.conf
430 file parameter (\m[blue]\fBname resolve order\fR\m[]) will be used\&.
431 .sp
432 The default order is lmhosts, host, wins, bcast\&. Without this parameter or any entry in the
433 \m[blue]\fBname resolve order\fR\m[]
434 parameter of the
435 /etc/samba/smb\&.conf
436 file, the name resolution methods will be attempted in this order\&.
437 .RE
438 .PP
439 \-O|\-\-socket\-options=SOCKETOPTIONS
440 .RS 4
441 TCP socket options to set on the client socket\&. See the socket options parameter in the
442 /etc/samba/smb\&.conf
443 manual page for the list of valid options\&.
444 .RE
445 .PP
446 \-m|\-\-max\-protocol=MAXPROTOCOL
447 .RS 4
448 The value of the parameter (a string) is the highest protocol level that will be supported by the client\&.
449 .sp
450 Note that specifying this parameter here will override the
451 \m[blue]\fBclient max protocol\fR\m[]
452 parameter in the
453 /etc/samba/smb\&.conf
454 file\&.
455 .RE
456 .PP
457 \-n|\-\-netbiosname=NETBIOSNAME
458 .RS 4
459 This option allows you to override the NetBIOS name that Samba uses for itself\&. This is identical to setting the
460 \m[blue]\fBnetbios name\fR\m[]
461 parameter in the
462 /etc/samba/smb\&.conf
463 file\&. However, a command line setting will take precedence over settings in
464 /etc/samba/smb\&.conf\&.
465 .RE
466 .PP
467 \-\-netbios\-scope=SCOPE
468 .RS 4
469 This specifies a NetBIOS scope that
470 nmblookup
471 will use to communicate with when generating NetBIOS names\&. For details on the use of NetBIOS scopes, see rfc1001\&.txt and rfc1002\&.txt\&. NetBIOS scopes are
472 \fIvery\fR
473 rarely used, only set this parameter if you are the system administrator in charge of all the NetBIOS systems you communicate with\&.
474 .RE
475 .PP
476 \-W|\-\-workgroup=WORKGROUP
477 .RS 4
478 Set the SMB domain of the username\&. This overrides the default domain which is the domain defined in smb\&.conf\&. If the domain specified is the same as the servers NetBIOS name, it causes the client to log on using the servers local SAM (as opposed to the Domain SAM)\&.
479 .sp
480 Note that specifying this parameter here will override the
481 \m[blue]\fBworkgroup\fR\m[]
482 parameter in the
483 /etc/samba/smb\&.conf
484 file\&.
485 .RE
486 .PP
487 \-r|\-\-realm=REALM
488 .RS 4
489 Set the realm for the domain\&.
490 .sp
491 Note that specifying this parameter here will override the
492 \m[blue]\fBrealm\fR\m[]
493 parameter in the
494 /etc/samba/smb\&.conf
495 file\&.
496 .RE
497 .PP
498 \-U|\-\-user=[DOMAIN\e]USERNAME[%PASSWORD]
499 .RS 4
500 Sets the SMB username or username and password\&.
501 .sp
502 If %PASSWORD is not specified, the user will be prompted\&. The client will first check the
503 \fBUSER\fR
504 environment variable (which is also permitted to also contain the password separated by a %), then the
505 \fBLOGNAME\fR
506 variable (which is not permitted to contain a password) and if either exists, the value is used\&. If these environmental variables are not found, the username found in a Kerberos Credentials cache may be used\&.
507 .sp
508 A 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
509 \fI\-A\fR
510 for more details\&.
511 .sp
512 Be cautious about including passwords in scripts or passing user\-supplied values onto the command line\&. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with
513 kinit\&.
514 .sp
515 While Samba will attempt to scrub the password from the process title (as seen in ps), this is after startup and so is subject to a race\&.
516 .RE
517 .PP
518 \-N|\-\-no\-pass
519 .RS 4
520 If 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\&.
521 .sp
522 Unless a password is specified on the command line or this parameter is specified, the client will request a password\&.
523 .sp
524 If a password is specified on the command line and this option is also defined the password on the command line will be silently ignored and no password will be used\&.
525 .RE
526 .PP
527 \-\-password
528 .RS 4
529 Specify the password on the commandline\&.
530 .sp
531 Be cautious about including passwords in scripts or passing user\-supplied values onto the command line\&. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with
532 kinit\&.
533 .sp
534 If \-\-password is not specified, the tool will check the
535 \fBPASSWD\fR
536 environment variable, followed by
537 \fBPASSWD_FD\fR
538 which is expected to contain an open file descriptor (FD) number\&.
539 .sp
540 Finally it will check
541 \fBPASSWD_FILE\fR
542 (containing a file path to be opened)\&. The file should only contain the password\&. Make certain that the permissions on the file restrict access from unwanted users!
543 .sp
544 While Samba will attempt to scrub the password from the process title (as seen in ps), this is after startup and so is subject to a race\&.
545 .RE
546 .PP
547 \-\-pw\-nt\-hash
548 .RS 4
549 The supplied password is the NT hash\&.
550 .RE
551 .PP
552 \-A|\-\-authentication\-file=filename
553 .RS 4
554 This 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:
555 .sp
556 .if n \{\
557 .RS 4
558 .\}
559 .nf
560 username = <value>
561 password = <value>
562 domain = <value>
563
564 .fi
565 .if n \{\
566 .RE
567 .\}
568 .sp
569 Make certain that the permissions on the file restrict access from unwanted users!
570 .RE
571 .PP
572 \-P|\-\-machine\-pass
573 .RS 4
574 Use stored machine account password\&.
575 .RE
576 .PP
577 \-\-simple\-bind\-dn=DN
578 .RS 4
579 DN to use for a simple bind\&.
580 .RE
581 .PP
582 \-\-use\-kerberos=desired|required|off
583 .RS 4
584 This parameter determines whether Samba client tools will try to authenticate using Kerberos\&. For Kerberos authentication you should use DNS names instead of IP addresses when connecting to a service\&. By default Samba client tools will try to use the default Kerberos credential cache (ccache)\&. In case the ccache does not exist or \-U|\-\-user option was specified, clients will ask to enter a password and will obtain a Kerberos ticket (kinit) for you\&. If you want to use an alternative Kerberos credentical cache, use the \-\-use\-krb5\-ccache option\&.
585 .sp
586 Note that specifying this parameter here will override the
587 \m[blue]\fBclient use kerberos\fR\m[]
588 parameter in the
589 /etc/samba/smb\&.conf
590 file\&.
591 .RE
592 .PP
593 \-\-use\-krb5\-ccache=CCACHE
594 .RS 4
595 Specifies the credential cache location for Kerberos authentication\&.
596 .sp
597 This will enforce \-\-use\-kerberos=required\&.
598 .RE
599 .PP
600 \-\-use\-winbind\-ccache
601 .RS 4
602 Try to use the credential cache by winbind\&.
603 .RE
604 .PP
605 \-\-client\-protection=sign|encrypt|off
606 .RS 4
607 Sets the connection protection the client tool should use\&.
608 .sp
609 Note that specifying this parameter here will override the
610 \m[blue]\fBclient protection\fR\m[]
611 parameter in the
612 /etc/samba/smb\&.conf
613 file\&.
614 .sp
615 In case you need more fine grained control you can use:
616 \-\-option=clientsmbencrypt=OPTION,
617 \-\-option=clientipcsigning=OPTION,
618 \-\-option=clientsigning=OPTION\&.
619 .RE
620 .SH "COMMANDS"
621 .SS "CHANGESECRETPW"
622 .PP
623 This command allows the Samba machine account password to be set from an external application to a machine account password that has already been stored in Active Directory\&. DO NOT USE this command unless you know exactly what you are doing\&. The use of this command requires that the force flag (\-f) be used also\&. There will be NO command prompt\&. Whatever information is piped into stdin, either by typing at the command line or otherwise, will be stored as the literal machine password\&. Do NOT use this without care and attention as it will overwrite a legitimate machine password without warning\&. YOU HAVE BEEN WARNED\&.
624 .SS "TIME"
625 .PP
626 The
627 NET TIME
628 command allows you to view the time on a remote server or synchronise the time on the local server with the time on the remote server\&.
629 .SS "TIME"
630 .PP
631 Without any options, the
632 NET TIME
633 command displays the time on the remote server\&. The remote server must be specified with the \-S option\&.
634 .SS "TIME SYSTEM"
635 .PP
636 Displays the time on the remote server in a format ready for
637 /bin/date\&. The remote server must be specified with the \-S option\&.
638 .SS "TIME SET"
639 .PP
640 Tries to set the date and time of the local server to that on the remote server using
641 /bin/date\&. The remote server must be specified with the \-S option\&.
642 .SS "TIME ZONE"
643 .PP
644 Displays the timezone in hours from GMT on the remote server\&. The remote server must be specified with the \-S option\&.
645 .SS "[RPC|ADS] JOIN [TYPE] [\-\-no\-dns\-updates] [\-U username[%password]] [dnshostname=FQDN] [createupn=UPN] [createcomputer=OU] [machinepass=PASS] [osName=string osVer=string] [options]"
646 .PP
647 Join a domain\&. If the account already exists on the server, and [TYPE] is MEMBER, the machine will attempt to join automatically\&. (Assuming that the machine has been created in server manager) Otherwise, a password will be prompted for, and a new account may be created\&.
648 .PP
649 [TYPE] may be PDC, BDC or MEMBER to specify the type of server joining the domain\&.
650 .PP
651 [FQDN] (ADS only) set the dnsHostName attribute during the join\&. The default format is netbiosname\&.dnsdomain\&.
652 .PP
653 [UPN] (ADS only) set the principalname attribute during the join\&. The default format is host/netbiosname@REALM\&.
654 .PP
655 [OU] (ADS only) Precreate the computer account in a specific OU\&. The OU string reads from top to bottom without RDNs, and is delimited by a \*(Aq/\*(Aq\&. Please note that \*(Aq\e\*(Aq is used for escape by both the shell and ldap, so it may need to be doubled or quadrupled to pass through, and it is not used as a delimiter\&.
656 .PP
657 [PASS] (ADS only) Set a specific password on the computer account being created by the join\&.
658 .PP
659 [osName=string osVer=String] (ADS only) Set the operatingSystem and operatingSystemVersion attribute during the join\&. Both parameters must be specified for either to take effect\&.
660 .SS "[RPC] OLDJOIN [options]"
661 .PP
662 Join a domain\&. Use the OLDJOIN option to join the domain using the old style of domain joining \- you need to create a trust account in server manager first\&.
663 .SS "[RPC|ADS] USER"
664 .SS "[RPC|ADS] USER"
665 .PP
666 List all users
667 .SS "[RPC|ADS] USER DELETE target"
668 .PP
669 Delete specified user
670 .SS "[RPC|ADS] USER INFO target"
671 .PP
672 List the domain groups of the specified user\&.
673 .SS "[RPC|ADS] USER RENAME oldname newname"
674 .PP
675 Rename specified user\&.
676 .SS "[RPC|ADS] USER ADD name [password] [-F user flags] [-C comment]"
677 .PP
678 Add specified user\&.
679 .SS "[RPC|ADS] GROUP"
680 .SS "[RPC|ADS] GROUP [misc options] [targets]"
681 .PP
682 List user groups\&.
683 .SS "[RPC|ADS] GROUP DELETE name [misc. options]"
684 .PP
685 Delete specified group\&.
686 .SS "[RPC|ADS] GROUP ADD name [-C comment]"
687 .PP
688 Create specified group\&.
689 .SS "[ADS] LOOKUP"
690 .PP
691 Lookup the closest Domain Controller in our domain and retrieve server information about it\&.
692 .SS "[RAP|RPC] SHARE"
693 .SS "[RAP|RPC] SHARE [misc. options] [targets]"
694 .PP
695 Enumerates all exported resources (network shares) on target server\&.
696 .SS "[RAP|RPC] SHARE ADD name=serverpath [-C comment] [-M maxusers] [targets]"
697 .PP
698 Adds a share from a server (makes the export active)\&. Maxusers specifies the number of users that can be connected to the share simultaneously\&.
699 .SS "SHARE DELETE sharename"
700 .PP
701 Delete specified share\&.
702 .SS "[RPC|RAP] FILE"
703 .SS "[RPC|RAP] FILE"
704 .PP
705 List all open files on remote server\&.
706 .SS "[RPC|RAP] FILE CLOSE fileid"
707 .PP
708 Close file with specified
709 \fIfileid\fR
710 on remote server\&.
711 .SS "[RPC|RAP] FILE INFO fileid"
712 .PP
713 Print information on specified
714 \fIfileid\fR\&. Currently listed are: file\-id, username, locks, path, permissions\&.
715 .SS "[RAP|RPC] FILE USER user"
716 .PP
717 List files opened by specified
718 \fIuser\fR\&. Please note that
719 net rap file user
720 does not work against Samba servers\&.
721 .SS "SESSION"
722 .SS "RAP SESSION"
723 .PP
724 Without any other options, SESSION enumerates all active SMB/CIFS sessions on the target server\&.
725 .SS "RAP SESSION DELETE|CLOSE CLIENT_NAME"
726 .PP
727 Close the specified sessions\&.
728 .SS "RAP SESSION INFO CLIENT_NAME"
729 .PP
730 Give a list with all the open files in specified session\&.
731 .SS "RAP SERVER \fIDOMAIN\fR"
732 .PP
733 List all servers in specified domain or workgroup\&. Defaults to local domain\&.
734 .SS "RAP DOMAIN"
735 .PP
736 Lists all domains and workgroups visible on the current network\&.
737 .SS "RAP PRINTQ"
738 .SS "RAP PRINTQ INFO QUEUE_NAME"
739 .PP
740 Lists the specified print queue and print jobs on the server\&. If the
741 \fIQUEUE_NAME\fR
742 is omitted, all queues are listed\&.
743 .SS "RAP PRINTQ DELETE JOBID"
744 .PP
745 Delete job with specified id\&.
746 .SS "RAP VALIDATE \fIuser\fR [\fIpassword\fR]"
747 .PP
748 Validate whether the specified user can log in to the remote server\&. If the password is not specified on the commandline, it will be prompted\&.
749 .if n \{\
750 .sp
751 .\}
752 .RS 4
753 .it 1 an-trap
754 .nr an-no-space-flag 1
755 .nr an-break-flag 1
756 .br
757 .ps +1
758 \fBNote\fR
759 .ps -1
760 .br
761 .PP
762 Currently NOT implemented\&.
763 .sp .5v
764 .RE
765 .SS "RAP GROUPMEMBER"
766 .SS "RAP GROUPMEMBER LIST GROUP"
767 .PP
768 List all members of the specified group\&.
769 .SS "RAP GROUPMEMBER DELETE GROUP USER"
770 .PP
771 Delete member from group\&.
772 .SS "RAP GROUPMEMBER ADD GROUP USER"
773 .PP
774 Add member to group\&.
775 .SS "RAP ADMIN \fIcommand\fR"
776 .PP
777 Execute the specified
778 \fIcommand\fR
779 on the remote server\&. Only works with OS/2 servers\&.
780 .if n \{\
781 .sp
782 .\}
783 .RS 4
784 .it 1 an-trap
785 .nr an-no-space-flag 1
786 .nr an-break-flag 1
787 .br
788 .ps +1
789 \fBNote\fR
790 .ps -1
791 .br
792 .PP
793 Currently NOT implemented\&.
794 .sp .5v
795 .RE
796 .SS "RAP SERVICE"
797 .SS "RAP SERVICE START NAME [arguments...]"
798 .PP
799 Start the specified service on the remote server\&. Not implemented yet\&.
800 .if n \{\
801 .sp
802 .\}
803 .RS 4
804 .it 1 an-trap
805 .nr an-no-space-flag 1
806 .nr an-break-flag 1
807 .br
808 .ps +1
809 \fBNote\fR
810 .ps -1
811 .br
812 .PP
813 Currently NOT implemented\&.
814 .sp .5v
815 .RE
816 .SS "RAP SERVICE STOP"
817 .PP
818 Stop the specified service on the remote server\&.
819 .if n \{\
820 .sp
821 .\}
822 .RS 4
823 .it 1 an-trap
824 .nr an-no-space-flag 1
825 .nr an-break-flag 1
826 .br
827 .ps +1
828 \fBNote\fR
829 .ps -1
830 .br
831 .PP
832 Currently NOT implemented\&.
833 .sp .5v
834 .RE
835 .SS "RAP PASSWORD \fIUSER\fR \fIOLDPASS\fR \fINEWPASS\fR"
836 .PP
837 Change password of
838 \fIUSER\fR
839 from
840 \fIOLDPASS\fR
841 to
842 \fINEWPASS\fR\&.
843 .SS "LOOKUP"
844 .SS "LOOKUP HOST HOSTNAME [TYPE]"
845 .PP
846 Lookup the IP address of the given host with the specified type (netbios suffix)\&. The type defaults to 0x20 (workstation)\&.
847 .SS "LOOKUP LDAP [DOMAIN]"
848 .PP
849 Give IP address of LDAP server of specified
850 \fIDOMAIN\fR\&. Defaults to local domain\&.
851 .SS "LOOKUP KDC [REALM]"
852 .PP
853 Give IP address of KDC for the specified
854 \fIREALM\fR\&. Defaults to local realm\&.
855 .SS "LOOKUP DC [DOMAIN]"
856 .PP
857 Give IP\*(Aqs of Domain Controllers for specified
858 \fI DOMAIN\fR\&. Defaults to local domain\&.
859 .SS "LOOKUP MASTER DOMAIN"
860 .PP
861 Give IP of master browser for specified
862 \fIDOMAIN\fR
863 or workgroup\&. Defaults to local domain\&.
864 .SS "LOOKUP NAME [NAME]"
865 .PP
866 Lookup username\*(Aqs sid and type for specified
867 \fINAME\fR
868 .SS "LOOKUP SID [SID]"
869 .PP
870 Give sid\*(Aqs name and type for specified
871 \fISID\fR
872 .SS "LOOKUP DSGETDCNAME [NAME] [FLAGS] [SITENAME]"
873 .PP
874 Give Domain Controller information for specified domain
875 \fINAME\fR
876 .SS "CACHE"
877 .PP
878 Samba uses a general caching interface called \*(Aqgencache\*(Aq\&. It can be controlled using \*(AqNET CACHE\*(Aq\&.
879 .PP
880 All the timeout parameters support the suffixes:
881 .RS 4
882 s \- Seconds
883 .RE
884 .RS 4
885 m \- Minutes
886 .RE
887 .RS 4
888 h \- Hours
889 .RE
890 .RS 4
891 d \- Days
892 .RE
893 .RS 4
894 w \- Weeks
895 .RE
896 .SS "CACHE ADD key data time-out"
897 .PP
898 Add specified key+data to the cache with the given timeout\&.
899 .SS "CACHE DEL key"
900 .PP
901 Delete key from the cache\&.
902 .SS "CACHE SET key data time-out"
903 .PP
904 Update data of existing cache entry\&.
905 .SS "CACHE SEARCH PATTERN"
906 .PP
907 Search for the specified pattern in the cache data\&.
908 .SS "CACHE LIST"
909 .PP
910 List all current items in the cache\&.
911 .SS "CACHE FLUSH"
912 .PP
913 Remove all the current items from the cache\&.
914 .SS "GETLOCALSID [DOMAIN]"
915 .PP
916 Prints the SID of the specified domain, or if the parameter is omitted, the SID of the local server\&.
917 .SS "SETLOCALSID S\-1\-5\-21\-x\-y\-z"
918 .PP
919 Sets SID for the local server to the specified SID\&.
920 .SS "GETDOMAINSID"
921 .PP
922 Prints the local machine SID and the SID of the current domain\&.
923 .SS "SETDOMAINSID"
924 .PP
925 Sets the SID of the current domain\&.
926 .SS "GROUPMAP"
927 .PP
928 Manage the mappings between Windows group SIDs and UNIX groups\&. Common options include:
929 .RS
930 .sp
931 .RS 4
932 .ie n \{\
933 \h'-04'\(bu\h'+03'\c
934 .\}
935 .el \{\
936 .sp -1
937 .IP \(bu 2.3
938 .\}
939 unixgroup \- Name of the UNIX group
940 .RE
941 .sp
942 .RS 4
943 .ie n \{\
944 \h'-04'\(bu\h'+03'\c
945 .\}
946 .el \{\
947 .sp -1
948 .IP \(bu 2.3
949 .\}
950 ntgroup \- Name of the Windows NT group (must be resolvable to a SID
951 .RE
952 .sp
953 .RS 4
954 .ie n \{\
955 \h'-04'\(bu\h'+03'\c
956 .\}
957 .el \{\
958 .sp -1
959 .IP \(bu 2.3
960 .\}
961 rid \- Unsigned 32\-bit integer
962 .RE
963 .sp
964 .RS 4
965 .ie n \{\
966 \h'-04'\(bu\h'+03'\c
967 .\}
968 .el \{\
969 .sp -1
970 .IP \(bu 2.3
971 .\}
972 sid \- Full SID in the form of "S\-1\-\&.\&.\&."
973 .RE
974 .sp
975 .RS 4
976 .ie n \{\
977 \h'-04'\(bu\h'+03'\c
978 .\}
979 .el \{\
980 .sp -1
981 .IP \(bu 2.3
982 .\}
983 type \- Type of the group; either \*(Aqdomain\*(Aq, \*(Aqlocal\*(Aq, or \*(Aqbuiltin\*(Aq
984 .RE
985 .sp
986 .RS 4
987 .ie n \{\
988 \h'-04'\(bu\h'+03'\c
989 .\}
990 .el \{\
991 .sp -1
992 .IP \(bu 2.3
993 .\}
994 comment \- Freeform text description of the group
995 .RE
996 .sp
997 .RE
998 .SS "GROUPMAP ADD"
999 .PP
1000 Add a new group mapping entry:
1001 .sp
1002 .if n \{\
1003 .RS 4
1004 .\}
1005 .nf
1006 net groupmap add {rid=int|sid=string} unixgroup=string \e
1007 [type={domain|local}] [ntgroup=string] [comment=string]
1008 .fi
1009 .if n \{\
1010 .RE
1011 .\}
1012 .sp
1013
1014 .SS "GROUPMAP DELETE"
1015 .PP
1016 Delete a group mapping entry\&. If more than one group name matches, the first entry found is deleted\&.
1017 .PP
1018 net groupmap delete {ntgroup=string|sid=SID}
1019 .SS "GROUPMAP MODIFY"
1020 .PP
1021 Update an existing group entry\&.
1022 .PP
1023 .if n \{\
1024 .RS 4
1025 .\}
1026 .nf
1027 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \e
1028 [comment=string] [type={domain|local}]
1029 .fi
1030 .if n \{\
1031 .RE
1032 .\}
1033 .sp
1034
1035 .SS "GROUPMAP LIST"
1036 .PP
1037 List existing group mapping entries\&.
1038 .PP
1039 net groupmap list [verbose] [ntgroup=string] [sid=SID]
1040 .SS "MAXRID"
1041 .PP
1042 Prints out the highest RID currently in use on the local server (by the active \*(Aqpassdb backend\*(Aq)\&.
1043 .SS "RPC INFO"
1044 .PP
1045 Print information about the domain of the remote server, such as domain name, domain sid and number of users and groups\&.
1046 .SS "[RPC|ADS] TESTJOIN"
1047 .PP
1048 Check whether participation in a domain is still valid\&.
1049 .SS "[RPC|ADS] CHANGETRUSTPW"
1050 .PP
1051 Force change of domain trust password\&.
1052 .SS "RPC TRUSTDOM"
1053 .SS "RPC TRUSTDOM ADD DOMAIN"
1054 .PP
1055 Add a interdomain trust account for
1056 \fIDOMAIN\fR\&. This is in fact a Samba account named
1057 \fIDOMAIN$\fR
1058 with the account flag
1059 \fB\*(AqI\*(Aq\fR
1060 (interdomain trust account)\&. This is required for incoming trusts to work\&. It makes Samba be a trusted domain of the foreign (trusting) domain\&. Users of the Samba domain will be made available in the foreign domain\&. If the command is used against localhost it has the same effect as
1061 smbpasswd \-a \-i DOMAIN\&. Please note that both commands expect a appropriate UNIX account\&.
1062 .SS "RPC TRUSTDOM DEL DOMAIN"
1063 .PP
1064 Remove interdomain trust account for
1065 \fIDOMAIN\fR\&. If it is used against localhost it has the same effect as
1066 smbpasswd \-x DOMAIN$\&.
1067 .SS "RPC TRUSTDOM ESTABLISH DOMAIN"
1068 .PP
1069 Establish a trust relationship to a trusted domain\&. Interdomain account must already be created on the remote PDC\&. This is required for outgoing trusts to work\&. It makes Samba be a trusting domain of a foreign (trusted) domain\&. Users of the foreign domain will be made available in our domain\&. You\*(Aqll need winbind and a working idmap config to make them appear in your system\&.
1070 .SS "RPC TRUSTDOM REVOKE DOMAIN"
1071 .PP
1072 Abandon relationship to trusted domain
1073 .SS "RPC TRUSTDOM LIST"
1074 .PP
1075 List all interdomain trust relationships\&.
1076 .SS "RPC TRUST"
1077 .SS "RPC TRUST CREATE"
1078 .PP
1079 Create a trust object by calling lsaCreateTrustedDomainEx2\&. The can be done on a single server or on two servers at once with the possibility to use a random trust password\&.
1080 .PP
1081 \fBOptions:\fR
1082 .PP
1083 otherserver
1084 .RS 4
1085 Domain controller of the second domain
1086 .RE
1087 .PP
1088 otheruser
1089 .RS 4
1090 Admin user in the second domain
1091 .RE
1092 .PP
1093 otherdomainsid
1094 .RS 4
1095 SID of the second domain
1096 .RE
1097 .PP
1098 other_netbios_domain
1099 .RS 4
1100 NetBIOS (short) name of the second domain
1101 .RE
1102 .PP
1103 otherdomain
1104 .RS 4
1105 DNS (full) name of the second domain
1106 .RE
1107 .PP
1108 trustpw
1109 .RS 4
1110 Trust password
1111 .RE
1112 .PP
1113 \fBExamples:\fR
1114 .PP
1115 Create a trust object on srv1\&.dom1\&.dom for the domain dom2
1116 .RS 4
1117 .sp
1118 .if n \{\
1119 .RS 4
1120 .\}
1121 .nf
1122 net rpc trust create \e
1123 otherdomainsid=S\-x\-x\-xx\-xxxxxxxxxx\-xxxxxxxxxx\-xxxxxxxxx \e
1124 other_netbios_domain=dom2 \e
1125 otherdomain=dom2\&.dom \e
1126 trustpw=12345678 \e
1127 \-S srv1\&.dom1\&.dom
1128 .fi
1129 .if n \{\
1130 .RE
1131 .\}
1132 .RE
1133 .PP
1134 Create a trust relationship between dom1 and dom2
1135 .RS 4
1136 .sp
1137 .if n \{\
1138 .RS 4
1139 .\}
1140 .nf
1141 net rpc trust create \e
1142 otherserver=srv2\&.dom2\&.test \e
1143 otheruser=dom2adm \e
1144 \-S srv1\&.dom1\&.dom
1145 .fi
1146 .if n \{\
1147 .RE
1148 .\}
1149 .RE
1150 .SS "RPC TRUST DELETE"
1151 .PP
1152 Delete a trust object by calling lsaDeleteTrustedDomain\&. The can be done on a single server or on two servers at once\&.
1153 .PP
1154 \fBOptions:\fR
1155 .PP
1156 otherserver
1157 .RS 4
1158 Domain controller of the second domain
1159 .RE
1160 .PP
1161 otheruser
1162 .RS 4
1163 Admin user in the second domain
1164 .RE
1165 .PP
1166 otherdomainsid
1167 .RS 4
1168 SID of the second domain
1169 .RE
1170 .PP
1171 \fBExamples:\fR
1172 .PP
1173 Delete a trust object on srv1\&.dom1\&.dom for the domain dom2
1174 .RS 4
1175 .sp
1176 .if n \{\
1177 .RS 4
1178 .\}
1179 .nf
1180 net rpc trust delete \e
1181 otherdomainsid=S\-x\-x\-xx\-xxxxxxxxxx\-xxxxxxxxxx\-xxxxxxxxx \e
1182 \-S srv1\&.dom1\&.dom
1183 .fi
1184 .if n \{\
1185 .RE
1186 .\}
1187 .RE
1188 .PP
1189 Delete a trust relationship between dom1 and dom2
1190 .RS 4
1191 .sp
1192 .if n \{\
1193 .RS 4
1194 .\}
1195 .nf
1196 net rpc trust delete \e
1197 otherserver=srv2\&.dom2\&.test \e
1198 otheruser=dom2adm \e
1199 \-S srv1\&.dom1\&.dom
1200 .fi
1201 .if n \{\
1202 .RE
1203 .\}
1204 .RE
1205 .SS ""
1206 .SS "RPC RIGHTS"
1207 .PP
1208 This subcommand is used to view and manage Samba\*(Aqs rights assignments (also referred to as privileges)\&. There are three options currently available:
1209 \fIlist\fR,
1210 \fIgrant\fR, and
1211 \fIrevoke\fR\&. More details on Samba\*(Aqs privilege model and its use can be found in the Samba\-HOWTO\-Collection\&.
1212 .SS "RPC ABORTSHUTDOWN"
1213 .PP
1214 Abort the shutdown of a remote server\&.
1215 .SS "RPC SHUTDOWN [\-t timeout] [\-r] [\-f] [\-C message]"
1216 .PP
1217 Shut down the remote server\&.
1218 .PP
1219 \-r
1220 .RS 4
1221 Reboot after shutdown\&.
1222 .RE
1223 .PP
1224 \-f
1225 .RS 4
1226 Force shutting down all applications\&.
1227 .RE
1228 .PP
1229 \-t timeout
1230 .RS 4
1231 Timeout before system will be shut down\&. An interactive user of the system can use this time to cancel the shutdown\&.
1232 .RE
1233 .PP
1234 \-C message
1235 .RS 4
1236 Display the specified message on the screen to announce the shutdown\&.
1237 .RE
1238 .SS "RPC SAMDUMP"
1239 .PP
1240 Print out sam database of remote server\&. You need to run this against the PDC, from a Samba machine joined as a BDC\&.
1241 .SS "RPC VAMPIRE"
1242 .PP
1243 Export users, aliases and groups from remote server to local server\&. You need to run this against the PDC, from a Samba machine joined as a BDC\&. This vampire command cannot be used against an Active Directory, only against an NT4 Domain Controller\&.
1244 .SS "RPC VAMPIRE KEYTAB"
1245 .PP
1246 Dump remote SAM database to local Kerberos keytab file\&.
1247 .SS "RPC VAMPIRE LDIF"
1248 .PP
1249 Dump remote SAM database to local LDIF file or standard output\&.
1250 .SS "RPC GETSID"
1251 .PP
1252 Fetch domain SID and store it in the local
1253 secrets\&.tdb\&.
1254 .SS "ADS GPO"
1255 .SS "ADS GPO APPLY <USERNAME|MACHINENAME> "
1256 .PP
1257 Apply GPOs for a username or machine name\&. Either username or machine name should be provided to the command, not both\&.
1258 .SS "ADS GPO GETGPO [GPO]"
1259 .PP
1260 List specified GPO\&.
1261 .SS "ADS GPO LINKADD [LINKDN] [GPODN]"
1262 .PP
1263 Link a container to a GPO\&.
1264 \fILINKDN\fR
1265 Container to link to a GPO\&.
1266 \fIGPODN\fR
1267 GPO to link container to\&. DNs must be provided properly escaped\&. See RFC 4514 for details\&.
1268 .SS "ADS GPO LINKGET [CONTAINER]"
1269 .PP
1270 Lists gPLink of a container\&.
1271 .SS "ADS GPO LIST <USERNAME|MACHINENAME> "
1272 .PP
1273 Lists all GPOs for a username or machine name\&. Either username or machine name should be provided to the command, not both\&.
1274 .SS "ADS GPO LISTALL"
1275 .PP
1276 Lists all GPOs on a DC\&.
1277 .SS "ADS GPO REFRESH [USERNAME] [MACHINENAME]"
1278 .PP
1279 Lists all GPOs assigned to an account and download them\&.
1280 \fIUSERNAME\fR
1281 User to refresh GPOs for\&.
1282 \fIMACHINENAME\fR
1283 Machine to refresh GPOs for\&.
1284 .SS "ADS DNS"
1285 .SS "ADS DNS REGISTER [FQDN [IP [IP.....]]]"
1286 .PP
1287 Add dns record to Active Directory\&. If FQDN is missing,
1288 \m[blue]\fBdns hostname\fR\m[]
1289 is used\&. If IP is missing, IPs from all network interfaces are added\&.
1290 .SS "ADS DNS UNREGISTER <FQDN>"
1291 .PP
1292 Remove FQDN dns entry from Active Directory\&.
1293 .SS "ADS LEAVE [\-\-keep\-account]"
1294 .PP
1295 Make the remote host leave the domain it is part of\&.
1296 .SS "ADS STATUS"
1297 .PP
1298 Print out status of machine account of the local machine in ADS\&. Prints out quite some debug info\&. Aimed at developers, regular users should use
1299 NET ADS TESTJOIN\&.
1300 .SS "ADS PRINTER"
1301 .SS "ADS PRINTER INFO [PRINTER] [SERVER]"
1302 .PP
1303 Lookup info for
1304 \fIPRINTER\fR
1305 on
1306 \fISERVER\fR\&. The printer name defaults to "*", the server name defaults to the local host\&.
1307 .SS "ADS PRINTER PUBLISH PRINTER"
1308 .PP
1309 Publish specified printer using ADS\&.
1310 .SS "ADS PRINTER REMOVE PRINTER"
1311 .PP
1312 Remove specified printer from ADS directory\&.
1313 .SS "ADS SEARCH \fIEXPRESSION\fR \fIATTRIBUTES\&.\&.\&.\fR"
1314 .PP
1315 Perform a raw LDAP search on a ADS server and dump the results\&. The expression is a standard LDAP search expression, and the attributes are a list of LDAP fields to show in the results\&.
1316 .PP
1317 Example:
1318 \fBnet ads search \*(Aq(objectCategory=group)\*(Aq sAMAccountName\fR
1319 .SS "ADS DN \fIDN\fR \fI(attributes)\fR"
1320 .PP
1321 Perform a raw LDAP search on a ADS server and dump the results\&. The DN standard LDAP DN, and the attributes are a list of LDAP fields to show in the result\&.
1322 .PP
1323 Example:
1324 \fBnet ads dn \*(AqCN=administrator,CN=Users,DC=my,DC=domain\*(Aq SAMAccountName\fR
1325 .SS "ADS KEYTAB \fICREATE\fR"
1326 .PP
1327 Since Samba 4\&.21\&.0, keytab file is created as specified in
1328 \m[blue]\fBsync machine password to keytab\fR\m[]
1329 \&. The keytab can be created only when machine password is available in secrets\&.tdb, i\&.e\&. only for
1330 \m[blue]\fBkerberos method = secrets only\fR\m[]
1331 and
1332 \m[blue]\fBkerberos method = secrets and keytab\fR\m[]\&. With the smb\&.conf default values for
1333 \m[blue]\fBkerberos method = secrets only\fR\m[]
1334 and
1335 \m[blue]\fBsync machine password to keytab\fR\m[]
1336 (default is empty) the keytab is not generated at all\&. Keytab with a default name containing: SPNs synced from AD, account name COMPUTER$ and principal host/dns_hostname is created for
1337 \m[blue]\fBkerberos method = secrets and keytab\fR\m[]
1338 if
1339 \m[blue]\fBsync machine password to keytab\fR\m[]
1340 is missing\&.
1341 .PP
1342 Till Samba 4\&.20, these entries were created by default: the account name COMPUTER$, \*(Aqhost\*(Aq principal and SPNs synced from AD\&. Example below generates such keytab:
1343 .sp
1344 .if n \{\
1345 .RS 4
1346 .\}
1347 .nf
1348 \m[blue]\fBsync machine password to keytab = /etc/krb5\&.keytab:spn_prefixes=host:account_name:sync_spns:sync_kvno:machine_password\fR\m[]
1349 .fi
1350 .if n \{\
1351 .RE
1352 .\}
1353 .PP
1354 No changes are made to the computer AD account\&.
1355 .SS "(Removed!) ADS KEYTAB \fIADD\fR \fI(principal | machine | serviceclass | windows SPN)\fR"
1356 .PP
1357 This command is no longer available in Samba 4\&.21\&.0 and newer\&. See
1358 \m[blue]\fBsync machine password to keytab\fR\m[]
1359 for replacement\&.
1360
1361
1362 To replace e\&.g\&. call of
1363 .sp
1364 .if n \{\
1365 .RS 4
1366 .\}
1367 .nf
1368 net ads keytab add wurst/brot@REALM
1369 .fi
1370 .if n \{\
1371 .RE
1372 .\}
1373 .sp
1374
1375 Add to smb\&.conf:
1376 .sp
1377 .if n \{\
1378 .RS 4
1379 .\}
1380 .nf
1381 sync machine password to keytab = /path/to/keytab1:spns=wurst/brot@REALM:machine_password
1382 .fi
1383 .if n \{\
1384 .RE
1385 .\}
1386 .sp
1387
1388 and run:
1389 .sp
1390 .if n \{\
1391 .RS 4
1392 .\}
1393 .nf
1394 net ads keytab create
1395 .fi
1396 .if n \{\
1397 .RE
1398 .\}
1399 .PP
1400 Original description of this command:
1401 .PP
1402 Adds a new keytab entry, the entry can be either;
1403 .PP
1404 kerberos principal
1405 .RS 4
1406 A kerberos principal (identified by the presence of \*(Aq@\*(Aq) is just added to the keytab file\&.
1407 .RE
1408 .PP
1409 machinename
1410 .RS 4
1411 A machinename (identified by the trailing \*(Aq$\*(Aq) is used to create a a kerberos principal \*(Aqmachinename@realm\*(Aq which is added to the keytab file\&.
1412 .RE
1413 .PP
1414 serviceclass
1415 .RS 4
1416 A serviceclass (such as \*(Aqcifs\*(Aq, \*(Aqhtml\*(Aq etc\&.) is used to create a pair of kerberos principals \*(Aqserviceclass/fully_qualified_dns_name@realm\*(Aq & \*(Aqserviceclass/netbios_name@realm\*(Aq which are added to the keytab file\&.
1417 .RE
1418 .PP
1419 Windows SPN
1420 .RS 4
1421 A Windows SPN is of the format \*(Aqserviceclass/host:port\*(Aq, it is used to create a kerberos principal \*(Aqserviceclass/host@realm\*(Aq which will be written to the keytab file\&.
1422 .RE
1423 .PP
1424 Unlike old versions no computer AD objects are modified by this command\&. To preserve the behaviour of older clients \*(Aqnet ads keytab ad_update_ads\*(Aq is available\&.
1425 .SS "ADS KEYTAB \fILIST\fR \fI[keytab]\fR"
1426 .PP
1427 The command will list the contents of a keytab\&. If no keytab is specified it will display the default keytab configured by KRB5\&.
1428 .SS "(Removed!) ADS KEYTAB \fIDELETE\fR \fI(principal | machine | serviceclass | windows SPN)\fR"
1429 .PP
1430 This command is no longer available in Samba 4\&.21\&.0 and newer\&. See
1431 \m[blue]\fBsync machine password to keytab\fR\m[]
1432 for replacement\&.
1433 .PP
1434 To replace e\&.g\&. call of
1435 .sp
1436 .if n \{\
1437 .RS 4
1438 .\}
1439 .nf
1440 net ads keytab delete wurst/brot@REALM
1441 .fi
1442 .if n \{\
1443 .RE
1444 .\}
1445 .sp
1446 Delete from
1447 \m[blue]\fBsync machine password to keytab\fR\m[]
1448 principal "wurst/brot@REALM" and run:
1449 .sp
1450 .if n \{\
1451 .RS 4
1452 .\}
1453 .nf
1454 net ads keytab create
1455 .fi
1456 .if n \{\
1457 .RE
1458 .\}
1459 .sp
1460 .SS "(Removed!) ADS KEYTAB \fIADD_UPDATE_ADS\fR \fI(principal | machine | serviceclass | windows SPN)\fR"
1461 .PP
1462 This command is no longer available in Samba 4\&.21\&.0 and newer\&. See
1463 \m[blue]\fBsync machine password to keytab\fR\m[]
1464 for replacement\&.
1465
1466
1467 To replace e\&.g\&. call of
1468 .sp
1469 .if n \{\
1470 .RS 4
1471 .\}
1472 .nf
1473 net ads keytab add_update_ads wurst/brot@REALM
1474 .fi
1475 .if n \{\
1476 .RE
1477 .\}
1478 .sp
1479
1480 Add to smb\&.conf:
1481 .sp
1482 .if n \{\
1483 .RS 4
1484 .\}
1485 .nf
1486 sync machine password to keytab = /path/to/keytab2:sync_spns:machine_password
1487 .fi
1488 .if n \{\
1489 .RE
1490 .\}
1491 .sp
1492
1493 and run:
1494 .sp
1495 .if n \{\
1496 .RS 4
1497 .\}
1498 .nf
1499 net ads setspn add wurst/brot@REALM
1500 net ads keytab create
1501 .fi
1502 .if n \{\
1503 .RE
1504 .\}
1505 .PP
1506 Original description of this command:
1507 .PP
1508 Adds a new keytab entry (see section for net ads keytab add)\&. In addition to adding entries to the keytab file corresponding Windows SPNs are created from the entry passed to this command\&. These SPN(s) added to the AD computer account object associated with the client machine running this command for the following entry types;
1509 .PP
1510 serviceclass
1511 .RS 4
1512 A serviceclass (such as \*(Aqcifs\*(Aq, \*(Aqhtml\*(Aq etc\&.) is used to create a pair of Windows SPN(s) \*(Aqparam/full_qualified_dns\*(Aq & \*(Aqparam/netbios_name\*(Aq which are added to the AD computer account object for this client\&.
1513 .RE
1514 .PP
1515 Windows SPN
1516 .RS 4
1517 A Windows SPN is of the format \*(Aqserviceclass/host:port\*(Aq, it is added as passed to the AD computer account object for this client\&.
1518 .RE
1519 .SS "ADS SETSPN LIST \fI[machine]\fR"
1520 .PP
1521 Lists the Windows SPNs stored in the \*(Aqmachine\*(Aq Windows AD Computer object\&. If \*(Aqmachine\*(Aq is not specified then computer account for this client is used instead\&.
1522 .PP
1523 Example:
1524 \fBnet ads setspn list \-\-machine\-pass\fR
1525 .SS "ADS SETSPN ADD \fI[machine] SPN\fR"
1526 .PP
1527 Adds the specified Windows SPN to the \*(Aqmachine\*(Aq Windows AD Computer object\&. If \*(Aqmachine\*(Aq is not specified then computer account for this client is used instead\&.
1528 .PP
1529 Example:
1530 \fBnet ads setspn add computername host/computername\&.example\&.com \-U Administrator%Passw0rd\fR
1531 .SS "ADS SETSPN DELETE \fI[machine] SPN\fR"
1532 .PP
1533 DELETE the specified Window SPN from the \*(Aqmachine\*(Aq Windows AD Computer object\&. If \*(Aqmachine\*(Aq is not specified then computer account for this client is used instead\&.
1534 .PP
1535 Example:
1536 \fBnet ads setspn delete computername host/computername\&.example\&.com \-U Administrator%Passw0rd\fR
1537 .SS "ADS WORKGROUP"
1538 .PP
1539 Print out workgroup name for specified kerberos realm\&.
1540 .SS "ADS ENCTYPES"
1541 .PP
1542 List, modify or delete the value of the "msDS\-SupportedEncryptionTypes" attribute of an account in AD\&.
1543 .PP
1544 This attribute allows one to control which Kerberos encryption types are used for the generation of initial and service tickets\&. The value consists of an integer bitmask with the following values:
1545 .PP
1546 0x00000001 DES\-CBC\-CRC
1547 .PP
1548 0x00000002 DES\-CBC\-MD5
1549 .PP
1550 0x00000004 RC4\-HMAC
1551 .PP
1552 0x00000008 AES128\-CTS\-HMAC\-SHA1\-96
1553 .PP
1554 0x00000010 AES256\-CTS\-HMAC\-SHA1\-96
1555 .PP
1556 0x00000020 AES256\-CTS\-HMAC\-SHA1\-96\-SK
1557 .PP
1558 0x00080000 RESOURCE\-SID\-COMPRESSION\-DISABLED
1559 .SS "ADS ENCTYPES LIST \fI<ACCOUNTNAME>\fR"
1560 .PP
1561 List the value of the "msDS\-SupportedEncryptionTypes" attribute of a given account\&. Computer account needs \*(Aq$\*(Aq at the end\&.
1562 .PP
1563 Example:
1564 \fBnet ads enctypes list Computername$ \-\-machine\-pass\fR
1565 .SS "ADS ENCTYPES SET \fI<ACCOUNTNAME>\fR \fI[enctypes]\fR"
1566 .PP
1567 Set the value of the "msDS\-SupportedEncryptionTypes" attribute of the LDAP object of ACCOUNTNAME to a given value\&. If the value is omitted, the value is set to 28 which enables RC4\-HMAC, AES128\-CTS\-HMAC\-SHA1\-96 and AES256\-CTS\-HMAC\-SHA1\-96 encryption types\&.
1568 .PP
1569 Example:
1570 \fBnet ads enctypes set Computername$ 24 \-\-machine\-pass\fR
1571 .SS "ADS ENCTYPES DELETE \fI<ACCOUNTNAME>\fR"
1572 .PP
1573 Deletes the "msDS\-SupportedEncryptionTypes" attribute of the LDAP object of ACCOUNTNAME\&.
1574 .PP
1575 Example:
1576 \fBnet ads enctypes delete Computername$ \-\-machine\-pass\fR
1577 .SS "SAM CREATEBUILTINGROUP <NAME>"
1578 .PP
1579 (Re)Create a BUILTIN group\&. Only a wellknown set of BUILTIN groups can be created with this command\&. This is the list of currently recognized group names: Administrators, Users, Guests, Power Users, Account Operators, Server Operators, Print Operators, Backup Operators, Replicator, RAS Servers, Pre\-Windows 2000 compatible Access\&. This command requires a running Winbindd with idmap allocation properly configured\&. The group gid will be allocated out of the winbindd range\&.
1580 .SS "SAM CREATELOCALGROUP <NAME>"
1581 .PP
1582 Create a LOCAL group (also known as Alias)\&. This command requires a running Winbindd with idmap allocation properly configured\&. The group gid will be allocated out of the winbindd range\&.
1583 .SS "SAM DELETELOCALGROUP <NAME>"
1584 .PP
1585 Delete an existing LOCAL group (also known as Alias)\&.
1586 .SS "SAM MAPUNIXGROUP <NAME>"
1587 .PP
1588 Map an existing Unix group and make it a Domain Group, the domain group will have the same name\&.
1589 .SS "SAM UNMAPUNIXGROUP <NAME>"
1590 .PP
1591 Remove an existing group mapping entry\&.
1592 .SS "SAM ADDMEM <GROUP> <MEMBER>"
1593 .PP
1594 Add a member to a Local group\&. The group can be specified only by name, the member can be specified by name or SID\&.
1595 .SS "SAM DELMEM <GROUP> <MEMBER>"
1596 .PP
1597 Remove a member from a Local group\&. The group and the member must be specified by name\&.
1598 .SS "SAM LISTMEM <GROUP>"
1599 .PP
1600 List Local group members\&. The group must be specified by name\&.
1601 .SS "SAM LIST <users|groups|localgroups|builtin|workstations> [verbose]"
1602 .PP
1603 List the specified set of accounts by name\&. If verbose is specified, the rid and description is also provided for each account\&.
1604 .SS "SAM RIGHTS LIST"
1605 .PP
1606 List all available privileges\&.
1607 .SS "SAM RIGHTS GRANT <NAME> <PRIVILEGE>"
1608 .PP
1609 Grant one or more privileges to a user\&.
1610 .SS "SAM RIGHTS REVOKE <NAME> <PRIVILEGE>"
1611 .PP
1612 Revoke one or more privileges from a user\&.
1613 .SS "SAM SHOW <NAME>"
1614 .PP
1615 Show the full DOMAIN\e\eNAME the SID and the type for the corresponding account\&.
1616 .SS "SAM SET HOMEDIR <NAME> <DIRECTORY>"
1617 .PP
1618 Set the home directory for a user account\&.
1619 .SS "SAM SET PROFILEPATH <NAME> <PATH>"
1620 .PP
1621 Set the profile path for a user account\&.
1622 .SS "SAM SET COMMENT <NAME> <COMMENT>"
1623 .PP
1624 Set the comment for a user or group account\&.
1625 .SS "SAM SET FULLNAME <NAME> <FULL NAME>"
1626 .PP
1627 Set the full name for a user account\&.
1628 .SS "SAM SET LOGONSCRIPT <NAME> <SCRIPT>"
1629 .PP
1630 Set the logon script for a user account\&.
1631 .SS "SAM SET HOMEDRIVE <NAME> <DRIVE>"
1632 .PP
1633 Set the home drive for a user account\&.
1634 .SS "SAM SET WORKSTATIONS <NAME> <WORKSTATIONS>"
1635 .PP
1636 Set the workstations a user account is allowed to log in from\&.
1637 .SS "SAM SET DISABLE <NAME>"
1638 .PP
1639 Set the "disabled" flag for a user account\&.
1640 .SS "SAM SET PWNOTREQ <NAME>"
1641 .PP
1642 Set the "password not required" flag for a user account\&.
1643 .SS "SAM SET AUTOLOCK <NAME>"
1644 .PP
1645 Set the "autolock" flag for a user account\&.
1646 .SS "SAM SET PWNOEXP <NAME>"
1647 .PP
1648 Set the "password do not expire" flag for a user account\&.
1649 .SS "SAM SET PWDMUSTCHANGENOW <NAME> [yes|no]"
1650 .PP
1651 Set or unset the "password must change" flag for a user account\&.
1652 .SS "SAM POLICY LIST"
1653 .PP
1654 List the available account policies\&.
1655 .SS "SAM POLICY SHOW <account policy>"
1656 .PP
1657 Show the account policy value\&.
1658 .SS "SAM POLICY SET <account policy> <value>"
1659 .PP
1660 Set a value for the account policy\&. Valid values can be: "forever", "never", "off", or a number\&.
1661 .SS "SAM PROVISION"
1662 .PP
1663 Only available if ldapsam:editposix is set and winbindd is running\&. Properly populates the ldap tree with the basic accounts (Administrator) and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree\&.
1664 .SS "IDMAP DUMP <local tdb file name>"
1665 .PP
1666 Dumps the mappings contained in the local tdb file specified\&. This command is useful to dump only the mappings produced by the idmap_tdb backend\&.
1667 .SS "IDMAP RESTORE [input file]"
1668 .PP
1669 Restore the mappings from the specified file or stdin\&.
1670 .SS "IDMAP SET SECRET <DOMAIN> <secret>"
1671 .PP
1672 Store a secret for the specified domain, used primarily for domains that use idmap_ldap as a backend\&. In this case the secret is used as the password for the user DN used to bind to the ldap server\&.
1673 .SS "IDMAP SET RANGE <RANGE> <SID> [index] [\-\-db=<DB>]"
1674 .PP
1675 Store a domain\-range mapping for a given domain (and index) in autorid database\&.
1676 .SS "IDMAP SET CONFIG <config> [\-\-db=<DB>]"
1677 .PP
1678 Update CONFIG entry in autorid database\&.
1679 .SS "IDMAP GET RANGE <SID> [index] [\-\-db=<DB>]"
1680 .PP
1681 Get the range for a given domain and index from autorid database\&.
1682 .SS "IDMAP GET RANGES [<SID>] [\-\-db=<DB>]"
1683 .PP
1684 Get ranges for all domains or for one identified by given SID\&.
1685 .SS "IDMAP GET CONFIG [\-\-db=<DB>]"
1686 .PP
1687 Get CONFIG entry from autorid database\&.
1688 .SS "IDMAP DELETE MAPPING [\-f] [\-\-db=<DB>] <ID>"
1689 .PP
1690 Delete a mapping sid <\-> gid or sid <\-> uid from the IDMAP database\&. The mapping is given by <ID> which may either be a sid: S\-x\-\&.\&.\&., a gid: "GID number" or a uid: "UID number"\&. Use \-f to delete an invalid partial mapping <ID> \-> xx
1691 .PP
1692 Use "smbcontrol all idmap \&.\&.\&." to notify running smbd instances\&. See the
1693 \fBsmbcontrol\fR(1)
1694 manpage for details\&.
1695 .SS "IDMAP DELETE RANGE [\-f] [\-\-db=<TDB>] <RANGE>|(<SID> [<INDEX>])"
1696 .PP
1697 Delete a domain range mapping identified by \*(AqRANGE\*(Aq or "domain SID and INDEX" from autorid database\&. Use \-f to delete invalid mappings\&.
1698 .SS "IDMAP DELETE RANGES [\-f] [\-\-db=<TDB>] <SID>"
1699 .PP
1700 Delete all domain range mappings for a domain identified by SID\&. Use \-f to delete invalid mappings\&.
1701 .SS "IDMAP CHECK [\-v] [\-r] [\-a] [\-T] [\-f] [\-l] [\-\-db=<DB>]"
1702 .PP
1703 Check and repair the IDMAP database\&. If no option is given a read only check of the database is done\&. Among others an interactive or automatic repair mode may be chosen with one of the following options:
1704 .PP
1705 \-r|\-\-repair
1706 .RS 4
1707 Interactive repair mode, ask a lot of questions\&.
1708 .RE
1709 .PP
1710 \-a|\-\-auto
1711 .RS 4
1712 Noninteractive repair mode, use default answers\&.
1713 .RE
1714 .PP
1715 \-v|\-\-verbose
1716 .RS 4
1717 Produce more output\&.
1718 .RE
1719 .PP
1720 \-f|\-\-force
1721 .RS 4
1722 Try to apply changes, even if they do not apply cleanly\&.
1723 .RE
1724 .PP
1725 \-T|\-\-test
1726 .RS 4
1727 Dry run, show what changes would be made but don\*(Aqt touch anything\&.
1728 .RE
1729 .PP
1730 \-l|\-\-lock
1731 .RS 4
1732 Lock the database while doing the check\&.
1733 .RE
1734 .PP
1735 \-\-db <DB>
1736 .RS 4
1737 Check the specified database\&.
1738 .RE
1739 .PP
1740 .RS 4
1741 .RE
1742 It reports about the finding of the following errors:
1743 .PP
1744 Missing reverse mapping:
1745 .RS 4
1746 A record with mapping A\->B where there is no B\->A\&. Default action in repair mode is to "fix" this by adding the reverse mapping\&.
1747 .RE
1748 .PP
1749 Invalid mapping:
1750 .RS 4
1751 A record with mapping A\->B where B\->C\&. Default action is to "delete" this record\&.
1752 .RE
1753 .PP
1754 Missing or invalid HWM:
1755 .RS 4
1756 A high water mark is not at least equal to the largest ID in the database\&. Default action is to "fix" this by setting it to the largest ID found +1\&.
1757 .RE
1758 .PP
1759 Invalid record:
1760 .RS 4
1761 Something we failed to parse\&. Default action is to "edit" it in interactive and "delete" it in automatic mode\&.
1762 .RE
1763 .SS "USERSHARE"
1764 .PP
1765 Starting with version 3\&.0\&.23, a Samba server now supports the ability for non\-root users to add user defined shares to be exported using the "net usershare" commands\&.
1766 .PP
1767 To set this up, first set up your
1768 /etc/samba/smb\&.conf
1769 by adding to the [global] section: usershare path = /usr/local/samba/lib/usershares Next create the directory /usr/local/samba/lib/usershares, change the owner to root and set the group owner to the UNIX group who should have the ability to create usershares, for example a group called "serverops"\&. Set the permissions on /usr/local/samba/lib/usershares to 01770\&. (Owner and group all access, no access for others, plus the sticky bit, which means that a file in that directory can be renamed or deleted only by the owner of the file)\&. Finally, tell smbd how many usershares you will allow by adding to the [global] section of
1770 /etc/samba/smb\&.conf
1771 a line such as : usershare max shares = 100\&. To allow 100 usershare definitions\&. Now, members of the UNIX group "serverops" can create user defined shares on demand using the commands below\&.
1772 .PP
1773 The usershare commands are:
1774 .RS 4
1775 net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] \- to add or change a user defined share\&.
1776 .RE
1777 .RS 4
1778 net usershare delete sharename \- to delete a user defined share\&.
1779 .RE
1780 .RS 4
1781 net usershare info [\-\-long] [wildcard sharename] \- to print info about a user defined share\&.
1782 .RE
1783 .RS 4
1784 net usershare list [\-\-long] [wildcard sharename] \- to list user defined shares\&.
1785 .RE
1786 .SS "USERSHARE ADD sharename path [comment] [acl] [guest_ok=[y|n]]"
1787 .PP
1788 Add or replace a new user defined share, with name "sharename"\&.
1789 .PP
1790 "path" specifies the absolute pathname on the system to be exported\&. Restrictions may be put on this, see the global
1791 /etc/samba/smb\&.conf
1792 parameters: "usershare owner only", "usershare prefix allow list", and "usershare prefix deny list"\&.
1793 .PP
1794 The optional "comment" parameter is the comment that will appear on the share when browsed to by a client\&.
1795 .PP
1796 The optional "acl" field specifies which users have read and write access to the entire share\&. Note that guest connections are not allowed unless the
1797 /etc/samba/smb\&.conf
1798 parameter "usershare allow guests" has been set\&. The definition of a user defined share acl is: "user:permission", where user is a valid username on the system and permission can be "F", "R", or "D"\&. "F" stands for "full permissions", ie\&. read and write permissions\&. "D" stands for "deny" for a user, ie\&. prevent this user from accessing this share\&. "R" stands for "read only", ie\&. only allow read access to this share (no creation of new files or directories or writing to files)\&.
1799 .PP
1800 The default if no "acl" is given is "Everyone:R", which means any authenticated user has read\-only access\&.
1801 .PP
1802 The optional "guest_ok" has the same effect as the parameter of the same name in
1803 /etc/samba/smb\&.conf, in that it allows guest access to this user defined share\&. This parameter is only allowed if the global parameter "usershare allow guests" has been set to true in the
1804 /etc/samba/smb\&.conf\&.
1805 .PP
1806 There is no separate command to modify an existing user defined share, just use the "net usershare add [sharename]" command using the same sharename as the one you wish to modify and specify the new options you wish\&. The Samba smbd daemon notices user defined share modifications at connect time so will see the change immediately, there is no need to restart smbd on adding, deleting or changing a user defined share\&.
1807 .SS "USERSHARE DELETE sharename"
1808 .PP
1809 Deletes the user defined share by name\&. The Samba smbd daemon immediately notices this change, although it will not disconnect any users currently connected to the deleted share\&.
1810 .SS "USERSHARE INFO [--long] [wildcard sharename]"
1811 .PP
1812 Get info on user defined shares owned by the current user matching the given pattern, or all users\&.
1813 .PP
1814 net usershare info on its own dumps out info on the user defined shares that were created by the current user, or restricts them to share names that match the given wildcard pattern (\*(Aq*\*(Aq matches one or more characters, \*(Aq?\*(Aq matches only one character)\&. If the \*(Aq\-\-long\*(Aq option is also given, it prints out info on user defined shares created by other users\&.
1815 .PP
1816 The information given about a share looks like: [foobar] path=/home/jeremy comment=testme usershare_acl=Everyone:F guest_ok=n And is a list of the current settings of the user defined share that can be modified by the "net usershare add" command\&.
1817 .SS "USERSHARE LIST [--long] wildcard sharename"
1818 .PP
1819 List all the user defined shares owned by the current user matching the given pattern, or all users\&.
1820 .PP
1821 net usershare list on its own list out the names of the user defined shares that were created by the current user, or restricts the list to share names that match the given wildcard pattern (\*(Aq*\*(Aq matches one or more characters, \*(Aq?\*(Aq matches only one character)\&. If the \*(Aq\-\-long\*(Aq option is also given, it includes the names of user defined shares created by other users\&.
1822 .SS "[RPC] CONF"
1823 .PP
1824 Starting with version 3\&.2\&.0, a Samba server can be configured by data stored in registry\&. This configuration data can be edited with the new "net conf" commands\&. There is also the possibility to configure a remote Samba server by enabling the RPC conf mode and specifying the address of the remote server\&.
1825 .PP
1826 The deployment of this configuration data can be activated in two levels from the
1827 \fI/etc/samba/smb\&.conf\fR
1828 file: Share definitions from registry are activated by setting
1829 \fIregistry shares\fR
1830 to
1831 \(lqyes\(rq
1832 in the [global] section and global configuration options are activated by setting
1833 \m[blue]\fBinclude = registry\fR\m[]
1834 in the [global] section for a mixed configuration or by setting
1835 \m[blue]\fBconfig backend = registry\fR\m[]
1836 in the [global] section for a registry\-only configuration\&. See the
1837 \fBsmb.conf\fR(5)
1838 manpage for details\&.
1839 .PP
1840 The conf commands are:
1841 .RS 4
1842 net [rpc] conf list \- Dump the complete configuration in smb\&.conf like
1843 format\&.
1844 .RE
1845 .RS 4
1846 net [rpc] conf import \- Import configuration from file in smb\&.conf
1847 format\&.
1848 .RE
1849 .RS 4
1850 net [rpc] conf listshares \- List the registry shares\&.
1851 .RE
1852 .RS 4
1853 net [rpc] conf drop \- Delete the complete configuration from
1854 registry\&.
1855 .RE
1856 .RS 4
1857 net [rpc] conf showshare \- Show the definition of a registry share\&.
1858 .RE
1859 .RS 4
1860 net [rpc] conf addshare \- Create a new registry share\&.
1861 .RE
1862 .RS 4
1863 net [rpc] conf delshare \- Delete a registry share\&.
1864 .RE
1865 .RS 4
1866 net [rpc] conf setparm \- Store a parameter\&.
1867 .RE
1868 .RS 4
1869 net [rpc] conf getparm \- Retrieve the value of a parameter\&.
1870 .RE
1871 .RS 4
1872 net [rpc] conf delparm \- Delete a parameter\&.
1873 .RE
1874 .RS 4
1875 net [rpc] conf getincludes \- Show the includes of a share definition\&.
1876 .RE
1877 .RS 4
1878 net [rpc] conf setincludes \- Set includes for a share\&.
1879 .RE
1880 .RS 4
1881 net [rpc] conf delincludes \- Delete includes from a share definition\&.
1882 .RE
1883 .SS "[RPC] CONF LIST"
1884 .PP
1885 Print the configuration data stored in the registry in a smb\&.conf\-like format to standard output\&.
1886 .SS "[RPC] CONF IMPORT [--test|-T] filename [section]"
1887 .PP
1888 This command imports configuration from a file in smb\&.conf format\&. If a section encountered in the input file is present in registry, its contents is replaced\&. Sections of registry configuration that have no counterpart in the input file are not affected\&. If you want to delete these, you will have to use the "net conf drop" or "net conf delshare" commands\&. Optionally, a section may be specified to restrict the effect of the import command to that specific section\&. A test mode is enabled by specifying the parameter "\-T" on the commandline\&. In test mode, no changes are made to the registry, and the resulting configuration is printed to standard output instead\&.
1889 .SS "[RPC] CONF LISTSHARES"
1890 .PP
1891 List the names of the shares defined in registry\&.
1892 .SS "[RPC] CONF DROP"
1893 .PP
1894 Delete the complete configuration data from registry\&.
1895 .SS "[RPC] CONF SHOWSHARE sharename"
1896 .PP
1897 Show the definition of the share or section specified\&. It is valid to specify "global" as sharename to retrieve the global configuration options from registry\&.
1898 .SS "[RPC] CONF ADDSHARE sharename path [writeable={y|N} [guest_ok={y|N} [comment]]] "
1899 .PP
1900 Create a new share definition in registry\&. The sharename and path have to be given\&. The share name may
1901 \fInot\fR
1902 be "global"\&. Optionally, values for the very common options "writeable", "guest ok" and a "comment" may be specified\&. The same result may be obtained by a sequence of "net conf setparm" commands\&.
1903 .SS "[RPC] CONF DELSHARE sharename"
1904 .PP
1905 Delete a share definition from registry\&.
1906 .SS "[RPC] CONF SETPARM section parameter value"
1907 .PP
1908 Store a parameter in registry\&. The section may be global or a sharename\&. The section is created if it does not exist yet\&.
1909 .SS "[RPC] CONF GETPARM section parameter"
1910 .PP
1911 Show a parameter stored in registry\&.
1912 .SS "[RPC] CONF DELPARM section parameter"
1913 .PP
1914 Delete a parameter stored in registry\&.
1915 .SS "[RPC] CONF GETINCLUDES section"
1916 .PP
1917 Get the list of includes for the provided section (global or share)\&.
1918 .PP
1919 Note that due to the nature of the registry database and the nature of include directives, the includes need special treatment: Parameters are stored in registry by the parameter name as valuename, so there is only ever one instance of a parameter per share\&. Also, a specific order like in a text file is not guaranteed\&. For all real parameters, this is perfectly ok, but the include directive is rather a meta parameter, for which, in the smb\&.conf text file, the place where it is specified between the other parameters is very important\&. This can not be achieved by the simple registry smbconf data model, so there is one ordered list of includes per share, and this list is evaluated after all the parameters of the share\&.
1920 .PP
1921 Further note that currently, only files can be included from registry configuration\&. In the future, there will be the ability to include configuration data from other registry keys\&.
1922 .SS "[RPC] CONF SETINCLUDES section [filename]+"
1923 .PP
1924 Set the list of includes for the provided section (global or share) to the given list of one or more filenames\&. The filenames may contain the usual smb\&.conf macros like %I\&.
1925 .SS "[RPC] CONF DELINCLUDES section"
1926 .PP
1927 Delete the list of includes from the provided section (global or share)\&.
1928 .SS "REGISTRY"
1929 .PP
1930 Manipulate Samba\*(Aqs registry\&.
1931 .PP
1932 The registry commands are:
1933 .RS 4
1934 net registry enumerate \- Enumerate registry keys and values\&.
1935 .RE
1936 .RS 4
1937 net registry enumerate_recursive \- Enumerate registry key and its subkeys\&.
1938 .RE
1939 .RS 4
1940 net registry createkey \- Create a new registry key\&.
1941 .RE
1942 .RS 4
1943 net registry deletekey \- Delete a registry key\&.
1944 .RE
1945 .RS 4
1946 net registry deletekey_recursive \- Delete a registry key with subkeys\&.
1947 .RE
1948 .RS 4
1949 net registry getvalue \- Print a registry value\&.
1950 .RE
1951 .RS 4
1952 net registry getvalueraw \- Print a registry value (raw format)\&.
1953 .RE
1954 .RS 4
1955 net registry setvalue \- Set a new registry value\&.
1956 .RE
1957 .RS 4
1958 net registry increment \- Increment a DWORD registry value under a lock\&.
1959 .RE
1960 .RS 4
1961 net registry deletevalue \- Delete a registry value\&.
1962 .RE
1963 .RS 4
1964 net registry getsd \- Get security descriptor\&.
1965 .RE
1966 .RS 4
1967 net registry getsd_sdd1 \- Get security descriptor in sddl format\&.
1968 .RE
1969 .RS 4
1970 net registry setsd_sdd1 \- Set security descriptor from sddl format
1971 string\&.
1972 .RE
1973 .RS 4
1974 net registry import \- Import a registration entries (\&.reg) file\&.
1975 .RE
1976 .RS 4
1977 net registry export \- Export a registration entries (\&.reg) file\&.
1978 .RE
1979 .RS 4
1980 net registry convert \- Convert a registration entries (\&.reg) file\&.
1981 .RE
1982 .RS 4
1983 net registry check \- Check and repair a registry database\&.
1984 .RE
1985 .SS "REGISTRY ENUMERATE key "
1986 .PP
1987 Enumerate subkeys and values of
1988 \fIkey\fR\&.
1989 .SS "REGISTRY ENUMERATE_RECURSIVE key "
1990 .PP
1991 Enumerate values of
1992 \fIkey\fR
1993 and its subkeys\&.
1994 .SS "REGISTRY CREATEKEY key "
1995 .PP
1996 Create a new
1997 \fIkey\fR
1998 if not yet existing\&.
1999 .SS "REGISTRY DELETEKEY key "
2000 .PP
2001 Delete the given
2002 \fIkey\fR
2003 and its values from the registry, if it has no subkeys\&.
2004 .SS "REGISTRY DELETEKEY_RECURSIVE key "
2005 .PP
2006 Delete the given
2007 \fIkey\fR
2008 and all of its subkeys and values from the registry\&.
2009 .SS "REGISTRY GETVALUE key name"
2010 .PP
2011 Output type and actual value of the value
2012 \fIname\fR
2013 of the given
2014 \fIkey\fR\&.
2015 .SS "REGISTRY GETVALUERAW key name"
2016 .PP
2017 Output the actual value of the value
2018 \fIname\fR
2019 of the given
2020 \fIkey\fR\&.
2021 .SS "REGISTRY SETVALUE key name type value ..."
2022 .PP
2023 Set the value
2024 \fIname\fR
2025 of an existing
2026 \fIkey\fR\&.
2027 \fItype\fR
2028 may be one of
2029 \fIsz\fR,
2030 \fImulti_sz\fR
2031 or
2032 \fIdword\fR\&. In case of
2033 \fImulti_sz\fR
2034 \fIvalue\fR
2035 may be given multiple times\&.
2036 .SS "REGISTRY INCREMENT key name [inc]"
2037 .PP
2038 Increment the DWORD value
2039 \fIname\fR
2040 of
2041 \fIkey\fR
2042 by
2043 \fIinc\fR
2044 while holding a g_lock\&.
2045 \fIinc\fR
2046 defaults to 1\&.
2047 .SS "REGISTRY DELETEVALUE key name"
2048 .PP
2049 Delete the value
2050 \fIname\fR
2051 of the given
2052 \fIkey\fR\&.
2053 .SS "REGISTRY GETSD key"
2054 .PP
2055 Get the security descriptor of the given
2056 \fIkey\fR\&.
2057 .SS "REGISTRY GETSD_SDDL key"
2058 .PP
2059 Get the security descriptor of the given
2060 \fIkey\fR
2061 as a Security Descriptor Definition Language (SDDL) string\&.
2062 .SS "REGISTRY SETSD_SDDL keysd"
2063 .PP
2064 Set the security descriptor of the given
2065 \fIkey\fR
2066 from a Security Descriptor Definition Language (SDDL) string
2067 \fIsd\fR\&.
2068 .SS "REGISTRY IMPORT file [--precheck <check-file>] [opt]"
2069 .PP
2070 Import a registration entries (\&.reg)
2071 \fIfile\fR\&.
2072 .PP
2073 The following options are available:
2074 .PP
2075 \-\-precheck \fIcheck\-file\fR
2076 .RS 4
2077 This is a mechanism to check the existence or non\-existence of certain keys or values specified in a precheck file before applying the import file\&. The import file will only be applied if the precheck succeeds\&.
2078 .sp
2079 The check\-file follows the normal registry file syntax with the following semantics:
2080 .RS
2081 .sp
2082 .RS 4
2083 .ie n \{\
2084 \h'-04'\(bu\h'+03'\c
2085 .\}
2086 .el \{\
2087 .sp -1
2088 .IP \(bu 2.3
2089 .\}
2090 <value name>=<value> checks whether the value exists and has the given value\&.
2091 .RE
2092 .sp
2093 .RS 4
2094 .ie n \{\
2095 \h'-04'\(bu\h'+03'\c
2096 .\}
2097 .el \{\
2098 .sp -1
2099 .IP \(bu 2.3
2100 .\}
2101 <value name>=\- checks whether the value does not exist\&.
2102 .RE
2103 .sp
2104 .RS 4
2105 .ie n \{\
2106 \h'-04'\(bu\h'+03'\c
2107 .\}
2108 .el \{\
2109 .sp -1
2110 .IP \(bu 2.3
2111 .\}
2112 [key] checks whether the key exists\&.
2113 .RE
2114 .sp
2115 .RS 4
2116 .ie n \{\
2117 \h'-04'\(bu\h'+03'\c
2118 .\}
2119 .el \{\
2120 .sp -1
2121 .IP \(bu 2.3
2122 .\}
2123 [\-key] checks whether the key does not exist\&.
2124 .RE
2125 .sp
2126 .RE
2127 .RE
2128 .SS "REGISTRY EXPORT keyfile[opt]"
2129 .PP
2130 Export a
2131 \fIkey\fR
2132 to a registration entries (\&.reg)
2133 \fIfile\fR\&.
2134 .SS "REGISTRY CONVERT in out [[inopt] outopt]"
2135 .PP
2136 Convert a registration entries (\&.reg) file
2137 \fIin\fR\&.
2138 .SS "REGISTRY CHECK [-ravTl] [-o <ODB>] [--wipe] [<DB>]"
2139 .PP
2140 Check and repair the registry database\&. If no option is given a read only check of the database is done\&. Among others an interactive or automatic repair mode may be chosen with one of the following options
2141 .PP
2142 \-r|\-\-repair
2143 .RS 4
2144 Interactive repair mode, ask a lot of questions\&.
2145 .RE
2146 .PP
2147 \-a|\-\-auto
2148 .RS 4
2149 Noninteractive repair mode, use default answers\&.
2150 .RE
2151 .PP
2152 \-v|\-\-verbose
2153 .RS 4
2154 Produce more output\&.
2155 .RE
2156 .PP
2157 \-T|\-\-test
2158 .RS 4
2159 Dry run, show what changes would be made but don\*(Aqt touch anything\&.
2160 .RE
2161 .PP
2162 \-l|\-\-lock
2163 .RS 4
2164 Lock the database while doing the check\&.
2165 .RE
2166 .PP
2167 \-\-reg\-version={1,2,3}
2168 .RS 4
2169 Specify the format of the registry database\&. If not given it defaults to the value of the binary or, if an registry\&.tdb is explicitly stated at the commandline, to the value found in the INFO/version record\&.
2170 .RE
2171 .PP
2172 [\-\-db] <DB>
2173 .RS 4
2174 Check the specified database\&.
2175 .RE
2176 .PP
2177 \-o|\-\-output <ODB>
2178 .RS 4
2179 Create a new registry database <ODB> instead of modifying the input\&. If <ODB> is already existing \-\-wipe may be used to overwrite it\&.
2180 .RE
2181 .PP
2182 \-\-wipe
2183 .RS 4
2184 Replace the registry database instead of modifying the input or overwrite an existing output database\&.
2185 .RE
2186 .PP
2187 .RS 4
2188 .RE
2189 .SS "EVENTLOG"
2190 .PP
2191 Starting with version 3\&.4\&.0 net can read, dump, import and export native win32 eventlog files (usually *\&.evt)\&. evt files are used by the native Windows eventviewer tools\&.
2192 .PP
2193 The import and export of evt files can only succeed when
2194 \fIeventlog list\fR
2195 is used in
2196 \fI/etc/samba/smb\&.conf\fR
2197 file\&. See the
2198 \fBsmb.conf\fR(5)
2199 manpage for details\&.
2200 .PP
2201 The eventlog commands are:
2202 .RS 4
2203 net eventlog dump \- Dump a eventlog *\&.evt file on the screen\&.
2204 .RE
2205 .RS 4
2206 net eventlog import \- Import a eventlog *\&.evt into the samba internal
2207 tdb based representation of eventlogs\&.
2208 .RE
2209 .RS 4
2210 net eventlog export \- Export the samba internal tdb based representation
2211 of eventlogs into an eventlog *\&.evt file\&.
2212 .RE
2213 .SS "EVENTLOG DUMP filename"
2214 .PP
2215 Prints a eventlog *\&.evt file to standard output\&.
2216 .SS "EVENTLOG IMPORT filename eventlog"
2217 .PP
2218 Imports a eventlog *\&.evt file defined by
2219 \fIfilename\fR
2220 into the samba internal tdb representation of eventlog defined by
2221 \fIeventlog\fR\&.
2222 \fIeventlog\fR
2223 needs to part of the
2224 \fIeventlog list\fR
2225 defined in
2226 /etc/samba/smb\&.conf\&. See the
2227 \fBsmb.conf\fR(5)
2228 manpage for details\&.
2229 .SS "EVENTLOG EXPORT filename eventlog"
2230 .PP
2231 Exports the samba internal tdb representation of eventlog defined by
2232 \fIeventlog\fR
2233 to a eventlog *\&.evt file defined by
2234 \fIfilename\fR\&.
2235 \fIeventlog\fR
2236 needs to part of the
2237 \fIeventlog list\fR
2238 defined in
2239 /etc/samba/smb\&.conf\&. See the
2240 \fBsmb.conf\fR(5)
2241 manpage for details\&.
2242 .SS "DOM"
2243 .PP
2244 Starting with version 3\&.2\&.0 Samba has support for remote join and unjoin APIs, both client and server\-side\&. Windows supports remote join capabilities since Windows 2000\&.
2245 .PP
2246 In order for Samba to be joined or unjoined remotely an account must be used that is either member of the Domain Admins group, a member of the local Administrators group or a user that is granted the SeMachineAccountPrivilege privilege\&.
2247 .PP
2248 The client side support for remote join is implemented in the net dom commands which are:
2249 .RS 4
2250 net dom join \- Join a remote computer into a domain\&.
2251 .RE
2252 .RS 4
2253 net dom unjoin \- Unjoin a remote computer from a domain\&.
2254 .RE
2255 .RS 4
2256 net dom renamecomputer \- Renames a remote computer joined to a domain\&.
2257 .RE
2258 .SS "DOM JOIN domain=DOMAIN ou=OU account=ACCOUNT password=PASSWORD reboot"
2259 .PP
2260 Joins a computer into a domain\&. This command supports the following additional parameters:
2261 .RS
2262 .sp
2263 .RS 4
2264 .ie n \{\
2265 \h'-04'\(bu\h'+03'\c
2266 .\}
2267 .el \{\
2268 .sp -1
2269 .IP \(bu 2.3
2270 .\}
2271 \fIDOMAIN\fR
2272 can be a NetBIOS domain name (also known as short domain name) or a DNS domain name for Active Directory Domains\&. As in Windows, it is also possible to control which Domain Controller to use\&. This can be achieved by appending the DC name using the \e separator character\&. Example: MYDOM\eMYDC\&. The
2273 \fIDOMAIN\fR
2274 parameter cannot be NULL\&.
2275 .RE
2276 .sp
2277 .RS 4
2278 .ie n \{\
2279 \h'-04'\(bu\h'+03'\c
2280 .\}
2281 .el \{\
2282 .sp -1
2283 .IP \(bu 2.3
2284 .\}
2285 \fIOU\fR
2286 can be set to a RFC 1779 LDAP DN, like
2287 \fIou=mymachines,cn=Users,dc=example,dc=com\fR
2288 in order to create the machine account in a non\-default LDAP container\&. This optional parameter is only supported when joining Active Directory Domains\&.
2289 .RE
2290 .sp
2291 .RS 4
2292 .ie n \{\
2293 \h'-04'\(bu\h'+03'\c
2294 .\}
2295 .el \{\
2296 .sp -1
2297 .IP \(bu 2.3
2298 .\}
2299 \fIACCOUNT\fR
2300 defines a domain account that will be used to join the machine to the domain\&. This domain account needs to have sufficient privileges to join machines\&.
2301 .RE
2302 .sp
2303 .RS 4
2304 .ie n \{\
2305 \h'-04'\(bu\h'+03'\c
2306 .\}
2307 .el \{\
2308 .sp -1
2309 .IP \(bu 2.3
2310 .\}
2311 \fIPASSWORD\fR
2312 defines the password for the domain account defined with
2313 \fIACCOUNT\fR\&.
2314 .RE
2315 .sp
2316 .RS 4
2317 .ie n \{\
2318 \h'-04'\(bu\h'+03'\c
2319 .\}
2320 .el \{\
2321 .sp -1
2322 .IP \(bu 2.3
2323 .\}
2324 \fIREBOOT\fR
2325 is an optional parameter that can be set to reboot the remote machine after successful join to the domain\&.
2326 .RE
2327 .sp
2328 .RE
2329 .PP
2330 Note that you also need to use standard net parameters to connect and authenticate to the remote machine that you want to join\&. These additional parameters include: \-S computer and \-U user\&.
2331 .PP
2332 Example: net dom join \-S xp \-U XP\e\eadministrator%secret domain=MYDOM account=MYDOM\e\eadministrator password=topsecret reboot\&.
2333 .PP
2334 This example would connect to a computer named XP as the local administrator using password secret, and join the computer into a domain called MYDOM using the MYDOM domain administrator account and password topsecret\&. After successful join, the computer would reboot\&.
2335 .SS "DOM UNJOIN account=ACCOUNT password=PASSWORD reboot"
2336 .PP
2337 Unjoins a computer from a domain\&. This command supports the following additional parameters:
2338 .RS
2339 .sp
2340 .RS 4
2341 .ie n \{\
2342 \h'-04'\(bu\h'+03'\c
2343 .\}
2344 .el \{\
2345 .sp -1
2346 .IP \(bu 2.3
2347 .\}
2348 \fIACCOUNT\fR
2349 defines a domain account that will be used to unjoin the machine from the domain\&. This domain account needs to have sufficient privileges to unjoin machines\&.
2350 .RE
2351 .sp
2352 .RS 4
2353 .ie n \{\
2354 \h'-04'\(bu\h'+03'\c
2355 .\}
2356 .el \{\
2357 .sp -1
2358 .IP \(bu 2.3
2359 .\}
2360 \fIPASSWORD\fR
2361 defines the password for the domain account defined with
2362 \fIACCOUNT\fR\&.
2363 .RE
2364 .sp
2365 .RS 4
2366 .ie n \{\
2367 \h'-04'\(bu\h'+03'\c
2368 .\}
2369 .el \{\
2370 .sp -1
2371 .IP \(bu 2.3
2372 .\}
2373 \fIREBOOT\fR
2374 is an optional parameter that can be set to reboot the remote machine after successful unjoin from the domain\&.
2375 .RE
2376 .sp
2377 .RE
2378 .PP
2379 Note that you also need to use standard net parameters to connect and authenticate to the remote machine that you want to unjoin\&. These additional parameters include: \-S computer and \-U user\&.
2380 .PP
2381 Example: net dom unjoin \-S xp \-U XP\e\eadministrator%secret account=MYDOM\e\eadministrator password=topsecret reboot\&.
2382 .PP
2383 This example would connect to a computer named XP as the local administrator using password secret, and unjoin the computer from the domain using the MYDOM domain administrator account and password topsecret\&. After successful unjoin, the computer would reboot\&.
2384 .SS "DOM RENAMECOMPUTER newname=NEWNAME account=ACCOUNT password=PASSWORD reboot"
2385 .PP
2386 Renames a computer that is joined to a domain\&. This command supports the following additional parameters:
2387 .RS
2388 .sp
2389 .RS 4
2390 .ie n \{\
2391 \h'-04'\(bu\h'+03'\c
2392 .\}
2393 .el \{\
2394 .sp -1
2395 .IP \(bu 2.3
2396 .\}
2397 \fINEWNAME\fR
2398 defines the new name of the machine in the domain\&.
2399 .RE
2400 .sp
2401 .RS 4
2402 .ie n \{\
2403 \h'-04'\(bu\h'+03'\c
2404 .\}
2405 .el \{\
2406 .sp -1
2407 .IP \(bu 2.3
2408 .\}
2409 \fIACCOUNT\fR
2410 defines a domain account that will be used to rename the machine in the domain\&. This domain account needs to have sufficient privileges to rename machines\&.
2411 .RE
2412 .sp
2413 .RS 4
2414 .ie n \{\
2415 \h'-04'\(bu\h'+03'\c
2416 .\}
2417 .el \{\
2418 .sp -1
2419 .IP \(bu 2.3
2420 .\}
2421 \fIPASSWORD\fR
2422 defines the password for the domain account defined with
2423 \fIACCOUNT\fR\&.
2424 .RE
2425 .sp
2426 .RS 4
2427 .ie n \{\
2428 \h'-04'\(bu\h'+03'\c
2429 .\}
2430 .el \{\
2431 .sp -1
2432 .IP \(bu 2.3
2433 .\}
2434 \fIREBOOT\fR
2435 is an optional parameter that can be set to reboot the remote machine after successful rename in the domain\&.
2436 .RE
2437 .sp
2438 .RE
2439 .PP
2440 Note that you also need to use standard net parameters to connect and authenticate to the remote machine that you want to rename in the domain\&. These additional parameters include: \-S computer and \-U user\&.
2441 .PP
2442 Example: net dom renamecomputer \-S xp \-U XP\e\eadministrator%secret newname=XPNEW account=MYDOM\e\eadministrator password=topsecret reboot\&.
2443 .PP
2444 This example would connect to a computer named XP as the local administrator using password secret, and rename the joined computer to XPNEW using the MYDOM domain administrator account and password topsecret\&. After successful rename, the computer would reboot\&.
2445 .SS "G_LOCK"
2446 .PP
2447 Manage global locks\&.
2448 .SS "G_LOCK DO lockname timeout command"
2449 .PP
2450 Execute a shell command under a global lock\&. This might be useful to define the order in which several shell commands will be executed\&. The locking information is stored in a file called
2451 g_lock\&.tdb\&. In setups with CTDB running, the locking information will be available on all cluster nodes\&.
2452 .RS
2453 .sp
2454 .RS 4
2455 .ie n \{\
2456 \h'-04'\(bu\h'+03'\c
2457 .\}
2458 .el \{\
2459 .sp -1
2460 .IP \(bu 2.3
2461 .\}
2462 \fILOCKNAME\fR
2463 defines the name of the global lock\&.
2464 .RE
2465 .sp
2466 .RS 4
2467 .ie n \{\
2468 \h'-04'\(bu\h'+03'\c
2469 .\}
2470 .el \{\
2471 .sp -1
2472 .IP \(bu 2.3
2473 .\}
2474 \fITIMEOUT\fR
2475 defines the timeout\&.
2476 .RE
2477 .sp
2478 .RS 4
2479 .ie n \{\
2480 \h'-04'\(bu\h'+03'\c
2481 .\}
2482 .el \{\
2483 .sp -1
2484 .IP \(bu 2.3
2485 .\}
2486 \fICOMMAND\fR
2487 defines the shell command to execute\&.
2488 .RE
2489 .SS "G_LOCK LOCKS"
2490 .PP
2491 Print a list of all currently existing locknames\&.
2492 .SS "G_LOCK DUMP lockname"
2493 .PP
2494 Dump the locking table of a certain global lock\&.
2495 .SS "TDB"
2496 .PP
2497 Print information from tdb records\&.
2498 .SS "TDB LOCKING key [DUMP]"
2499 .PP
2500 List sharename, filename and number of share modes for a record from locking\&.tdb\&. With the optional DUMP options, dump the complete record\&.
2501 .RS
2502 .sp
2503 .RS 4
2504 .ie n \{\
2505 \h'-04'\(bu\h'+03'\c
2506 .\}
2507 .el \{\
2508 .sp -1
2509 .IP \(bu 2.3
2510 .\}
2511 \fIKEY\fR
2512 Key of the tdb record as hex string\&.
2513 .RE
2514 .SS "tdb smbXsrv wipedbs"
2515 .PP
2516 Clean stale entries from smbXsrv databases\&.
2517 .PP
2518 An alias for
2519 net serverid wipedbs\&.
2520 .SS "vfs"
2521 .PP
2522 Access shared filesystem through the VFS\&.
2523 .SS "vfs stream2abouble [--recursive] [--verbose] [--continue] [--follow-symlinks] share path"
2524 .PP
2525 Convert file streams to AppleDouble files\&.
2526 .RS
2527 .sp
2528 .RS 4
2529 .ie n \{\
2530 \h'-04'\(bu\h'+03'\c
2531 .\}
2532 .el \{\
2533 .sp -1
2534 .IP \(bu 2.3
2535 .\}
2536 \fIshare\fR
2537 A Samba share\&.
2538 .RE
2539 .sp
2540 .RE
2541 .RS
2542 .sp
2543 .RS 4
2544 .ie n \{\
2545 \h'-04'\(bu\h'+03'\c
2546 .\}
2547 .el \{\
2548 .sp -1
2549 .IP \(bu 2.3
2550 .\}
2551 \fIpath\fR
2552 A relative path of something in the Samba share\&. "\&." can be used for the root directory of the share\&.
2553 .RE
2554 .sp
2555 .RE
2556 .PP
2557 Options:
2558 .PP
2559 \-\-recursive
2560 .RS 4
2561 Traverse a directory hierarchy\&.
2562 .RE
2563 .PP
2564 \-\-verbose
2565 .RS 4
2566 Verbose output\&.
2567 .RE
2568 .PP
2569 \-\-continue
2570 .RS 4
2571 Continue traversing a directory hierarchy if a single conversion fails\&.
2572 .RE
2573 .PP
2574 \-\-follow\-symlinks
2575 .RS 4
2576 Follow symlinks encountered while traversing a directory\&.
2577 .RE
2578 .SS "vfs getntacl share path"
2579 .PP
2580 Display the security descriptor of a file or directory\&.
2581 .RS
2582 .sp
2583 .RS 4
2584 .ie n \{\
2585 \h'-04'\(bu\h'+03'\c
2586 .\}
2587 .el \{\
2588 .sp -1
2589 .IP \(bu 2.3
2590 .\}
2591 \fIshare\fR
2592 A Samba share\&.
2593 .RE
2594 .sp
2595 .RE
2596 .RS
2597 .sp
2598 .RS 4
2599 .ie n \{\
2600 \h'-04'\(bu\h'+03'\c
2601 .\}
2602 .el \{\
2603 .sp -1
2604 .IP \(bu 2.3
2605 .\}
2606 \fIpath\fR
2607 A relative path of something in the Samba share\&. "\&." can be used for the root directory of the share\&.
2608 .RE
2609 .SS "OFFLINEJOIN"
2610 .PP
2611 Starting with version 4\&.15 Samba has support for offline join APIs\&. Windows supports offline join capabilities since Windows 7 and Windows 2008 R2\&.
2612 .PP
2613 The following offline commands are implemented:
2614 .RS 4
2615 net offlinejoin provision \- Provisions a machine account in AD\&.
2616 .RE
2617 .RS 4
2618 net offlinejoin requestodj \- Requests a domain offline join\&.
2619 .RE
2620 .SS "OFFLINEJOIN PROVISION domain=DOMAIN machine_name=MACHINE_NAME machine_account_ou=MACHINE_ACCOUNT_OU dcname=DCNAME defpwd reuse savefile=FILENAME printblob"
2621 .PP
2622 Provisions a machine account in AD\&. This command needs network connectivity to the domain controller to succeed\&. This command supports the following additional parameters:
2623 .RS
2624 .sp
2625 .RS 4
2626 .ie n \{\
2627 \h'-04'\(bu\h'+03'\c
2628 .\}
2629 .el \{\
2630 .sp -1
2631 .IP \(bu 2.3
2632 .\}
2633 \fIDOMAIN\fR
2634 can be a NetBIOS domain name (also known as short domain name) or a DNS domain name for Active Directory Domains\&. The
2635 \fIDOMAIN\fR
2636 parameter cannot be NULL\&.
2637 .RE
2638 .sp
2639 .RS 4
2640 .ie n \{\
2641 \h'-04'\(bu\h'+03'\c
2642 .\}
2643 .el \{\
2644 .sp -1
2645 .IP \(bu 2.3
2646 .\}
2647 \fIMACHINE_NAME\fR
2648 defines the machine account name that will be provisioned in AD\&. The
2649 \fIMACHINE_NAME\fR
2650 parameter cannot be NULL\&.
2651 .RE
2652 .sp
2653 .RS 4
2654 .ie n \{\
2655 \h'-04'\(bu\h'+03'\c
2656 .\}
2657 .el \{\
2658 .sp -1
2659 .IP \(bu 2.3
2660 .\}
2661 \fIMACHINE_ACCOUNT_OU\fR
2662 can be set to a RFC 1779 LDAP DN, like
2663 \fIou=mymachines,cn=Users,dc=example,dc=com\fR
2664 in order to create the machine account in a non\-default LDAP container\&. This optional parameter is only supported when joining Active Directory Domains\&.
2665 .RE
2666 .sp
2667 .RS 4
2668 .ie n \{\
2669 \h'-04'\(bu\h'+03'\c
2670 .\}
2671 .el \{\
2672 .sp -1
2673 .IP \(bu 2.3
2674 .\}
2675 \fIDCNAME\fR
2676 defines a specific domain controller for creating the machine account in AD\&.
2677 .RE
2678 .sp
2679 .RS 4
2680 .ie n \{\
2681 \h'-04'\(bu\h'+03'\c
2682 .\}
2683 .el \{\
2684 .sp -1
2685 .IP \(bu 2.3
2686 .\}
2687 \fIDEFPWD\fR
2688 is an optional parameter that can be set to enforce using the default machine account password\&. The use of this parameter is not recommended as the default machine account password can be easily guessed\&.
2689 .RE
2690 .sp
2691 .RS 4
2692 .ie n \{\
2693 \h'-04'\(bu\h'+03'\c
2694 .\}
2695 .el \{\
2696 .sp -1
2697 .IP \(bu 2.3
2698 .\}
2699 \fIREUSE\fR
2700 is an optional parameter that can be set to enforce reusing an existing machine account in AD\&.
2701 .RE
2702 .sp
2703 .RS 4
2704 .ie n \{\
2705 \h'-04'\(bu\h'+03'\c
2706 .\}
2707 .el \{\
2708 .sp -1
2709 .IP \(bu 2.3
2710 .\}
2711 \fISAVEFILE\fR
2712 is an optional parameter to store the generated provisioning data on disk\&.
2713 .RE
2714 .sp
2715 .RS 4
2716 .ie n \{\
2717 \h'-04'\(bu\h'+03'\c
2718 .\}
2719 .el \{\
2720 .sp -1
2721 .IP \(bu 2.3
2722 .\}
2723 \fIPRINTBLOB\fR
2724 is an optional parameter to print the generated provisioning data on stdout\&.
2725 .RE
2726 .sp
2727 .RE
2728 .PP
2729 Example: net offlinejoin provision \-U administrator%secret domain=MYDOM machine_name=MYHOST savefile=provisioning\&.txt
2730 .SS "OFFLINEJOIN REQUESTODJ loadfile=FILENAME"
2731 .PP
2732 Requests an offline domain join by providing file\-based provisioning data\&. This command supports the following additional parameters:
2733 .RS
2734 .sp
2735 .RS 4
2736 .ie n \{\
2737 \h'-04'\(bu\h'+03'\c
2738 .\}
2739 .el \{\
2740 .sp -1
2741 .IP \(bu 2.3
2742 .\}
2743 \fILOADFILE\fR
2744 is a required parameter to load the provisioning from a file\&.
2745 .RE
2746 .sp
2747 .RE
2748 .PP
2749 Example: net offlinejoin requestodj loadfile=provisioning\&.txt
2750 .SS "WITNESS"
2751 .PP
2752 Starting with version 4\&.20 Samba has support for the SMB Witness service in a cluster\&.
2753 .PP
2754 The following witness commands are implemented:
2755 .RS 4
2756
2757 net witness list List witness registrations from rpcd_witness_registration\&.tdb\&.
2758 .RE
2759 .RS 4
2760
2761 net witness client\-move Generate client move notifications for witness registrations to a new ip or node\&.
2762 .RE
2763 .RS 4
2764
2765 net witness share\-move Generate share move notifications for witness registrations to a new ip or node\&.
2766 .RE
2767 .RS 4
2768
2769 net witness force\-unregister Force unregistrations for witness registrations\&.
2770 .RE
2771 .RS 4
2772
2773 net witness force\-response Force an AsyncNotify response based on json input (mostly for testing)\&.
2774 .RE
2775 .SS "WITNESS LIST"
2776 .PP
2777 List witness registrations from rpcd_witness_registration\&.tdb
2778 .PP
2779 Note: Only supported with clustering=yes!
2780 .PP
2781 Machine readable output can be generated with the following option:
2782 .PP
2783 \-\-json
2784 .PP
2785 The selection of registrations can be limited by the following options:
2786 .PP
2787 \-\-witness\-registration=REGISTRATION_UUID
2788 .PP
2789 This does a direct lookup for REGISTRATION_UUID instead of doing a database traversal\&.
2790 .PP
2791 The following options all take a POSIX Extended Regular Expression, which can further filter the selection of registrations\&. These options are applied as logical AND, but each REGEX allows specifying multiple strings using the pipe symbol\&.
2792 .PP
2793 \-\-witness\-net\-name=REGEX
2794 .PP
2795 This specifies the \*(Aqserver name\*(Aq the client registered for monitoring\&.
2796 .PP
2797 \-\-witness\-share\-name=REGEX
2798 .PP
2799 This specifies the \*(Aqshare name\*(Aq the client registered for monitoring\&. Note that the share name is optional in the registration, otherwise an empty string is matched\&.
2800 .PP
2801 \-\-witness\-ip\-address=REGEX
2802 .PP
2803 This specifies the ip address the client registered for monitoring\&.
2804 .PP
2805 \-\-witness\-client\-computer\-name=REGEX
2806 .PP
2807 This specifies the client computer name the client specified in the registration\&. Note it is just a string chosen by the client itself\&.
2808 .SS "WITNESS CLIENT-MOVE"
2809 .PP
2810 Generate client move notifications for witness registrations to a new ip or node
2811 .PP
2812 Note: Only supported with clustering=yes!
2813 .PP
2814 Machine readable output can be generated with the following option:
2815 .PP
2816 \-\-json
2817 .PP
2818 The selection of registrations can be limited by the following options:
2819 .PP
2820 \-\-witness\-registration=REGISTRATION_UUID
2821 .PP
2822 This does a direct lookup for REGISTRATION_UUID instead of doing a database traversal\&.
2823 .PP
2824 The following options all take a POSIX Extended Regular Expression, which can further filter the selection of registrations\&. These options are applied as logical AND, but each REGEX allows specifying multiple strings using the pipe symbol\&.
2825 .PP
2826 \-\-witness\-net\-name=REGEX
2827 .PP
2828 This specifies the \*(Aqserver name\*(Aq the client registered for monitoring\&.
2829 .PP
2830 \-\-witness\-share\-name=REGEX
2831 .PP
2832 This specifies the \*(Aqshare name\*(Aq the client registered for monitoring\&. Note that the share name is optional in the registration, otherwise an empty string is matched\&.
2833 .PP
2834 \-\-witness\-ip\-address=REGEX
2835 .PP
2836 This specifies the ip address the client registered for monitoring\&.
2837 .PP
2838 \-\-witness\-client\-computer\-name=REGEX
2839 .PP
2840 This specifies the client computer name the client specified in the registration\&. Note it is just a string chosen by the client itself\&.
2841 .PP
2842 If the update should be applied to all registrations it needs to be explicitly specified:
2843 .PP
2844 \-\-witness\-apply\-to\-all
2845 .PP
2846 This selects all registrations\&. Note: This is mutual exclusive to the above options\&.
2847 .PP
2848 The content of the CLIENT_MOVE notification contains ip addresses specified by (exactly one) of the following options:
2849 .PP
2850 \-\-witness\-new\-node=NODEID
2851 .PP
2852 By specifying a NODEID all ip addresses currently available on the given node are included in the response\&. By specifying \*(Aq\-1\*(Aq as NODEID all ip addresses of the cluster are included in the response\&.
2853 .PP
2854 \-\-witness\-new\-ip=IPADDRESS
2855 .PP
2856 By specifying an IPADDRESS only the specified ip address is included in the response\&.
2857 .SS "WITNESS SHARE-MOVE"
2858 .PP
2859 Generate share move notifications for witness registrations to a new ip or node
2860 .PP
2861 Note: Only supported with clustering=yes!
2862 .PP
2863 Machine readable output can be generated with the following option:
2864 .PP
2865 \-\-json
2866 .PP
2867 The selection of registrations can be limited by the following options:
2868 .PP
2869 \-\-witness\-registration=REGISTRATION_UUID
2870 .PP
2871 This does a direct lookup for REGISTRATION_UUID instead of doing a database traversal\&.
2872 .PP
2873 The following options all take a POSIX Extended Regular Expression, which can further filter the selection of registrations\&. These options are applied as logical AND, but each REGEX allows specifying multiple strings using the pipe symbol\&.
2874 .PP
2875 \-\-witness\-net\-name=REGEX
2876 .PP
2877 This specifies the \*(Aqserver name\*(Aq the client registered for monitoring\&.
2878 .PP
2879 \-\-witness\-share\-name=REGEX
2880 .PP
2881 This specifies the \*(Aqshare name\*(Aq the client registered for monitoring\&. Note that the share name is optional in the registration, otherwise an empty string is matched\&.
2882 .PP
2883 \-\-witness\-ip\-address=REGEX
2884 .PP
2885 This specifies the ip address the client registered for monitoring\&.
2886 .PP
2887 \-\-witness\-client\-computer\-name=REGEX
2888 .PP
2889 This specifies the client computer name the client specified in the registration\&. Note it is just a string chosen by the client itself\&.
2890 .PP
2891 If the update should be applied to all registrations it needs to be explicitly specified:
2892 .PP
2893 \-\-witness\-apply\-to\-all
2894 .PP
2895 This selects all registrations\&. Note: This is mutual exclusive to the above options\&.
2896 .PP
2897 Note: This only applies to registrations with a non empty share name!
2898 .PP
2899 The content of the SHARE_MOVE notification contains ip addresses specified by (exactly one) of the following options:
2900 .PP
2901 \-\-witness\-new\-node=NODEID
2902 .PP
2903 By specifying a NODEID all ip addresses currently available on the given node are included in the response\&. By specifying \*(Aq\-1\*(Aq as NODEID all ip addresses of the cluster are included in the response\&.
2904 .PP
2905 \-\-witness\-new\-ip=IPADDRESS
2906 .PP
2907 By specifying an IPADDRESS only the specified ip address is included in the response\&.
2908 .SS "WITNESS FORCE-UNREGISTER"
2909 .PP
2910 Force unregistrations for witness registrations
2911 .PP
2912 Note: Only supported with clustering=yes!
2913 .PP
2914 Machine readable output can be generated with the following option:
2915 .PP
2916 \-\-json
2917 .PP
2918 The selection of registrations can be limited by the following options:
2919 .PP
2920 \-\-witness\-registration=REGISTRATION_UUID
2921 .PP
2922 This does a direct lookup for REGISTRATION_UUID instead of doing a database traversal\&.
2923 .PP
2924 The following options all take a POSIX Extended Regular Expression, which can further filter the selection of registrations\&. These options are applied as logical AND, but each REGEX allows specifying multiple strings using the pipe symbol\&.
2925 .PP
2926 \-\-witness\-net\-name=REGEX
2927 .PP
2928 This specifies the \*(Aqserver name\*(Aq the client registered for monitoring\&.
2929 .PP
2930 \-\-witness\-share\-name=REGEX
2931 .PP
2932 This specifies the \*(Aqshare name\*(Aq the client registered for monitoring\&. Note that the share name is optional in the registration, otherwise an empty string is matched\&.
2933 .PP
2934 \-\-witness\-ip\-address=REGEX
2935 .PP
2936 This specifies the ip address the client registered for monitoring\&.
2937 .PP
2938 \-\-witness\-client\-computer\-name=REGEX
2939 .PP
2940 This specifies the client computer name the client specified in the registration\&. Note it is just a string chosen by the client itself\&.
2941 .PP
2942 If the update should be applied to all registrations it needs to be explicitly specified:
2943 .PP
2944 \-\-witness\-apply\-to\-all
2945 .PP
2946 This selects all registrations\&. Note: This is mutual exclusive to the above options\&.
2947 .PP
2948 The selected registrations are removed on the server and any pending AsyncNotify request will get a NOT_FOUND error\&.
2949 .PP
2950 Typically this triggers a clean re\-registration on the client\&.
2951 .SS "WITNESS FORCE-RESPONSE"
2952 .PP
2953 Force an AsyncNotify response based on json input (mostly for testing)
2954 .PP
2955 Note: Only supported with clustering=yes!
2956 .PP
2957 Machine readable output can be generated with the following option:
2958 .PP
2959 \-\-json
2960 .PP
2961 The selection of registrations can be limited by the following options:
2962 .PP
2963 \-\-witness\-registration=REGISTRATION_UUID
2964 .PP
2965 This does a direct lookup for REGISTRATION_UUID instead of doing a database traversal\&.
2966 .PP
2967 The following options all take a POSIX Extended Regular Expression, which can further filter the selection of registrations\&. These options are applied as logical AND, but each REGEX allows specifying multiple strings using the pipe symbol\&.
2968 .PP
2969 \-\-witness\-net\-name=REGEX
2970 .PP
2971 This specifies the \*(Aqserver name\*(Aq the client registered for monitoring\&.
2972 .PP
2973 \-\-witness\-share\-name=REGEX
2974 .PP
2975 This specifies the \*(Aqshare name\*(Aq the client registered for monitoring\&. Note that the share name is optional in the registration, otherwise an empty string is matched\&.
2976 .PP
2977 \-\-witness\-ip\-address=REGEX
2978 .PP
2979 This specifies the ip address the client registered for monitoring\&.
2980 .PP
2981 \-\-witness\-client\-computer\-name=REGEX
2982 .PP
2983 This specifies the client computer name the client specified in the registration\&. Note it is just a string chosen by the client itself\&.
2984 .PP
2985 If the update should be applied to all registrations it needs to be explicitly specified:
2986 .PP
2987 \-\-witness\-apply\-to\-all
2988 .PP
2989 This selects all registrations\&. Note: This is mutual exclusive to the above options\&.
2990 .PP
2991 Note this is designed for testing and debugging!
2992 .PP
2993 In short it is not designed to be used by administrators, but developers and automated tests\&.
2994 .PP
2995 By default an empty response with WERR_OK is generated, but basically any valid response can be specified by a specifying a JSON string:
2996 .PP
2997 \-\-witness\-forced\-response=JSON
2998 .PP
2999 This allows the generation of very complex witness_notifyResponse structures\&.
3000 .PP
3001 As this is for developers, please read the code in order to understand all possible values of the JSON string format\&.\&.\&.
3002 .PP
3003 See \*(Aqnet help witness force\-response\*(Aq for further details\&.
3004 .SS "serverid"
3005 .PP
3006 Check existence of a serverid and clean stale entries from fileserver state databases\&.
3007 .PP
3008 The following commands are implemented:
3009 .RS 4
3010 net serverid exists Check existence of a serverid
3011 .RE
3012 .RS 4
3013 net serverid wipedbs Clean stale entries from fileserver state databases
3014 .RE
3015 .SS "serverid exists <serverid>"
3016 .PP
3017 Checks if a serverid exits\&.
3018 .SS "serverid wipedbs"
3019 .PP
3020 Clean stale entries from fileserver state databases
3021 .PP
3022 Options for wipedbs:
3023 .PP
3024 \-\-test
3025 .PP
3026 Only check for stale entries and log them
3027 .PP
3028 \-\-verbose
3029 .PP
3030 Produce verbose logging
3031 .SS "HELP [COMMAND]"
3032 .PP
3033 Gives usage information for the specified command\&.
3034 .SH "VERSION"
3035 .PP
3036 This man page is part of version 4\&.23\&.8 of the Samba suite\&.
3037 .SH "AUTHOR"
3038 .PP
3039 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\&.
3040 .PP
3041 The net manpage was written by Jelmer Vernooij\&.