Debian Codegraph @

upstream/debian-unstable/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/26/2026
6 .\" Manual: System Administration tools
7 .\" Source: Samba 4.24.3-Debian-4.24.3+dfsg-1
8 .\" Language: English
9 .\"
10 .TH "NET" "8" "05/26/2026" "Samba 4\&.24\&.3\-Debian\-4\&.24\&.3+dfs" "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 "ADS KERBEROS"
1578 .PP
1579 Issue Kerberos operations against an Active Directory KDC\&.
1580 .SS "ADS KERBEROS KINIT"
1581 .PP
1582 Issue a kinit request for a given user\&. The following methods can be used to specify where to store the ticket granting ticket (TGT) (in order of precedence):
1583 .RS
1584 .sp
1585 .RS 4
1586 .ie n \{\
1587 \h'-04'\(bu\h'+03'\c
1588 .\}
1589 .el \{\
1590 .sp -1
1591 .IP \(bu 2.3
1592 .\}
1593 option
1594 \fB\-\-use\-krb5\-ccache\fR
1595 .RE
1596 .sp
1597 .RS 4
1598 .ie n \{\
1599 \h'-04'\(bu\h'+03'\c
1600 .\}
1601 .el \{\
1602 .sp -1
1603 .IP \(bu 2.3
1604 .\}
1605 \fIKRB5CCNAME\fR
1606 environment variable
1607 .RE
1608 .sp
1609 .RS 4
1610 .ie n \{\
1611 \h'-04'\(bu\h'+03'\c
1612 .\}
1613 .el \{\
1614 .sp -1
1615 .IP \(bu 2.3
1616 .\}
1617 \fIdefault_ccache_name\fR
1618 setting in
1619 krb5\&.conf
1620 .RE
1621 .sp
1622 .RE
1623 .PP
1624 \fBExamples:\fR
1625 .PP
1626 Use file based cache (FILE:/tmp/krb5cache)
1627 .RS 4
1628 .sp
1629 .if n \{\
1630 .RS 4
1631 .\}
1632 .nf
1633 net ads kerberos kinit \-P \-\-use\-krb5\-ccache=/tmp/krb5cache
1634 .fi
1635 .if n \{\
1636 .RE
1637 .\}
1638 .RE
1639 .PP
1640 Use memory cache (MEMORY:net) to verify the authentication
1641 .RS 4
1642 .sp
1643 .if n \{\
1644 .RS 4
1645 .\}
1646 .nf
1647 net ads kerberos kinit \-P \-\-use\-krb5\-ccache=MEMORY:net
1648 .fi
1649 .if n \{\
1650 .RE
1651 .\}
1652 .RE
1653 .SS "ADS KERBEROS RENEW"
1654 .PP
1655 Renew an already acquired ticket granting ticket (TGT)\&.
1656 .PP
1657 Example:
1658 \fBnet ads kerberos renew\fR
1659 .SS "ADS KERBEROS PAC"
1660 .PP
1661 Request a Kerberos PAC while authenticating to an Active Directory KDC\&.
1662 .PP
1663 The following commands are provided:
1664 .RS 4
1665 net ads kerberos pac dump \- Dump a PAC to stdout\&.
1666 .RE
1667 .RS 4
1668 net ads kerneros pac save \- Save a PAC to a file\&.
1669 .RE
1670 .PP
1671 All commands allow to define an impersonation principal to do a Kerberos Service for User (S4U2SELF) operation via the
1672 \fIimpersonate=STRING\fR
1673 option\&. The impersonation principal can have multiple different formats:
1674 .RS
1675 .sp
1676 .RS 4
1677 .ie n \{\
1678 \h'-04'\(bu\h'+03'\c
1679 .\}
1680 .el \{\
1681 .sp -1
1682 .IP \(bu 2.3
1683 .\}
1684 \fIuser@MY\&.REALM\fR
1685 .sp
1686 This is the default format\&.
1687 .RE
1688 .sp
1689 .RS 4
1690 .ie n \{\
1691 \h'-04'\(bu\h'+03'\c
1692 .\}
1693 .el \{\
1694 .sp -1
1695 .IP \(bu 2.3
1696 .\}
1697 \fIuser@MY\&.REALM@MY\&.REALM\fR
1698 .sp
1699 The Kerberos Service for User (S4U2SELF) also supports Enterprise Principals\&.
1700 .RE
1701 .sp
1702 .RS 4
1703 .ie n \{\
1704 \h'-04'\(bu\h'+03'\c
1705 .\}
1706 .el \{\
1707 .sp -1
1708 .IP \(bu 2.3
1709 .\}
1710 \fIuser@UPN\&.SUFFIX@MY\&.REALM\fR
1711 .sp
1712 Enterprise Principal using a defined upn suffix\&.
1713 .RE
1714 .sp
1715 .RS 4
1716 .ie n \{\
1717 \h'-04'\(bu\h'+03'\c
1718 .\}
1719 .el \{\
1720 .sp -1
1721 .IP \(bu 2.3
1722 .\}
1723 \fIuser@WORKGROUP@MY\&.REALM\fR
1724 .sp
1725 Enterprise Principal with netbios domain name\&. This format is currently not supported by Samba AD\&.
1726 .RE
1727 .sp
1728 .RE
1729 .PP
1730 By default net will request a service ticket for the local service of the joined machine\&. A different service can be defined via
1731 \fIlocal_service=STRING\fR\&.
1732 .SS "ADS KERBEROS PAC DUMP [impersonate=string] [local_service=string] [pac_buffer_type=int]"
1733 .PP
1734 Request a Kerberos PAC while authenticating to an Active Directory KDC\&. The PAC will be printed on stdout\&.
1735 .PP
1736 When no specific pac_buffer is selected, all buffers will be printed\&. It is possible to select a specific one via
1737 \fIpac_buffer_type=INT\fR
1738 from this list:
1739 .RS 4
1740 1 PAC_TYPE_LOGON_INFO
1741 .RE
1742 .RS 4
1743 2 PAC_TYPE_CREDENTIAL_INFO
1744 .RE
1745 .RS 4
1746 6 PAC_TYPE_SRV_CHECKSUM
1747 .RE
1748 .RS 4
1749 7 PAC_TYPE_KDC_CHECKSUM
1750 .RE
1751 .RS 4
1752 10 PAC_TYPE_LOGON_NAME
1753 .RE
1754 .RS 4
1755 11 PAC_TYPE_CONSTRAINED_DELEGATION
1756 .RE
1757 .RS 4
1758 12 PAC_TYPE_UPN_DNS_INFO
1759 .RE
1760 .RS 4
1761 13 PAC_TYPE_CLIENT_CLAIMS_INFO
1762 .RE
1763 .RS 4
1764 14 PAC_TYPE_DEVICE_INFO
1765 .RE
1766 .RS 4
1767 15 PAC_TYPE_DEVICE_CLAIMS_INFO
1768 .RE
1769 .RS 4
1770 16 PAC_TYPE_TICKET_CHECKSUM
1771 .RE
1772 .RS 4
1773 17 PAC_TYPE_ATTRIBUTES_INFO
1774 .RE
1775 .RS 4
1776 18 PAC_TYPE_REQUESTER_SID
1777 .RE
1778 .RS 4
1779 19 PAC_TYPE_FULL_CHECKSUM
1780 .RE
1781 .PP
1782 Example:
1783 \fBnet ads kerberos pac dump \-P impersonate=anyuser@MY\&.REALM\&.COM\fR
1784 .SS "ADS KERBEROS PAC SAVE [impersonate=string] [local_service=string] [filename=string]"
1785 .PP
1786 Request a Kerberos PAC while authenticating to an Active Directory KDC\&. The PAC will be saved in a file\&.
1787 .PP
1788 The filename to store the PAC can be set via the
1789 \fIfilename=STRING\fR
1790 option\&.
1791 .PP
1792 Example:
1793 \fBnet ads kerberos pac save \-U user%password filename=/tmp/pacstore\fR
1794 .SS "SAM CREATEBUILTINGROUP <NAME>"
1795 .PP
1796 (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\&.
1797 .SS "SAM CREATELOCALGROUP <NAME>"
1798 .PP
1799 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\&.
1800 .SS "SAM DELETELOCALGROUP <NAME>"
1801 .PP
1802 Delete an existing LOCAL group (also known as Alias)\&.
1803 .SS "SAM MAPUNIXGROUP <NAME>"
1804 .PP
1805 Map an existing Unix group and make it a Domain Group, the domain group will have the same name\&.
1806 .SS "SAM UNMAPUNIXGROUP <NAME>"
1807 .PP
1808 Remove an existing group mapping entry\&.
1809 .SS "SAM ADDMEM <GROUP> <MEMBER>"
1810 .PP
1811 Add a member to a Local group\&. The group can be specified only by name, the member can be specified by name or SID\&.
1812 .SS "SAM DELMEM <GROUP> <MEMBER>"
1813 .PP
1814 Remove a member from a Local group\&. The group and the member must be specified by name\&.
1815 .SS "SAM LISTMEM <GROUP>"
1816 .PP
1817 List Local group members\&. The group must be specified by name\&.
1818 .SS "SAM LIST <users|groups|localgroups|builtin|workstations> [verbose]"
1819 .PP
1820 List the specified set of accounts by name\&. If verbose is specified, the rid and description is also provided for each account\&.
1821 .SS "SAM RIGHTS LIST"
1822 .PP
1823 List all available privileges\&.
1824 .SS "SAM RIGHTS GRANT <NAME> <PRIVILEGE>"
1825 .PP
1826 Grant one or more privileges to a user\&.
1827 .SS "SAM RIGHTS REVOKE <NAME> <PRIVILEGE>"
1828 .PP
1829 Revoke one or more privileges from a user\&.
1830 .SS "SAM SHOW <NAME>"
1831 .PP
1832 Show the full DOMAIN\e\eNAME the SID and the type for the corresponding account\&.
1833 .SS "SAM SET HOMEDIR <NAME> <DIRECTORY>"
1834 .PP
1835 Set the home directory for a user account\&.
1836 .SS "SAM SET PROFILEPATH <NAME> <PATH>"
1837 .PP
1838 Set the profile path for a user account\&.
1839 .SS "SAM SET COMMENT <NAME> <COMMENT>"
1840 .PP
1841 Set the comment for a user or group account\&.
1842 .SS "SAM SET FULLNAME <NAME> <FULL NAME>"
1843 .PP
1844 Set the full name for a user account\&.
1845 .SS "SAM SET LOGONSCRIPT <NAME> <SCRIPT>"
1846 .PP
1847 Set the logon script for a user account\&.
1848 .SS "SAM SET HOMEDRIVE <NAME> <DRIVE>"
1849 .PP
1850 Set the home drive for a user account\&.
1851 .SS "SAM SET WORKSTATIONS <NAME> <WORKSTATIONS>"
1852 .PP
1853 Set the workstations a user account is allowed to log in from\&.
1854 .SS "SAM SET DISABLE <NAME>"
1855 .PP
1856 Set the "disabled" flag for a user account\&.
1857 .SS "SAM SET PWNOTREQ <NAME>"
1858 .PP
1859 Set the "password not required" flag for a user account\&.
1860 .SS "SAM SET AUTOLOCK <NAME>"
1861 .PP
1862 Set the "autolock" flag for a user account\&.
1863 .SS "SAM SET PWNOEXP <NAME>"
1864 .PP
1865 Set the "password do not expire" flag for a user account\&.
1866 .SS "SAM SET PWDMUSTCHANGENOW <NAME> [yes|no]"
1867 .PP
1868 Set or unset the "password must change" flag for a user account\&.
1869 .SS "SAM POLICY LIST"
1870 .PP
1871 List the available account policies\&.
1872 .SS "SAM POLICY SHOW <account policy>"
1873 .PP
1874 Show the account policy value\&.
1875 .SS "SAM POLICY SET <account policy> <value>"
1876 .PP
1877 Set a value for the account policy\&. Valid values can be: "forever", "never", "off", or a number\&.
1878 .SS "SAM PROVISION"
1879 .PP
1880 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\&.
1881 .SS "IDMAP DUMP <local tdb file name>"
1882 .PP
1883 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\&.
1884 .SS "IDMAP RESTORE [input file]"
1885 .PP
1886 Restore the mappings from the specified file or stdin\&.
1887 .SS "IDMAP SET SECRET <DOMAIN> <secret>"
1888 .PP
1889 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\&.
1890 .SS "IDMAP SET RANGE <RANGE> <SID> [index] [\-\-db=<DB>]"
1891 .PP
1892 Store a domain\-range mapping for a given domain (and index) in autorid database\&.
1893 .SS "IDMAP SET CONFIG <config> [\-\-db=<DB>]"
1894 .PP
1895 Update CONFIG entry in autorid database\&.
1896 .SS "IDMAP GET RANGE <SID> [index] [\-\-db=<DB>]"
1897 .PP
1898 Get the range for a given domain and index from autorid database\&.
1899 .SS "IDMAP GET RANGES [<SID>] [\-\-db=<DB>]"
1900 .PP
1901 Get ranges for all domains or for one identified by given SID\&.
1902 .SS "IDMAP GET CONFIG [\-\-db=<DB>]"
1903 .PP
1904 Get CONFIG entry from autorid database\&.
1905 .SS "IDMAP DELETE MAPPING [\-f] [\-\-db=<DB>] <ID>"
1906 .PP
1907 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
1908 .PP
1909 Use "smbcontrol all idmap \&.\&.\&." to notify running smbd instances\&. See the
1910 \fBsmbcontrol\fR(1)
1911 manpage for details\&.
1912 .SS "IDMAP DELETE RANGE [\-f] [\-\-db=<TDB>] <RANGE>|(<SID> [<INDEX>])"
1913 .PP
1914 Delete a domain range mapping identified by \*(AqRANGE\*(Aq or "domain SID and INDEX" from autorid database\&. Use \-f to delete invalid mappings\&.
1915 .SS "IDMAP DELETE RANGES [\-f] [\-\-db=<TDB>] <SID>"
1916 .PP
1917 Delete all domain range mappings for a domain identified by SID\&. Use \-f to delete invalid mappings\&.
1918 .SS "IDMAP CHECK [\-v] [\-r] [\-a] [\-T] [\-f] [\-l] [\-\-db=<DB>]"
1919 .PP
1920 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:
1921 .PP
1922 \-r|\-\-repair
1923 .RS 4
1924 Interactive repair mode, ask a lot of questions\&.
1925 .RE
1926 .PP
1927 \-a|\-\-auto
1928 .RS 4
1929 Noninteractive repair mode, use default answers\&.
1930 .RE
1931 .PP
1932 \-v|\-\-verbose
1933 .RS 4
1934 Produce more output\&.
1935 .RE
1936 .PP
1937 \-f|\-\-force
1938 .RS 4
1939 Try to apply changes, even if they do not apply cleanly\&.
1940 .RE
1941 .PP
1942 \-T|\-\-test
1943 .RS 4
1944 Dry run, show what changes would be made but don\*(Aqt touch anything\&.
1945 .RE
1946 .PP
1947 \-l|\-\-lock
1948 .RS 4
1949 Lock the database while doing the check\&.
1950 .RE
1951 .PP
1952 \-\-db <DB>
1953 .RS 4
1954 Check the specified database\&.
1955 .RE
1956 .PP
1957 .RS 4
1958 .RE
1959 It reports about the finding of the following errors:
1960 .PP
1961 Missing reverse mapping:
1962 .RS 4
1963 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\&.
1964 .RE
1965 .PP
1966 Invalid mapping:
1967 .RS 4
1968 A record with mapping A\->B where B\->C\&. Default action is to "delete" this record\&.
1969 .RE
1970 .PP
1971 Missing or invalid HWM:
1972 .RS 4
1973 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\&.
1974 .RE
1975 .PP
1976 Invalid record:
1977 .RS 4
1978 Something we failed to parse\&. Default action is to "edit" it in interactive and "delete" it in automatic mode\&.
1979 .RE
1980 .SS "USERSHARE"
1981 .PP
1982 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\&.
1983 .PP
1984 To set this up, first set up your
1985 /etc/samba/smb\&.conf
1986 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
1987 /etc/samba/smb\&.conf
1988 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\&.
1989 .PP
1990 The usershare commands are:
1991 .RS 4
1992 net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] \- to add or change a user defined share\&.
1993 .RE
1994 .RS 4
1995 net usershare delete sharename \- to delete a user defined share\&.
1996 .RE
1997 .RS 4
1998 net usershare info [\-\-long] [wildcard sharename] \- to print info about a user defined share\&.
1999 .RE
2000 .RS 4
2001 net usershare list [\-\-long] [wildcard sharename] \- to list user defined shares\&.
2002 .RE
2003 .SS "USERSHARE ADD sharename path [comment] [acl] [guest_ok=[y|n]]"
2004 .PP
2005 Add or replace a new user defined share, with name "sharename"\&.
2006 .PP
2007 "path" specifies the absolute pathname on the system to be exported\&. Restrictions may be put on this, see the global
2008 /etc/samba/smb\&.conf
2009 parameters: "usershare owner only", "usershare prefix allow list", and "usershare prefix deny list"\&.
2010 .PP
2011 The optional "comment" parameter is the comment that will appear on the share when browsed to by a client\&.
2012 .PP
2013 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
2014 /etc/samba/smb\&.conf
2015 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)\&.
2016 .PP
2017 The default if no "acl" is given is "Everyone:R", which means any authenticated user has read\-only access\&.
2018 .PP
2019 The optional "guest_ok" has the same effect as the parameter of the same name in
2020 /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
2021 /etc/samba/smb\&.conf\&.
2022 .PP
2023 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\&.
2024 .SS "USERSHARE DELETE sharename"
2025 .PP
2026 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\&.
2027 .SS "USERSHARE INFO [--long] [wildcard sharename]"
2028 .PP
2029 Get info on user defined shares owned by the current user matching the given pattern, or all users\&.
2030 .PP
2031 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\&.
2032 .PP
2033 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\&.
2034 .SS "USERSHARE LIST [--long] wildcard sharename"
2035 .PP
2036 List all the user defined shares owned by the current user matching the given pattern, or all users\&.
2037 .PP
2038 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\&.
2039 .SS "[RPC] CONF"
2040 .PP
2041 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\&.
2042 .PP
2043 The deployment of this configuration data can be activated in two levels from the
2044 \fI/etc/samba/smb\&.conf\fR
2045 file: Share definitions from registry are activated by setting
2046 \fIregistry shares\fR
2047 to
2048 \(lqyes\(rq
2049 in the [global] section and global configuration options are activated by setting
2050 \m[blue]\fBinclude = registry\fR\m[]
2051 in the [global] section for a mixed configuration or by setting
2052 \m[blue]\fBconfig backend = registry\fR\m[]
2053 in the [global] section for a registry\-only configuration\&. See the
2054 \fBsmb.conf\fR(5)
2055 manpage for details\&.
2056 .PP
2057 The conf commands are:
2058 .RS 4
2059 net [rpc] conf list \- Dump the complete configuration in smb\&.conf like
2060 format\&.
2061 .RE
2062 .RS 4
2063 net [rpc] conf import \- Import configuration from file in smb\&.conf
2064 format\&.
2065 .RE
2066 .RS 4
2067 net [rpc] conf listshares \- List the registry shares\&.
2068 .RE
2069 .RS 4
2070 net [rpc] conf drop \- Delete the complete configuration from
2071 registry\&.
2072 .RE
2073 .RS 4
2074 net [rpc] conf showshare \- Show the definition of a registry share\&.
2075 .RE
2076 .RS 4
2077 net [rpc] conf addshare \- Create a new registry share\&.
2078 .RE
2079 .RS 4
2080 net [rpc] conf delshare \- Delete a registry share\&.
2081 .RE
2082 .RS 4
2083 net [rpc] conf setparm \- Store a parameter\&.
2084 .RE
2085 .RS 4
2086 net [rpc] conf getparm \- Retrieve the value of a parameter\&.
2087 .RE
2088 .RS 4
2089 net [rpc] conf delparm \- Delete a parameter\&.
2090 .RE
2091 .RS 4
2092 net [rpc] conf getincludes \- Show the includes of a share definition\&.
2093 .RE
2094 .RS 4
2095 net [rpc] conf setincludes \- Set includes for a share\&.
2096 .RE
2097 .RS 4
2098 net [rpc] conf delincludes \- Delete includes from a share definition\&.
2099 .RE
2100 .SS "[RPC] CONF LIST"
2101 .PP
2102 Print the configuration data stored in the registry in a smb\&.conf\-like format to standard output\&.
2103 .SS "[RPC] CONF IMPORT [--test|-T] filename [section]"
2104 .PP
2105 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\&.
2106 .SS "[RPC] CONF LISTSHARES"
2107 .PP
2108 List the names of the shares defined in registry\&.
2109 .SS "[RPC] CONF DROP"
2110 .PP
2111 Delete the complete configuration data from registry\&.
2112 .SS "[RPC] CONF SHOWSHARE sharename"
2113 .PP
2114 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\&.
2115 .SS "[RPC] CONF ADDSHARE sharename path [writeable={y|N} [guest_ok={y|N} [comment]]] "
2116 .PP
2117 Create a new share definition in registry\&. The sharename and path have to be given\&. The share name may
2118 \fInot\fR
2119 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\&.
2120 .SS "[RPC] CONF DELSHARE sharename"
2121 .PP
2122 Delete a share definition from registry\&.
2123 .SS "[RPC] CONF SETPARM section parameter value"
2124 .PP
2125 Store a parameter in registry\&. The section may be global or a sharename\&. The section is created if it does not exist yet\&.
2126 .SS "[RPC] CONF GETPARM section parameter"
2127 .PP
2128 Show a parameter stored in registry\&.
2129 .SS "[RPC] CONF DELPARM section parameter"
2130 .PP
2131 Delete a parameter stored in registry\&.
2132 .SS "[RPC] CONF GETINCLUDES section"
2133 .PP
2134 Get the list of includes for the provided section (global or share)\&.
2135 .PP
2136 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\&.
2137 .PP
2138 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\&.
2139 .SS "[RPC] CONF SETINCLUDES section [filename]+"
2140 .PP
2141 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\&.
2142 .SS "[RPC] CONF DELINCLUDES section"
2143 .PP
2144 Delete the list of includes from the provided section (global or share)\&.
2145 .SS "REGISTRY"
2146 .PP
2147 Manipulate Samba\*(Aqs registry\&.
2148 .PP
2149 The registry commands are:
2150 .RS 4
2151 net registry enumerate \- Enumerate registry keys and values\&.
2152 .RE
2153 .RS 4
2154 net registry enumerate_recursive \- Enumerate registry key and its subkeys\&.
2155 .RE
2156 .RS 4
2157 net registry createkey \- Create a new registry key\&.
2158 .RE
2159 .RS 4
2160 net registry deletekey \- Delete a registry key\&.
2161 .RE
2162 .RS 4
2163 net registry deletekey_recursive \- Delete a registry key with subkeys\&.
2164 .RE
2165 .RS 4
2166 net registry getvalue \- Print a registry value\&.
2167 .RE
2168 .RS 4
2169 net registry getvalueraw \- Print a registry value (raw format)\&.
2170 .RE
2171 .RS 4
2172 net registry setvalue \- Set a new registry value\&.
2173 .RE
2174 .RS 4
2175 net registry increment \- Increment a DWORD registry value under a lock\&.
2176 .RE
2177 .RS 4
2178 net registry deletevalue \- Delete a registry value\&.
2179 .RE
2180 .RS 4
2181 net registry getsd \- Get security descriptor\&.
2182 .RE
2183 .RS 4
2184 net registry getsd_sdd1 \- Get security descriptor in sddl format\&.
2185 .RE
2186 .RS 4
2187 net registry setsd_sdd1 \- Set security descriptor from sddl format
2188 string\&.
2189 .RE
2190 .RS 4
2191 net registry import \- Import a registration entries (\&.reg) file\&.
2192 .RE
2193 .RS 4
2194 net registry export \- Export a registration entries (\&.reg) file\&.
2195 .RE
2196 .RS 4
2197 net registry convert \- Convert a registration entries (\&.reg) file\&.
2198 .RE
2199 .RS 4
2200 net registry check \- Check and repair a registry database\&.
2201 .RE
2202 .SS "REGISTRY ENUMERATE key "
2203 .PP
2204 Enumerate subkeys and values of
2205 \fIkey\fR\&.
2206 .SS "REGISTRY ENUMERATE_RECURSIVE key "
2207 .PP
2208 Enumerate values of
2209 \fIkey\fR
2210 and its subkeys\&.
2211 .SS "REGISTRY CREATEKEY key "
2212 .PP
2213 Create a new
2214 \fIkey\fR
2215 if not yet existing\&.
2216 .SS "REGISTRY DELETEKEY key "
2217 .PP
2218 Delete the given
2219 \fIkey\fR
2220 and its values from the registry, if it has no subkeys\&.
2221 .SS "REGISTRY DELETEKEY_RECURSIVE key "
2222 .PP
2223 Delete the given
2224 \fIkey\fR
2225 and all of its subkeys and values from the registry\&.
2226 .SS "REGISTRY GETVALUE key name"
2227 .PP
2228 Output type and actual value of the value
2229 \fIname\fR
2230 of the given
2231 \fIkey\fR\&.
2232 .SS "REGISTRY GETVALUERAW key name"
2233 .PP
2234 Output the actual value of the value
2235 \fIname\fR
2236 of the given
2237 \fIkey\fR\&.
2238 .SS "REGISTRY SETVALUE key name type value ..."
2239 .PP
2240 Set the value
2241 \fIname\fR
2242 of an existing
2243 \fIkey\fR\&.
2244 \fItype\fR
2245 may be one of
2246 \fIsz\fR,
2247 \fImulti_sz\fR
2248 or
2249 \fIdword\fR\&. In case of
2250 \fImulti_sz\fR
2251 \fIvalue\fR
2252 may be given multiple times\&.
2253 .SS "REGISTRY INCREMENT key name [inc]"
2254 .PP
2255 Increment the DWORD value
2256 \fIname\fR
2257 of
2258 \fIkey\fR
2259 by
2260 \fIinc\fR
2261 while holding a g_lock\&.
2262 \fIinc\fR
2263 defaults to 1\&.
2264 .SS "REGISTRY DELETEVALUE key name"
2265 .PP
2266 Delete the value
2267 \fIname\fR
2268 of the given
2269 \fIkey\fR\&.
2270 .SS "REGISTRY GETSD key"
2271 .PP
2272 Get the security descriptor of the given
2273 \fIkey\fR\&.
2274 .SS "REGISTRY GETSD_SDDL key"
2275 .PP
2276 Get the security descriptor of the given
2277 \fIkey\fR
2278 as a Security Descriptor Definition Language (SDDL) string\&.
2279 .SS "REGISTRY SETSD_SDDL keysd"
2280 .PP
2281 Set the security descriptor of the given
2282 \fIkey\fR
2283 from a Security Descriptor Definition Language (SDDL) string
2284 \fIsd\fR\&.
2285 .SS "REGISTRY IMPORT file [--precheck <check-file>] [opt]"
2286 .PP
2287 Import a registration entries (\&.reg)
2288 \fIfile\fR\&.
2289 .PP
2290 The following options are available:
2291 .PP
2292 \-\-precheck \fIcheck\-file\fR
2293 .RS 4
2294 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\&.
2295 .sp
2296 The check\-file follows the normal registry file syntax with the following semantics:
2297 .RS
2298 .sp
2299 .RS 4
2300 .ie n \{\
2301 \h'-04'\(bu\h'+03'\c
2302 .\}
2303 .el \{\
2304 .sp -1
2305 .IP \(bu 2.3
2306 .\}
2307 <value name>=<value> checks whether the value exists and has the given value\&.
2308 .RE
2309 .sp
2310 .RS 4
2311 .ie n \{\
2312 \h'-04'\(bu\h'+03'\c
2313 .\}
2314 .el \{\
2315 .sp -1
2316 .IP \(bu 2.3
2317 .\}
2318 <value name>=\- checks whether the value does not exist\&.
2319 .RE
2320 .sp
2321 .RS 4
2322 .ie n \{\
2323 \h'-04'\(bu\h'+03'\c
2324 .\}
2325 .el \{\
2326 .sp -1
2327 .IP \(bu 2.3
2328 .\}
2329 [key] checks whether the key exists\&.
2330 .RE
2331 .sp
2332 .RS 4
2333 .ie n \{\
2334 \h'-04'\(bu\h'+03'\c
2335 .\}
2336 .el \{\
2337 .sp -1
2338 .IP \(bu 2.3
2339 .\}
2340 [\-key] checks whether the key does not exist\&.
2341 .RE
2342 .sp
2343 .RE
2344 .RE
2345 .SS "REGISTRY EXPORT keyfile[opt]"
2346 .PP
2347 Export a
2348 \fIkey\fR
2349 to a registration entries (\&.reg)
2350 \fIfile\fR\&.
2351 .SS "REGISTRY CONVERT in out [[inopt] outopt]"
2352 .PP
2353 Convert a registration entries (\&.reg) file
2354 \fIin\fR\&.
2355 .SS "REGISTRY CHECK [-ravTl] [-o <ODB>] [--wipe] [<DB>]"
2356 .PP
2357 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
2358 .PP
2359 \-r|\-\-repair
2360 .RS 4
2361 Interactive repair mode, ask a lot of questions\&.
2362 .RE
2363 .PP
2364 \-a|\-\-auto
2365 .RS 4
2366 Noninteractive repair mode, use default answers\&.
2367 .RE
2368 .PP
2369 \-v|\-\-verbose
2370 .RS 4
2371 Produce more output\&.
2372 .RE
2373 .PP
2374 \-T|\-\-test
2375 .RS 4
2376 Dry run, show what changes would be made but don\*(Aqt touch anything\&.
2377 .RE
2378 .PP
2379 \-l|\-\-lock
2380 .RS 4
2381 Lock the database while doing the check\&.
2382 .RE
2383 .PP
2384 \-\-reg\-version={1,2,3}
2385 .RS 4
2386 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\&.
2387 .RE
2388 .PP
2389 [\-\-db] <DB>
2390 .RS 4
2391 Check the specified database\&.
2392 .RE
2393 .PP
2394 \-o|\-\-output <ODB>
2395 .RS 4
2396 Create a new registry database <ODB> instead of modifying the input\&. If <ODB> is already existing \-\-wipe may be used to overwrite it\&.
2397 .RE
2398 .PP
2399 \-\-wipe
2400 .RS 4
2401 Replace the registry database instead of modifying the input or overwrite an existing output database\&.
2402 .RE
2403 .PP
2404 .RS 4
2405 .RE
2406 .SS "EVENTLOG"
2407 .PP
2408 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\&.
2409 .PP
2410 The import and export of evt files can only succeed when
2411 \fIeventlog list\fR
2412 is used in
2413 \fI/etc/samba/smb\&.conf\fR
2414 file\&. See the
2415 \fBsmb.conf\fR(5)
2416 manpage for details\&.
2417 .PP
2418 The eventlog commands are:
2419 .RS 4
2420 net eventlog dump \- Dump a eventlog *\&.evt file on the screen\&.
2421 .RE
2422 .RS 4
2423 net eventlog import \- Import a eventlog *\&.evt into the samba internal
2424 tdb based representation of eventlogs\&.
2425 .RE
2426 .RS 4
2427 net eventlog export \- Export the samba internal tdb based representation
2428 of eventlogs into an eventlog *\&.evt file\&.
2429 .RE
2430 .SS "EVENTLOG DUMP filename"
2431 .PP
2432 Prints a eventlog *\&.evt file to standard output\&.
2433 .SS "EVENTLOG IMPORT filename eventlog"
2434 .PP
2435 Imports a eventlog *\&.evt file defined by
2436 \fIfilename\fR
2437 into the samba internal tdb representation of eventlog defined by
2438 \fIeventlog\fR\&.
2439 \fIeventlog\fR
2440 needs to part of the
2441 \fIeventlog list\fR
2442 defined in
2443 /etc/samba/smb\&.conf\&. See the
2444 \fBsmb.conf\fR(5)
2445 manpage for details\&.
2446 .SS "EVENTLOG EXPORT filename eventlog"
2447 .PP
2448 Exports the samba internal tdb representation of eventlog defined by
2449 \fIeventlog\fR
2450 to a eventlog *\&.evt file defined by
2451 \fIfilename\fR\&.
2452 \fIeventlog\fR
2453 needs to part of the
2454 \fIeventlog list\fR
2455 defined in
2456 /etc/samba/smb\&.conf\&. See the
2457 \fBsmb.conf\fR(5)
2458 manpage for details\&.
2459 .SS "DOM"
2460 .PP
2461 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\&.
2462 .PP
2463 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\&.
2464 .PP
2465 The client side support for remote join is implemented in the net dom commands which are:
2466 .RS 4
2467 net dom join \- Join a remote computer into a domain\&.
2468 .RE
2469 .RS 4
2470 net dom unjoin \- Unjoin a remote computer from a domain\&.
2471 .RE
2472 .RS 4
2473 net dom renamecomputer \- Renames a remote computer joined to a domain\&.
2474 .RE
2475 .SS "DOM JOIN domain=DOMAIN ou=OU account=ACCOUNT password=PASSWORD reboot"
2476 .PP
2477 Joins a computer into a domain\&. This command supports the following additional parameters:
2478 .RS
2479 .sp
2480 .RS 4
2481 .ie n \{\
2482 \h'-04'\(bu\h'+03'\c
2483 .\}
2484 .el \{\
2485 .sp -1
2486 .IP \(bu 2.3
2487 .\}
2488 \fIDOMAIN\fR
2489 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
2490 \fIDOMAIN\fR
2491 parameter cannot be NULL\&.
2492 .RE
2493 .sp
2494 .RS 4
2495 .ie n \{\
2496 \h'-04'\(bu\h'+03'\c
2497 .\}
2498 .el \{\
2499 .sp -1
2500 .IP \(bu 2.3
2501 .\}
2502 \fIOU\fR
2503 can be set to a RFC 1779 LDAP DN, like
2504 \fIou=mymachines,cn=Users,dc=example,dc=com\fR
2505 in order to create the machine account in a non\-default LDAP container\&. This optional parameter is only supported when joining Active Directory Domains\&.
2506 .RE
2507 .sp
2508 .RS 4
2509 .ie n \{\
2510 \h'-04'\(bu\h'+03'\c
2511 .\}
2512 .el \{\
2513 .sp -1
2514 .IP \(bu 2.3
2515 .\}
2516 \fIACCOUNT\fR
2517 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\&.
2518 .RE
2519 .sp
2520 .RS 4
2521 .ie n \{\
2522 \h'-04'\(bu\h'+03'\c
2523 .\}
2524 .el \{\
2525 .sp -1
2526 .IP \(bu 2.3
2527 .\}
2528 \fIPASSWORD\fR
2529 defines the password for the domain account defined with
2530 \fIACCOUNT\fR\&.
2531 .RE
2532 .sp
2533 .RS 4
2534 .ie n \{\
2535 \h'-04'\(bu\h'+03'\c
2536 .\}
2537 .el \{\
2538 .sp -1
2539 .IP \(bu 2.3
2540 .\}
2541 \fIREBOOT\fR
2542 is an optional parameter that can be set to reboot the remote machine after successful join to the domain\&.
2543 .RE
2544 .sp
2545 .RE
2546 .PP
2547 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\&.
2548 .PP
2549 Example: net dom join \-S xp \-U XP\e\eadministrator%secret domain=MYDOM account=MYDOM\e\eadministrator password=topsecret reboot\&.
2550 .PP
2551 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\&.
2552 .SS "DOM UNJOIN account=ACCOUNT password=PASSWORD reboot"
2553 .PP
2554 Unjoins a computer from a domain\&. This command supports the following additional parameters:
2555 .RS
2556 .sp
2557 .RS 4
2558 .ie n \{\
2559 \h'-04'\(bu\h'+03'\c
2560 .\}
2561 .el \{\
2562 .sp -1
2563 .IP \(bu 2.3
2564 .\}
2565 \fIACCOUNT\fR
2566 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\&.
2567 .RE
2568 .sp
2569 .RS 4
2570 .ie n \{\
2571 \h'-04'\(bu\h'+03'\c
2572 .\}
2573 .el \{\
2574 .sp -1
2575 .IP \(bu 2.3
2576 .\}
2577 \fIPASSWORD\fR
2578 defines the password for the domain account defined with
2579 \fIACCOUNT\fR\&.
2580 .RE
2581 .sp
2582 .RS 4
2583 .ie n \{\
2584 \h'-04'\(bu\h'+03'\c
2585 .\}
2586 .el \{\
2587 .sp -1
2588 .IP \(bu 2.3
2589 .\}
2590 \fIREBOOT\fR
2591 is an optional parameter that can be set to reboot the remote machine after successful unjoin from the domain\&.
2592 .RE
2593 .sp
2594 .RE
2595 .PP
2596 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\&.
2597 .PP
2598 Example: net dom unjoin \-S xp \-U XP\e\eadministrator%secret account=MYDOM\e\eadministrator password=topsecret reboot\&.
2599 .PP
2600 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\&.
2601 .SS "DOM RENAMECOMPUTER newname=NEWNAME account=ACCOUNT password=PASSWORD reboot"
2602 .PP
2603 Renames a computer that is joined to a domain\&. This command supports the following additional parameters:
2604 .RS
2605 .sp
2606 .RS 4
2607 .ie n \{\
2608 \h'-04'\(bu\h'+03'\c
2609 .\}
2610 .el \{\
2611 .sp -1
2612 .IP \(bu 2.3
2613 .\}
2614 \fINEWNAME\fR
2615 defines the new name of the machine in the domain\&.
2616 .RE
2617 .sp
2618 .RS 4
2619 .ie n \{\
2620 \h'-04'\(bu\h'+03'\c
2621 .\}
2622 .el \{\
2623 .sp -1
2624 .IP \(bu 2.3
2625 .\}
2626 \fIACCOUNT\fR
2627 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\&.
2628 .RE
2629 .sp
2630 .RS 4
2631 .ie n \{\
2632 \h'-04'\(bu\h'+03'\c
2633 .\}
2634 .el \{\
2635 .sp -1
2636 .IP \(bu 2.3
2637 .\}
2638 \fIPASSWORD\fR
2639 defines the password for the domain account defined with
2640 \fIACCOUNT\fR\&.
2641 .RE
2642 .sp
2643 .RS 4
2644 .ie n \{\
2645 \h'-04'\(bu\h'+03'\c
2646 .\}
2647 .el \{\
2648 .sp -1
2649 .IP \(bu 2.3
2650 .\}
2651 \fIREBOOT\fR
2652 is an optional parameter that can be set to reboot the remote machine after successful rename in the domain\&.
2653 .RE
2654 .sp
2655 .RE
2656 .PP
2657 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\&.
2658 .PP
2659 Example: net dom renamecomputer \-S xp \-U XP\e\eadministrator%secret newname=XPNEW account=MYDOM\e\eadministrator password=topsecret reboot\&.
2660 .PP
2661 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\&.
2662 .SS "G_LOCK"
2663 .PP
2664 Manage global locks\&.
2665 .SS "G_LOCK DO lockname timeout command"
2666 .PP
2667 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
2668 g_lock\&.tdb\&. In setups with CTDB running, the locking information will be available on all cluster nodes\&.
2669 .RS
2670 .sp
2671 .RS 4
2672 .ie n \{\
2673 \h'-04'\(bu\h'+03'\c
2674 .\}
2675 .el \{\
2676 .sp -1
2677 .IP \(bu 2.3
2678 .\}
2679 \fILOCKNAME\fR
2680 defines the name of the global lock\&.
2681 .RE
2682 .sp
2683 .RS 4
2684 .ie n \{\
2685 \h'-04'\(bu\h'+03'\c
2686 .\}
2687 .el \{\
2688 .sp -1
2689 .IP \(bu 2.3
2690 .\}
2691 \fITIMEOUT\fR
2692 defines the timeout\&.
2693 .RE
2694 .sp
2695 .RS 4
2696 .ie n \{\
2697 \h'-04'\(bu\h'+03'\c
2698 .\}
2699 .el \{\
2700 .sp -1
2701 .IP \(bu 2.3
2702 .\}
2703 \fICOMMAND\fR
2704 defines the shell command to execute\&.
2705 .RE
2706 .SS "G_LOCK LOCKS"
2707 .PP
2708 Print a list of all currently existing locknames\&.
2709 .SS "G_LOCK DUMP lockname"
2710 .PP
2711 Dump the locking table of a certain global lock\&.
2712 .SS "TDB"
2713 .PP
2714 Print information from tdb records\&.
2715 .SS "TDB LOCKING key [DUMP]"
2716 .PP
2717 List sharename, filename and number of share modes for a record from locking\&.tdb\&. With the optional DUMP options, dump the complete record\&.
2718 .RS
2719 .sp
2720 .RS 4
2721 .ie n \{\
2722 \h'-04'\(bu\h'+03'\c
2723 .\}
2724 .el \{\
2725 .sp -1
2726 .IP \(bu 2.3
2727 .\}
2728 \fIKEY\fR
2729 Key of the tdb record as hex string\&.
2730 .RE
2731 .SS "tdb smbXsrv wipedbs"
2732 .PP
2733 Clean stale entries from smbXsrv databases\&.
2734 .PP
2735 An alias for
2736 net serverid wipedbs\&.
2737 .SS "vfs"
2738 .PP
2739 Access shared filesystem through the VFS\&.
2740 .SS "vfs stream2abouble [--recursive] [--verbose] [--continue] [--follow-symlinks] share path"
2741 .PP
2742 Convert file streams to AppleDouble files\&.
2743 .RS
2744 .sp
2745 .RS 4
2746 .ie n \{\
2747 \h'-04'\(bu\h'+03'\c
2748 .\}
2749 .el \{\
2750 .sp -1
2751 .IP \(bu 2.3
2752 .\}
2753 \fIshare\fR
2754 A Samba share\&.
2755 .RE
2756 .sp
2757 .RE
2758 .RS
2759 .sp
2760 .RS 4
2761 .ie n \{\
2762 \h'-04'\(bu\h'+03'\c
2763 .\}
2764 .el \{\
2765 .sp -1
2766 .IP \(bu 2.3
2767 .\}
2768 \fIpath\fR
2769 A relative path of something in the Samba share\&. "\&." can be used for the root directory of the share\&.
2770 .RE
2771 .sp
2772 .RE
2773 .PP
2774 Options:
2775 .PP
2776 \-\-recursive
2777 .RS 4
2778 Traverse a directory hierarchy\&.
2779 .RE
2780 .PP
2781 \-\-verbose
2782 .RS 4
2783 Verbose output\&.
2784 .RE
2785 .PP
2786 \-\-continue
2787 .RS 4
2788 Continue traversing a directory hierarchy if a single conversion fails\&.
2789 .RE
2790 .PP
2791 \-\-follow\-symlinks
2792 .RS 4
2793 Follow symlinks encountered while traversing a directory\&.
2794 .RE
2795 .SS "vfs getntacl share path"
2796 .PP
2797 Display the security descriptor of a file or directory\&.
2798 .RS
2799 .sp
2800 .RS 4
2801 .ie n \{\
2802 \h'-04'\(bu\h'+03'\c
2803 .\}
2804 .el \{\
2805 .sp -1
2806 .IP \(bu 2.3
2807 .\}
2808 \fIshare\fR
2809 A Samba share\&.
2810 .RE
2811 .sp
2812 .RE
2813 .RS
2814 .sp
2815 .RS 4
2816 .ie n \{\
2817 \h'-04'\(bu\h'+03'\c
2818 .\}
2819 .el \{\
2820 .sp -1
2821 .IP \(bu 2.3
2822 .\}
2823 \fIpath\fR
2824 A relative path of something in the Samba share\&. "\&." can be used for the root directory of the share\&.
2825 .RE
2826 .SS "OFFLINEJOIN"
2827 .PP
2828 Starting with version 4\&.15 Samba has support for offline join APIs\&. Windows supports offline join capabilities since Windows 7 and Windows 2008 R2\&.
2829 .PP
2830 The following offline commands are implemented:
2831 .RS 4
2832 net offlinejoin provision \- Provisions a machine account in AD\&.
2833 .RE
2834 .RS 4
2835 net offlinejoin requestodj \- Requests a domain offline join\&.
2836 .RE
2837 .SS "OFFLINEJOIN PROVISION domain=DOMAIN machine_name=MACHINE_NAME machine_account_ou=MACHINE_ACCOUNT_OU dcname=DCNAME defpwd reuse savefile=FILENAME printblob"
2838 .PP
2839 Provisions a machine account in AD\&. This command needs network connectivity to the domain controller to succeed\&. This command supports the following additional parameters:
2840 .RS
2841 .sp
2842 .RS 4
2843 .ie n \{\
2844 \h'-04'\(bu\h'+03'\c
2845 .\}
2846 .el \{\
2847 .sp -1
2848 .IP \(bu 2.3
2849 .\}
2850 \fIDOMAIN\fR
2851 can be a NetBIOS domain name (also known as short domain name) or a DNS domain name for Active Directory Domains\&. The
2852 \fIDOMAIN\fR
2853 parameter cannot be NULL\&.
2854 .RE
2855 .sp
2856 .RS 4
2857 .ie n \{\
2858 \h'-04'\(bu\h'+03'\c
2859 .\}
2860 .el \{\
2861 .sp -1
2862 .IP \(bu 2.3
2863 .\}
2864 \fIMACHINE_NAME\fR
2865 defines the machine account name that will be provisioned in AD\&. The
2866 \fIMACHINE_NAME\fR
2867 parameter cannot be NULL\&.
2868 .RE
2869 .sp
2870 .RS 4
2871 .ie n \{\
2872 \h'-04'\(bu\h'+03'\c
2873 .\}
2874 .el \{\
2875 .sp -1
2876 .IP \(bu 2.3
2877 .\}
2878 \fIMACHINE_ACCOUNT_OU\fR
2879 can be set to a RFC 1779 LDAP DN, like
2880 \fIou=mymachines,cn=Users,dc=example,dc=com\fR
2881 in order to create the machine account in a non\-default LDAP container\&. This optional parameter is only supported when joining Active Directory Domains\&.
2882 .RE
2883 .sp
2884 .RS 4
2885 .ie n \{\
2886 \h'-04'\(bu\h'+03'\c
2887 .\}
2888 .el \{\
2889 .sp -1
2890 .IP \(bu 2.3
2891 .\}
2892 \fIDCNAME\fR
2893 defines a specific domain controller for creating the machine account in AD\&.
2894 .RE
2895 .sp
2896 .RS 4
2897 .ie n \{\
2898 \h'-04'\(bu\h'+03'\c
2899 .\}
2900 .el \{\
2901 .sp -1
2902 .IP \(bu 2.3
2903 .\}
2904 \fIDEFPWD\fR
2905 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\&.
2906 .RE
2907 .sp
2908 .RS 4
2909 .ie n \{\
2910 \h'-04'\(bu\h'+03'\c
2911 .\}
2912 .el \{\
2913 .sp -1
2914 .IP \(bu 2.3
2915 .\}
2916 \fIREUSE\fR
2917 is an optional parameter that can be set to enforce reusing an existing machine account in AD\&.
2918 .RE
2919 .sp
2920 .RS 4
2921 .ie n \{\
2922 \h'-04'\(bu\h'+03'\c
2923 .\}
2924 .el \{\
2925 .sp -1
2926 .IP \(bu 2.3
2927 .\}
2928 \fISAVEFILE\fR
2929 is an optional parameter to store the generated provisioning data on disk\&.
2930 .RE
2931 .sp
2932 .RS 4
2933 .ie n \{\
2934 \h'-04'\(bu\h'+03'\c
2935 .\}
2936 .el \{\
2937 .sp -1
2938 .IP \(bu 2.3
2939 .\}
2940 \fIPRINTBLOB\fR
2941 is an optional parameter to print the generated provisioning data on stdout\&.
2942 .RE
2943 .sp
2944 .RE
2945 .PP
2946 Example: net offlinejoin provision \-U administrator%secret domain=MYDOM machine_name=MYHOST savefile=provisioning\&.txt
2947 .SS "OFFLINEJOIN REQUESTODJ loadfile=FILENAME"
2948 .PP
2949 Requests an offline domain join by providing file\-based provisioning data\&. This command supports the following additional parameters:
2950 .RS
2951 .sp
2952 .RS 4
2953 .ie n \{\
2954 \h'-04'\(bu\h'+03'\c
2955 .\}
2956 .el \{\
2957 .sp -1
2958 .IP \(bu 2.3
2959 .\}
2960 \fILOADFILE\fR
2961 is a required parameter to load the provisioning from a file\&.
2962 .RE
2963 .sp
2964 .RE
2965 .PP
2966 Example: net offlinejoin requestodj loadfile=provisioning\&.txt
2967 .SS "WITNESS"
2968 .PP
2969 Starting with version 4\&.20 Samba has support for the SMB Witness service in a cluster\&.
2970 .PP
2971 The following witness commands are implemented:
2972 .RS 4
2973
2974 net witness list List witness registrations from rpcd_witness_registration\&.tdb\&.
2975 .RE
2976 .RS 4
2977
2978 net witness client\-move Generate client move notifications for witness registrations to a new ip or node\&.
2979 .RE
2980 .RS 4
2981
2982 net witness share\-move Generate share move notifications for witness registrations to a new ip or node\&.
2983 .RE
2984 .RS 4
2985
2986 net witness force\-unregister Force unregistrations for witness registrations\&.
2987 .RE
2988 .RS 4
2989
2990 net witness force\-response Force an AsyncNotify response based on json input (mostly for testing)\&.
2991 .RE
2992 .SS "WITNESS LIST"
2993 .PP
2994 List witness registrations from rpcd_witness_registration\&.tdb
2995 .PP
2996 Note: Only supported with clustering=yes!
2997 .PP
2998 Machine readable output can be generated with the following option:
2999 .PP
3000 \-\-json
3001 .PP
3002 The selection of registrations can be limited by the following options:
3003 .PP
3004 \-\-witness\-registration=REGISTRATION_UUID
3005 .PP
3006 This does a direct lookup for REGISTRATION_UUID instead of doing a database traversal\&.
3007 .PP
3008 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\&.
3009 .PP
3010 \-\-witness\-net\-name=REGEX
3011 .PP
3012 This specifies the \*(Aqserver name\*(Aq the client registered for monitoring\&.
3013 .PP
3014 \-\-witness\-share\-name=REGEX
3015 .PP
3016 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\&.
3017 .PP
3018 \-\-witness\-ip\-address=REGEX
3019 .PP
3020 This specifies the ip address the client registered for monitoring\&.
3021 .PP
3022 \-\-witness\-client\-computer\-name=REGEX
3023 .PP
3024 This specifies the client computer name the client specified in the registration\&. Note it is just a string chosen by the client itself\&.
3025 .SS "WITNESS CLIENT-MOVE"
3026 .PP
3027 Generate client move notifications for witness registrations to a new ip or node
3028 .PP
3029 Note: Only supported with clustering=yes!
3030 .PP
3031 Machine readable output can be generated with the following option:
3032 .PP
3033 \-\-json
3034 .PP
3035 The selection of registrations can be limited by the following options:
3036 .PP
3037 \-\-witness\-registration=REGISTRATION_UUID
3038 .PP
3039 This does a direct lookup for REGISTRATION_UUID instead of doing a database traversal\&.
3040 .PP
3041 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\&.
3042 .PP
3043 \-\-witness\-net\-name=REGEX
3044 .PP
3045 This specifies the \*(Aqserver name\*(Aq the client registered for monitoring\&.
3046 .PP
3047 \-\-witness\-share\-name=REGEX
3048 .PP
3049 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\&.
3050 .PP
3051 \-\-witness\-ip\-address=REGEX
3052 .PP
3053 This specifies the ip address the client registered for monitoring\&.
3054 .PP
3055 \-\-witness\-client\-computer\-name=REGEX
3056 .PP
3057 This specifies the client computer name the client specified in the registration\&. Note it is just a string chosen by the client itself\&.
3058 .PP
3059 If the update should be applied to all registrations it needs to be explicitly specified:
3060 .PP
3061 \-\-witness\-apply\-to\-all
3062 .PP
3063 This selects all registrations\&. Note: This is mutual exclusive to the above options\&.
3064 .PP
3065 The content of the CLIENT_MOVE notification contains ip addresses specified by (exactly one) of the following options:
3066 .PP
3067 \-\-witness\-new\-node=NODEID
3068 .PP
3069 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\&.
3070 .PP
3071 \-\-witness\-new\-ip=IPADDRESS
3072 .PP
3073 By specifying an IPADDRESS only the specified ip address is included in the response\&.
3074 .SS "WITNESS SHARE-MOVE"
3075 .PP
3076 Generate share move notifications for witness registrations to a new ip or node
3077 .PP
3078 Note: Only supported with clustering=yes!
3079 .PP
3080 Machine readable output can be generated with the following option:
3081 .PP
3082 \-\-json
3083 .PP
3084 The selection of registrations can be limited by the following options:
3085 .PP
3086 \-\-witness\-registration=REGISTRATION_UUID
3087 .PP
3088 This does a direct lookup for REGISTRATION_UUID instead of doing a database traversal\&.
3089 .PP
3090 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\&.
3091 .PP
3092 \-\-witness\-net\-name=REGEX
3093 .PP
3094 This specifies the \*(Aqserver name\*(Aq the client registered for monitoring\&.
3095 .PP
3096 \-\-witness\-share\-name=REGEX
3097 .PP
3098 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\&.
3099 .PP
3100 \-\-witness\-ip\-address=REGEX
3101 .PP
3102 This specifies the ip address the client registered for monitoring\&.
3103 .PP
3104 \-\-witness\-client\-computer\-name=REGEX
3105 .PP
3106 This specifies the client computer name the client specified in the registration\&. Note it is just a string chosen by the client itself\&.
3107 .PP
3108 If the update should be applied to all registrations it needs to be explicitly specified:
3109 .PP
3110 \-\-witness\-apply\-to\-all
3111 .PP
3112 This selects all registrations\&. Note: This is mutual exclusive to the above options\&.
3113 .PP
3114 Note: This only applies to registrations with a non empty share name!
3115 .PP
3116 The content of the SHARE_MOVE notification contains ip addresses specified by (exactly one) of the following options:
3117 .PP
3118 \-\-witness\-new\-node=NODEID
3119 .PP
3120 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\&.
3121 .PP
3122 \-\-witness\-new\-ip=IPADDRESS
3123 .PP
3124 By specifying an IPADDRESS only the specified ip address is included in the response\&.
3125 .SS "WITNESS FORCE-UNREGISTER"
3126 .PP
3127 Force unregistrations for witness registrations
3128 .PP
3129 Note: Only supported with clustering=yes!
3130 .PP
3131 Machine readable output can be generated with the following option:
3132 .PP
3133 \-\-json
3134 .PP
3135 The selection of registrations can be limited by the following options:
3136 .PP
3137 \-\-witness\-registration=REGISTRATION_UUID
3138 .PP
3139 This does a direct lookup for REGISTRATION_UUID instead of doing a database traversal\&.
3140 .PP
3141 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\&.
3142 .PP
3143 \-\-witness\-net\-name=REGEX
3144 .PP
3145 This specifies the \*(Aqserver name\*(Aq the client registered for monitoring\&.
3146 .PP
3147 \-\-witness\-share\-name=REGEX
3148 .PP
3149 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\&.
3150 .PP
3151 \-\-witness\-ip\-address=REGEX
3152 .PP
3153 This specifies the ip address the client registered for monitoring\&.
3154 .PP
3155 \-\-witness\-client\-computer\-name=REGEX
3156 .PP
3157 This specifies the client computer name the client specified in the registration\&. Note it is just a string chosen by the client itself\&.
3158 .PP
3159 If the update should be applied to all registrations it needs to be explicitly specified:
3160 .PP
3161 \-\-witness\-apply\-to\-all
3162 .PP
3163 This selects all registrations\&. Note: This is mutual exclusive to the above options\&.
3164 .PP
3165 The selected registrations are removed on the server and any pending AsyncNotify request will get a NOT_FOUND error\&.
3166 .PP
3167 Typically this triggers a clean re\-registration on the client\&.
3168 .SS "WITNESS FORCE-RESPONSE"
3169 .PP
3170 Force an AsyncNotify response based on json input (mostly for testing)
3171 .PP
3172 Note: Only supported with clustering=yes!
3173 .PP
3174 Machine readable output can be generated with the following option:
3175 .PP
3176 \-\-json
3177 .PP
3178 The selection of registrations can be limited by the following options:
3179 .PP
3180 \-\-witness\-registration=REGISTRATION_UUID
3181 .PP
3182 This does a direct lookup for REGISTRATION_UUID instead of doing a database traversal\&.
3183 .PP
3184 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\&.
3185 .PP
3186 \-\-witness\-net\-name=REGEX
3187 .PP
3188 This specifies the \*(Aqserver name\*(Aq the client registered for monitoring\&.
3189 .PP
3190 \-\-witness\-share\-name=REGEX
3191 .PP
3192 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\&.
3193 .PP
3194 \-\-witness\-ip\-address=REGEX
3195 .PP
3196 This specifies the ip address the client registered for monitoring\&.
3197 .PP
3198 \-\-witness\-client\-computer\-name=REGEX
3199 .PP
3200 This specifies the client computer name the client specified in the registration\&. Note it is just a string chosen by the client itself\&.
3201 .PP
3202 If the update should be applied to all registrations it needs to be explicitly specified:
3203 .PP
3204 \-\-witness\-apply\-to\-all
3205 .PP
3206 This selects all registrations\&. Note: This is mutual exclusive to the above options\&.
3207 .PP
3208 Note this is designed for testing and debugging!
3209 .PP
3210 In short it is not designed to be used by administrators, but developers and automated tests\&.
3211 .PP
3212 By default an empty response with WERR_OK is generated, but basically any valid response can be specified by a specifying a JSON string:
3213 .PP
3214 \-\-witness\-forced\-response=JSON
3215 .PP
3216 This allows the generation of very complex witness_notifyResponse structures\&.
3217 .PP
3218 As this is for developers, please read the code in order to understand all possible values of the JSON string format\&.\&.\&.
3219 .PP
3220 See \*(Aqnet help witness force\-response\*(Aq for further details\&.
3221 .SS "serverid"
3222 .PP
3223 Check existence of a serverid and clean stale entries from fileserver state databases\&.
3224 .PP
3225 The following commands are implemented:
3226 .RS 4
3227 net serverid exists Check existence of a serverid
3228 .RE
3229 .RS 4
3230 net serverid wipedbs Clean stale entries from fileserver state databases
3231 .RE
3232 .SS "serverid exists <serverid>"
3233 .PP
3234 Checks if a serverid exits\&.
3235 .SS "serverid wipedbs"
3236 .PP
3237 Clean stale entries from fileserver state databases
3238 .PP
3239 Options for wipedbs:
3240 .PP
3241 \-\-test
3242 .PP
3243 Only check for stale entries and log them
3244 .PP
3245 \-\-verbose
3246 .PP
3247 Produce verbose logging
3248 .SS "HELP [COMMAND]"
3249 .PP
3250 Gives usage information for the specified command\&.
3251 .SH "VERSION"
3252 .PP
3253 This man page is part of version 4\&.24\&.3\-Debian\-4\&.24\&.3+dfsg\-1 of the Samba suite\&.
3254 .SH "AUTHOR"
3255 .PP
3256 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\&.
3257 .PP
3258 The net manpage was written by Jelmer Vernooij\&.