1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
6 <refentrytitle>net</refentrytitle>
7 <manvolnum>8</manvolnum>
8 <refmiscinfo class="source">Samba</refmiscinfo>
9 <refmiscinfo class="manual">System Administration tools</refmiscinfo>
10 <refmiscinfo class="version">&doc.version;</refmiscinfo>
15 <refname>net</refname>
16 <refpurpose>Tool for administration of Samba and remote
23 <command>net</command>
24 <arg choice="req"><ads|rap|rpc></arg>
25 <arg choice="opt">-h|--help</arg>
26 <arg choice="opt">-d|--debuglevel=DEBUGLEVEL</arg>
27 <arg choice="opt">--debug-stdout</arg>
28 <arg choice="opt">--configfile=CONFIGFILE</arg>
29 <arg choice="opt">--option=name=value</arg>
30 <arg choice="opt">-l|--log-basename=LOGFILEBASE</arg>
31 <arg choice="opt">--leak-report</arg>
32 <arg choice="opt">--leak-report-full</arg>
33 <arg choice="opt">-R|--name-resolve=NAME-RESOLVE-ORDER</arg>
34 <arg choice="opt">-O|--socket-options=SOCKETOPTIONS</arg>
35 <arg choice="opt">-m|--max-protocol=MAXPROTOCOL</arg>
36 <arg choice="opt">-n|--netbiosname=NETBIOSNAME</arg>
37 <arg choice="opt">--netbios-scope=SCOPE</arg>
38 <arg choice="opt">-W|--workgroup=WORKGROUP</arg>
39 <arg choice="opt">--realm=REALM</arg>
40 <arg choice="opt">-U|--user=[DOMAIN/]USERNAME[%PASSWORD]</arg>
41 <arg choice="opt">-N|--no-pass</arg>
42 <arg choice="opt">--password=STRING</arg>
43 <arg choice="opt">--pw-nt-hash</arg>
44 <arg choice="opt">-A|--authentication-file=FILE</arg>
45 <arg choice="opt">-P|--machine-pass</arg>
46 <arg choice="opt">--simple-bind-dn=DN</arg>
47 <arg choice="opt">--use-kerberos=desired|required|off</arg>
48 <arg choice="opt">--use-krb5-ccache=CCACHE</arg>
49 <arg choice="opt">--use-winbind-ccache</arg>
50 <arg choice="opt">--client-protection=sign|encrypt|off</arg>
51 <arg choice="opt">-V|--version</arg>
52 <arg choice="opt">-w|--target-workgroup workgroup</arg>
53 <arg choice="opt">-I|--ipaddress ip-address</arg>
54 <arg choice="opt">-p|--port port</arg>
55 <arg choice="opt">--myname</arg>
56 <arg choice="opt">-S|--server server</arg>
57 <arg choice="opt">--long</arg>
58 <arg choice="opt">-v|--verbose</arg>
59 <arg choice="opt">-f|--force</arg>
60 <arg choice="opt">--request-timeout seconds</arg>
61 <arg choice="opt">-t|--timeout seconds</arg>
62 <arg choice="opt">--dns-ttl TTL-IN-SECONDS</arg>
63 <arg choice="opt">-i|--stdin</arg>
64 <arg choice="opt">--witness-registration=REGISTRATION_UUID</arg>
65 <arg choice="opt">--witness-net-name=REGEX</arg>
66 <arg choice="opt">--witness-share-name=REGEX</arg>
67 <arg choice="opt">--witness-ip-address=REGEX</arg>
68 <arg choice="opt">--witness-client-computer-name=REGEX</arg>
69 <arg choice="opt">--witness-apply-to-all</arg>
70 <arg choice="opt">--witness-new-node=NODEID</arg>
71 <arg choice="opt">--witness-new-ip=IPADDRESS</arg>
72 <arg choice="opt">--witness-forced-response=JSON</arg>
78 <title>DESCRIPTION</title>
80 <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
81 <manvolnum>7</manvolnum></citerefentry> suite.</para>
83 <para>The Samba net utility is meant to work just like the net utility
84 available for windows and DOS. The first argument should be used
85 to specify the protocol to use when executing a certain command.
86 ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3)
87 clients and RPC can be used for NT4 and Windows 2000. If this
88 argument is omitted, net will try to determine it automatically.
89 Not all commands are available on all protocols.
95 <title>OPTIONS</title>
99 <term>-w|--target-workgroup target-workgroup</term>
101 Sets target workgroup or domain. You have to specify
102 either this option or the IP address or the name of a server.
107 <term>-I|--ipaddress ip-address</term>
109 IP address of target server to use. You have to
110 specify either this option or a target workgroup or
116 <term>-p|--port port</term>
118 Port on the target server to connect to (usually 139 or 445).
119 Defaults to trying 445 first, then 139.
124 <term>-S|--server server</term>
126 Name of target server. You should specify either
127 this option or a target workgroup or a target IP address.
134 When listing data, give more information on each item.
139 <term>-v|--verbose</term>
141 When listing data, give more verbose information on each item.
146 <term>-f|--force</term>
148 Enforcing a net command.
153 <term>--request-timeout 30</term>
155 Let client requests timeout after 30 seconds the default is 10
161 <term>-t|--timeout 30</term>
163 Set timeout for client operations to 30 seconds.
168 <term>-i|--stdin</term>
170 Take input for net commands from standard input.
175 <term>-T|--test</term>
176 <listitem><para>Only test command sequence, dry-run.
181 <term>-F|--flags FLAGS</term>
182 <listitem><para>Pass down integer flags to a net subcommand.
187 <term>-C|--comment COMMENT</term>
188 <listitem><para>Pass down a comment string to a net subcommand.
193 <term>--myname MYNAME</term>
194 <listitem><para>Use MYNAME as a requester name for a net subcommand.
199 <term>-c|--container CONTAINER</term>
200 <listitem><para>Use a specific AD container for net ads operations.
205 <term>-M|--maxusers MAXUSERS</term>
206 <listitem><para>Fill in the maxusers field in net rpc share operations.
211 <term>-r|--reboot</term>
212 <listitem><para>Reboot a remote machine after a command has been successfully executed (e.g. in remote join operations).
216 <!-- Options for net rpc vampire -->
219 <term>--force-full-repl</term>
221 When calling "net rpc vampire keytab" this option
222 enforces a full re-creation of the generated keytab file.
227 <term>--single-obj-repl</term>
229 When calling "net rpc vampire keytab" this option
230 allows one to replicate just a single object to the generated keytab file.
235 <term>--clean-old-entries</term>
237 When calling "net rpc vampire keytab" this option
238 allows one to cleanup old entries from the generated keytab file.
242 <!-- Options for net idmap -->
246 <listitem><para>Define dbfile for "net idmap" commands.
252 <listitem><para>Activates locking of the dbfile for "net idmap check" command.
257 <term>-a|--auto</term>
258 <listitem><para>Activates noninteractive mode in "net idmap check".
263 <term>--repair</term>
264 <listitem><para>Activates repair mode in "net idmap check".
268 <!-- Options for net rpc share migrate -->
272 <listitem><para>Includes ACLs to be copied in "net rpc share migrate".
278 <listitem><para>Includes file attributes to be copied in "net rpc share migrate".
283 <term>--timestamps</term>
284 <listitem><para>Includes timestamps to be copied in "net rpc share migrate".
289 <term>-X|--exclude DIRECTORY</term>
290 <listitem><para>Allows one to exclude directories when copying with "net rpc share migrate".
295 <term>--destination SERVERNAME</term>
296 <listitem><para>Defines the target servername of migration process (defaults to localhost).
300 <!-- Options for net groupmap set -->
303 <term>-L|--local</term>
304 <listitem><para>Sets the type of group mapping to local
305 (used in "net groupmap set").
310 <term>-D|--domain</term>
311 <listitem><para>Sets the type of group mapping to domain
312 (used in "net groupmap set").
317 <term>-N|--ntname NTNAME</term>
318 <listitem><para>Sets the ntname of a group mapping
319 (used in "net groupmap set").
324 <term>--rid RID</term>
325 <listitem><para>Sets the rid of a group mapping
326 (used in "net groupmap set").
330 <!-- Options for net registry check -->
333 <term>--reg-version REG_VERSION</term>
334 <listitem><para>Assume database version {n|1,2,3}
335 (used in "net registry check").
340 <term>-o|--output FILENAME</term>
341 <listitem><para>Output database file
342 (used in "net registry check").
348 <listitem><para>Create a new database from scratch
349 (used in "net registry check").
353 <!-- Options for net registry import -->
356 <term>--precheck PRECHECK_DB_FILENAME</term>
357 <listitem><para>Defines filename for database prechecking
358 (used in "net registry import").
363 <term>--no-dns-updates</term>
364 <listitem><para>Do not perform DNS updates as part of
370 <term>--keep-account</term>
371 <listitem><para>Prevent the machine account removal as
372 part of "net ads leave".
378 <listitem><para>Report results in JSON format for
379 "net ads info" and "net ads lookup".
383 <!-- Options for net vfs stream2abouble -->
386 <term>--recursive</term>
387 <listitem><para>Traverse a directory
388 hierarchy.</para></listitem>
392 <term>--continue</term>
393 <listitem><para>Continue traversing a directory hierarchy in
394 case conversion of one file fails.</para></listitem>
398 <term>--follow-symlinks</term>
399 <listitem><para>Follow symlinks encountered while traversing a
400 directory.</para></listitem>
403 <!-- Options for net ads dns register (and ads join) -->
405 <term>--dns-ttl TTL-IN-SECONDS</term>
407 Specify the Time to Live (TTL) of DNS records.
408 DNS records will be created or updated with the given TTL.
409 The TTL is specified in seconds. Can be used with "net ads dns
410 register" and "net ads join".
411 The default is 3600 seconds.
415 <!-- Options for net witness subcommands -->
418 <term>--witness-registration=REGISTRATION_UUID</term>
420 This does a direct lookup for REGISTRATION_UUID
421 instead of doing a database traversal.
426 <term>--witness-net-name=REGEX</term>
428 This specifies the 'server name' the client
429 registered for monitoring.
434 <term>--witness-share-name=REGEX</term>
436 This specifies the 'share name' the client
437 registered for monitoring.
438 Note that the share name is optional in the
439 registration, otherwise an empty string is
445 <term>--witness-ip-address=REGEX</term>
447 This specifies the ip address the client
448 registered for monitoring.
453 <term>--witness-client-computer-name=REGEX</term>
455 This specifies the client computer name the client
456 specified in the registration.
457 Note it is just a string chosen by the client itself.
462 <term>--witness-apply-to-all</term>
464 This selects all registrations.
469 <term>--witness-new-node=NODEID</term>
471 By specifying a NODEID all ip addresses
472 currently available on the given node are
473 included in the response.
474 By specifying '-1' as NODEID all ip addresses
475 of the cluster are included in the response.
480 <term>--witness-new-ip=IPADDRESS</term>
482 By specifying an IPADDRESS only the specified
483 ip address is included in the response.
488 <term>--witness-forced-response=JSON</term>
490 This allows the generation of very complex
491 witness_notifyResponse structures.
495 &cmdline.common.samba.client;
496 &cmdline.common.connection;
497 &cmdline.common.credentials;
502 <title>COMMANDS</title>
505 <title>CHANGESECRETPW</title>
507 <para>This command allows the Samba machine account password to be set from an external application
508 to a machine account password that has already been stored in Active Directory. DO NOT USE this command
509 unless you know exactly what you are doing. The use of this command requires that the force flag (-f)
510 be used also. There will be NO command prompt. Whatever information is piped into stdin, either by
511 typing at the command line or otherwise, will be stored as the literal machine password. Do NOT use
512 this without care and attention as it will overwrite a legitimate machine password without warning.
513 YOU HAVE BEEN WARNED.
521 <para>The <command>NET TIME</command> command allows you to view the time on a remote server
522 or synchronise the time on the local server with the time on the remote server.</para>
527 <para>Without any options, the <command>NET TIME</command> command
528 displays the time on the remote server. The remote server must be
529 specified with the -S option.
535 <title>TIME SYSTEM</title>
537 <para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.
538 The remote server must be specified with the -S option.
544 <title>TIME SET</title>
545 <para>Tries to set the date and time of the local server to that on
546 the remote server using <command>/bin/date</command>.
547 The remote server must be specified with the -S option.
553 <title>TIME ZONE</title>
555 <para>Displays the timezone in hours from GMT on the remote server.
556 The remote server must be specified with the -S option.
563 <title>[RPC|ADS] JOIN [TYPE] [--no-dns-updates] [-U username[%password]]
564 [dnshostname=FQDN] [createupn=UPN] [createcomputer=OU] [machinepass=PASS]
565 [osName=string osVer=string] [options]</title>
568 Join a domain. If the account already exists on the server, and
569 [TYPE] is MEMBER, the machine will attempt to join automatically.
570 (Assuming that the machine has been created in server manager)
571 Otherwise, a password will be prompted for, and a new account may
575 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
580 [FQDN] (ADS only) set the dnsHostName attribute during the join.
581 The default format is netbiosname.dnsdomain.
585 [UPN] (ADS only) set the principalname attribute during the join. The default
586 format is host/netbiosname@REALM.
590 [OU] (ADS only) Precreate the computer account in a specific OU. The
591 OU string reads from top to bottom without RDNs, and is delimited by
592 a '/'. Please note that '\' is used for escape by both the shell
593 and ldap, so it may need to be doubled or quadrupled to pass through,
594 and it is not used as a delimiter.
597 [PASS] (ADS only) Set a specific password on the computer account
598 being created by the join.
601 [osName=string osVer=String] (ADS only) Set the operatingSystem and
602 operatingSystemVersion attribute during the join. Both parameters
603 must be specified for either to take effect.
608 <title>[RPC] OLDJOIN [options]</title>
610 <para>Join a domain. Use the OLDJOIN option to join the domain
611 using the old style of domain joining - you need to create a trust
612 account in server manager first.</para>
616 <title>[RPC|ADS] USER</title>
619 <title>[RPC|ADS] USER</title>
621 <para>List all users</para>
626 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
628 <para>Delete specified user</para>
633 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
635 <para>List the domain groups of the specified user.</para>
640 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
642 <para>Rename specified user.</para>
647 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
649 <para>Add specified user.</para>
654 <title>[RPC|ADS] GROUP</title>
657 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
658 <para>List user groups.</para>
662 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
664 <para>Delete specified group.</para>
669 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
671 <para>Create specified group.</para>
675 <title>[ADS] LOOKUP</title>
677 <para>Lookup the closest Domain Controller in our domain and retrieve server information about it.</para>
683 <title>[RAP|RPC] SHARE</title>
686 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
688 <para>Enumerates all exported resources (network shares) on target server.</para>
693 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
695 <para>Adds a share from a server (makes the export active). Maxusers
696 specifies the number of users that can be connected to the
697 share simultaneously.</para>
702 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
704 <para>Delete specified share.</para>
709 <title>[RPC|RAP] FILE</title>
712 <title>[RPC|RAP] FILE</title>
714 <para>List all open files on remote server.</para>
719 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
721 <para>Close file with specified <replaceable>fileid</replaceable> on
722 remote server.</para>
727 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
730 Print information on specified <replaceable>fileid</replaceable>.
731 Currently listed are: file-id, username, locks, path, permissions.
737 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
740 List files opened by specified <replaceable>user</replaceable>.
741 Please note that <command>net rap file user</command> does not work
742 against Samba servers.
750 <title>SESSION</title>
753 <title>RAP SESSION</title>
755 <para>Without any other options, SESSION enumerates all active SMB/CIFS
756 sessions on the target server.</para>
761 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
763 <para>Close the specified sessions.</para>
768 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
770 <para>Give a list with all the open files in specified session.</para>
777 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
779 <para>List all servers in specified domain or workgroup. Defaults
780 to local domain.</para>
785 <title>RAP DOMAIN</title>
787 <para>Lists all domains and workgroups visible on the
788 current network.</para>
793 <title>RAP PRINTQ</title>
796 <title>RAP PRINTQ INFO <replaceable>QUEUE_NAME</replaceable></title>
798 <para>Lists the specified print queue and print jobs on the server.
799 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all
800 queues are listed.</para>
805 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
807 <para>Delete job with specified id.</para>
814 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
817 Validate whether the specified user can log in to the
818 remote server. If the password is not specified on the commandline, it
827 <title>RAP GROUPMEMBER</title>
830 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
832 <para>List all members of the specified group.</para>
837 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
839 <para>Delete member from group.</para>
844 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
846 <para>Add member to group.</para>
853 <title>RAP ADMIN <replaceable>command</replaceable></title>
855 <para>Execute the specified <replaceable>command</replaceable> on
856 the remote server. Only works with OS/2 servers.
864 <title>RAP SERVICE</title>
867 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
869 <para>Start the specified service on the remote server. Not implemented yet.</para>
876 <title>RAP SERVICE STOP</title>
878 <para>Stop the specified service on the remote server.</para>
887 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
890 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
896 <title>LOOKUP</title>
899 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
902 Lookup the IP address of the given host with the specified type (netbios suffix).
903 The type defaults to 0x20 (workstation).
909 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
911 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
916 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
918 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
919 Defaults to local realm.</para>
924 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
926 <para>Give IP's of Domain Controllers for specified <replaceable>
927 DOMAIN</replaceable>. Defaults to local domain.</para>
932 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
934 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
935 or workgroup. Defaults to local domain.</para>
940 <title>LOOKUP NAME [<replaceable>NAME</replaceable>]</title>
942 <para>Lookup username's sid and type for specified <replaceable>NAME</replaceable>
948 <title>LOOKUP SID [<replaceable>SID</replaceable>]</title>
950 <para>Give sid's name and type for specified <replaceable>SID</replaceable>
956 <title>LOOKUP DSGETDCNAME [<replaceable>NAME</replaceable>] [<replaceable>FLAGS</replaceable>] [<replaceable>SITENAME</replaceable>]</title>
958 <para>Give Domain Controller information for specified domain <replaceable>NAME</replaceable>
968 <para>Samba uses a general caching interface called 'gencache'. It
969 can be controlled using 'NET CACHE'.</para>
971 <para>All the timeout parameters support the suffixes:
974 <member>s - Seconds</member>
975 <member>m - Minutes</member>
976 <member>h - Hours</member>
977 <member>d - Days</member>
978 <member>w - Weeks</member>
984 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
986 <para>Add specified key+data to the cache with the given timeout.</para>
991 <title>CACHE DEL <replaceable>key</replaceable></title>
993 <para>Delete key from the cache.</para>
998 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
1000 <para>Update data of existing cache entry.</para>
1005 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
1007 <para>Search for the specified pattern in the cache data.</para>
1012 <title>CACHE LIST</title>
1015 List all current items in the cache.
1021 <title>CACHE FLUSH</title>
1023 <para>Remove all the current items from the cache.</para>
1030 <title>GETLOCALSID [DOMAIN]</title>
1032 <para>Prints the SID of the specified domain, or if the parameter is
1033 omitted, the SID of the local server.</para>
1038 <title>SETLOCALSID S-1-5-21-x-y-z</title>
1040 <para>Sets SID for the local server to the specified SID.</para>
1045 <title>GETDOMAINSID</title>
1047 <para>Prints the local machine SID and the SID of the current
1053 <title>SETDOMAINSID</title>
1055 <para>Sets the SID of the current domain.</para>
1060 <title>GROUPMAP</title>
1062 <para>Manage the mappings between Windows group SIDs and UNIX groups.
1063 Common options include:</para>
1066 <listitem><para>unixgroup - Name of the UNIX group</para></listitem>
1067 <listitem><para>ntgroup - Name of the Windows NT group (must be
1068 resolvable to a SID</para></listitem>
1069 <listitem><para>rid - Unsigned 32-bit integer</para></listitem>
1070 <listitem><para>sid - Full SID in the form of "S-1-..."</para></listitem>
1071 <listitem><para>type - Type of the group; either 'domain', 'local',
1072 or 'builtin'</para></listitem>
1073 <listitem><para>comment - Freeform text description of the group</para></listitem>
1077 <title>GROUPMAP ADD</title>
1080 Add a new group mapping entry:
1082 net groupmap add {rid=int|sid=string} unixgroup=string \
1083 [type={domain|local}] [ntgroup=string] [comment=string]
1090 <title>GROUPMAP DELETE</title>
1092 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
1094 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
1099 <title>GROUPMAP MODIFY</title>
1101 <para>Update an existing group entry.</para>
1105 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \
1106 [comment=string] [type={domain|local}]
1112 <title>GROUPMAP LIST</title>
1114 <para>List existing group mapping entries.</para>
1116 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
1124 <title>MAXRID</title>
1126 <para>Prints out the highest RID currently in use on the local
1127 server (by the active 'passdb backend').
1133 <title>RPC INFO</title>
1135 <para>Print information about the domain of the remote server,
1136 such as domain name, domain sid and number of users and groups.
1142 <title>[RPC|ADS] TESTJOIN</title>
1144 <para>Check whether participation in a domain is still valid.</para>
1149 <title>[RPC|ADS] CHANGETRUSTPW</title>
1151 <para>Force change of domain trust password.</para>
1156 <title>RPC TRUSTDOM</title>
1159 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
1161 <para>Add a interdomain trust account for <replaceable>DOMAIN</replaceable>.
1162 This is in fact a Samba account named <replaceable>DOMAIN$</replaceable>
1163 with the account flag <constant>'I'</constant> (interdomain trust account).
1164 This is required for incoming trusts to work. It makes Samba be a
1165 trusted domain of the foreign (trusting) domain.
1166 Users of the Samba domain will be made available in the foreign domain.
1167 If the command is used against localhost it has the same effect as
1168 <command>smbpasswd -a -i DOMAIN</command>. Please note that both commands
1169 expect a appropriate UNIX account.
1175 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
1177 <para>Remove interdomain trust account for
1178 <replaceable>DOMAIN</replaceable>. If it is used against localhost
1179 it has the same effect as <command>smbpasswd -x DOMAIN$</command>.
1185 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
1188 Establish a trust relationship to a trusted domain.
1189 Interdomain account must already be created on the remote PDC.
1190 This is required for outgoing trusts to work. It makes Samba be a
1191 trusting domain of a foreign (trusted) domain.
1192 Users of the foreign domain will be made available in our domain.
1193 You'll need winbind and a working idmap config to make them
1194 appear in your system.
1200 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
1201 <para>Abandon relationship to trusted domain</para>
1206 <title>RPC TRUSTDOM LIST</title>
1208 <para>List all interdomain trust relationships.</para>
1214 <title>RPC TRUST</title>
1217 <title>RPC TRUST CREATE</title>
1219 <para>Create a trust object by calling lsaCreateTrustedDomainEx2.
1220 The can be done on a single server or on two servers at once with the
1221 possibility to use a random trust password.</para>
1223 <variablelist><title>Options:</title>
1225 <term>otherserver</term>
1226 <listitem><para>Domain controller of the second domain</para></listitem>
1230 <term>otheruser</term>
1231 <listitem><para>Admin user in the second domain</para></listitem>
1235 <term>otherdomainsid</term>
1236 <listitem><para>SID of the second domain</para></listitem>
1240 <term>other_netbios_domain</term>
1241 <listitem><para>NetBIOS (short) name of the second domain</para></listitem>
1245 <term>otherdomain</term>
1246 <listitem><para>DNS (full) name of the second domain</para></listitem>
1250 <term>trustpw</term>
1251 <listitem><para>Trust password</para></listitem>
1255 <variablelist><title>Examples:</title>
1257 <term>Create a trust object on srv1.dom1.dom for the domain dom2</term>
1258 <listitem><literallayout>
1259 net rpc trust create \
1260 otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
1261 other_netbios_domain=dom2 \
1262 otherdomain=dom2.dom \
1265 </literallayout></listitem>
1268 <term>Create a trust relationship between dom1 and dom2</term>
1269 <listitem><literallayout>
1270 net rpc trust create \
1271 otherserver=srv2.dom2.test \
1274 </literallayout></listitem>
1280 <title>RPC TRUST DELETE</title>
1282 <para>Delete a trust object by calling lsaDeleteTrustedDomain.
1283 The can be done on a single server or on two servers at once.</para>
1285 <variablelist><title>Options:</title>
1287 <term>otherserver</term>
1288 <listitem><para>Domain controller of the second domain</para></listitem>
1292 <term>otheruser</term>
1293 <listitem><para>Admin user in the second domain</para></listitem>
1297 <term>otherdomainsid</term>
1298 <listitem><para>SID of the second domain</para></listitem>
1302 <variablelist><title>Examples:</title>
1304 <term>Delete a trust object on srv1.dom1.dom for the domain dom2</term>
1305 <listitem><literallayout>
1306 net rpc trust delete \
1307 otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
1309 </literallayout></listitem>
1312 <term>Delete a trust relationship between dom1 and dom2</term>
1313 <listitem><literallayout>
1314 net rpc trust delete \
1315 otherserver=srv2.dom2.test \
1318 </literallayout></listitem>
1327 <title>RPC RIGHTS</title>
1329 <para>This subcommand is used to view and manage Samba's rights assignments (also
1330 referred to as privileges). There are three options currently available:
1331 <parameter>list</parameter>, <parameter>grant</parameter>, and
1332 <parameter>revoke</parameter>. More details on Samba's privilege model and its use
1333 can be found in the Samba-HOWTO-Collection.</para>
1341 <title>RPC ABORTSHUTDOWN</title>
1343 <para>Abort the shutdown of a remote server.</para>
1348 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
1350 <para>Shut down the remote server.</para>
1356 Reboot after shutdown.
1363 Force shutting down all applications.
1368 <term>-t timeout</term>
1370 Timeout before system will be shut down. An interactive
1371 user of the system can use this time to cancel the shutdown.
1376 <term>-C message</term>
1377 <listitem><para>Display the specified message on the screen to
1378 announce the shutdown.</para></listitem>
1385 <title>RPC SAMDUMP</title>
1387 <para>Print out sam database of remote server. You need
1388 to run this against the PDC, from a Samba machine joined as a BDC. </para>
1392 <title>RPC VAMPIRE</title>
1394 <para>Export users, aliases and groups from remote server to
1395 local server. You need to run this against the PDC, from a Samba machine joined as a BDC.
1396 This vampire command cannot be used against an Active Directory, only
1397 against an NT4 Domain Controller.
1402 <title>RPC VAMPIRE KEYTAB</title>
1404 <para>Dump remote SAM database to local Kerberos keytab file.
1409 <title>RPC VAMPIRE LDIF</title>
1411 <para>Dump remote SAM database to local LDIF file or standard output.
1416 <title>RPC GETSID</title>
1418 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename>. </para>
1424 <title>ADS GPO</title>
1426 <title>ADS GPO APPLY <USERNAME|MACHINENAME> </title>
1427 <para>Apply GPOs for a username or machine name. Either username or machine name should be provided to the command, not both. </para>
1431 <title>ADS GPO GETGPO [<replaceable>GPO</replaceable>]</title>
1432 <para>List specified GPO.</para>
1436 <title>ADS GPO LINKADD [<replaceable>LINKDN</replaceable>] [<replaceable>GPODN</replaceable>]</title>
1437 <para>Link a container to a GPO. <replaceable>LINKDN</replaceable> Container to link to a GPO. <replaceable>GPODN</replaceable> GPO to link container to. DNs must be provided properly escaped. See RFC 4514 for details.</para>
1441 <title>ADS GPO LINKGET [<replaceable>CONTAINER</replaceable>]</title>
1442 <para>Lists gPLink of a container.</para>
1446 <title>ADS GPO LIST <USERNAME|MACHINENAME> </title>
1447 <para>Lists all GPOs for a username or machine name. Either username or machine name should be provided to the command, not both. </para>
1451 <title>ADS GPO LISTALL</title>
1452 <para>Lists all GPOs on a DC.</para>
1456 <title>ADS GPO REFRESH [<replaceable>USERNAME</replaceable>] [<replaceable>MACHINENAME</replaceable>]</title>
1457 <para>Lists all GPOs assigned to an account and download them. <replaceable>USERNAME</replaceable> User to refresh GPOs for. <replaceable>MACHINENAME</replaceable> Machine to refresh GPOs for.</para>
1464 <title>ADS DNS</title>
1467 <title>ADS DNS REGISTER [FQDN [IP [IP.....]]]</title>
1468 <para>Add dns record to Active Directory. If FQDN is missing, <smbconfoption name="dns hostname"/> is used. If IP is missing, IPs from all network interfaces are added.</para>
1472 <title>ADS DNS UNREGISTER <FQDN></title>
1473 <para>Remove FQDN dns entry from Active Directory.</para>
1479 <title>ADS LEAVE [--keep-account]</title>
1481 <para>Make the remote host leave the domain it is part of. </para>
1486 <title>ADS STATUS</title>
1488 <para>Print out status of machine account of the local machine in ADS.
1489 Prints out quite some debug info. Aimed at developers, regular
1490 users should use <command>NET ADS TESTJOIN</command>.</para>
1495 <title>ADS PRINTER</title>
1498 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
1501 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the
1502 server name defaults to the local host.</para>
1507 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
1509 <para>Publish specified printer using ADS.</para>
1514 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
1516 <para>Remove specified printer from ADS directory.</para>
1523 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
1525 <para>Perform a raw LDAP search on a ADS server and dump the results. The
1526 expression is a standard LDAP search expression, and the
1527 attributes are a list of LDAP fields to show in the results.</para>
1529 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
1535 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
1538 Perform a raw LDAP search on a ADS server and dump the results. The
1539 DN standard LDAP DN, and the attributes are a list of LDAP fields
1540 to show in the result.
1543 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
1548 <title>ADS KEYTAB <replaceable>CREATE</replaceable></title>
1551 Since Samba 4.21.0, keytab file is created as specified in <smbconfoption
1552 name="sync machine password to keytab"/>. The keytab is created only for
1553 <smbconfoption name="kerberos method">secrets only</smbconfoption> and
1554 <smbconfoption name="kerberos method">secrets and keytab</smbconfoption>. With
1555 the smb.conf default values for <smbconfoption name="kerberos method"> secrets
1556 only</smbconfoption> and <smbconfoption name="sync machine password to keytab"/>
1557 (default is empty) the keytab is not generated at all. Keytab with a default
1558 name and SPNs synced from AD is created for <smbconfoption name="kerberos
1559 method">secrets and keytab</smbconfoption> if <smbconfoption name="sync machine
1560 password to keytab"/> is missing.
1563 Till Samba 4.20.0, two more entries were created by default: the machinename of
1564 the client (ending with '$') and the UPN (host/domain@REALM). If these two
1565 entries are still needed, each must be specified in an own keytab file.
1566 Example below will generate three keytab files that contain SPNs synced from
1567 AD, host UPN and machine$ SPN:
1570 <smbconfoption name="sync machine password to keytab">
1571 /etc/krb5.keytab0:sync_spns:machine_password,
1572 /etc/krb5.keytab1:spns=host/smb.com@SMB.COM:machine_password,
1573 /etc/krb5.keytab2:account_name:machine_password
1577 No changes are made to the computer AD account.
1582 <title>(Removed!) ADS KEYTAB <replaceable>ADD</replaceable> <replaceable>(principal | machine | serviceclass | windows SPN</replaceable></title>
1585 This command is no longer available in Samba 4.21.0 and newer. See <smbconfoption name="sync machine password to keytab"/> for replacement.
1588 To replace e.g. call of
1590 net ads keytab add wurst/brot@REALM
1594 sync machine password to keytab = /path/to/keytab1:spns=wurst/brot@REALM:machine_password
1598 net ads keytab create
1602 Original description of this command:
1605 Adds a new keytab entry, the entry can be either;
1607 <varlistentry><term>kerberos principal</term>
1609 A kerberos principal (identified by the presence of '@') is just
1610 added to the keytab file.
1613 <varlistentry><term>machinename</term>
1615 A machinename (identified by the trailing '$') is used to create a
1616 a kerberos principal 'machinename@realm' which is added to the
1620 <varlistentry><term>serviceclass</term>
1622 A serviceclass (such as 'cifs', 'html' etc.) is used to create a pair
1623 of kerberos principals 'serviceclass/fully_qualified_dns_name@realm' &
1624 'serviceclass/netbios_name@realm' which are added to the keytab file.
1627 <varlistentry><term>Windows SPN</term>
1629 A Windows SPN is of the format 'serviceclass/host:port', it is used to
1630 create a kerberos principal 'serviceclass/host@realm' which will
1631 be written to the keytab file.
1637 Unlike old versions no computer AD objects are modified by this command. To
1638 preserve the behaviour of older clients 'net ads keytab ad_update_ads' is
1644 <title>(Removed!) ADS KEYTAB <replaceable>DELETE</replaceable> <replaceable>(principal | machine | serviceclass | windows SPN</replaceable></title>
1647 This command is no longer available in Samba 4.21.0 and newer. See <smbconfoption name="sync machine password to keytab"/> for replacement.
1651 To replace e.g. call of
1653 net ads keytab delete wurst/brot@REALM
1655 Delete from <smbconfoption name="sync machine password to keytab"/> principal "wurst/brot@REALM" and run:
1657 net ads keytab create
1664 <title>(Removed!) ADS KEYTAB <replaceable>ADD_UPDATE_ADS</replaceable> <replaceable>(principal | machine | serviceclass | windows SPN</replaceable></title>
1666 This command is no longer available in Samba 4.21.0 and newer. See <smbconfoption name="sync machine password to keytab"/> for replacement.
1669 To replace e.g. call of
1671 net ads keytab add_update_ads wurst/brot@REALM
1675 sync machine password to keytab = /path/to/keytab2:sync_spns:machine_password
1679 net ads setspn add wurst/brot@REALM
1680 net ads keytab create
1684 Original description of this command:
1688 Adds a new keytab entry (see section for net ads keytab add). In addition to
1689 adding entries to the keytab file corresponding Windows SPNs are created
1690 from the entry passed to this command. These SPN(s) added to the AD computer
1691 account object associated with the client machine running this command for
1692 the following entry types;
1694 <varlistentry><term>serviceclass</term>
1696 A serviceclass (such as 'cifs', 'html' etc.) is used to create a
1697 pair of Windows SPN(s) 'param/full_qualified_dns' &
1698 'param/netbios_name' which are added to the AD computer account object
1702 <varlistentry><term>Windows SPN</term>
1704 A Windows SPN is of the format 'serviceclass/host:port', it is
1705 added as passed to the AD computer account object for this client.
1713 <title>ADS setspn <replaceable>SETSPN LIST [machine]</replaceable></title>
1716 Lists the Windows SPNs stored in the 'machine' Windows AD Computer object.
1717 If 'machine' is not specified then computer account for this client is used
1723 <title>ADS setspn <replaceable>SETSPN ADD SPN [machine]</replaceable></title>
1726 Adds the specified Windows SPN to the 'machine' Windows AD Computer object.
1727 If 'machine' is not specified then computer account for this client is used
1734 <title>ADS setspn <replaceable>SETSPN DELETE SPN [machine]</replaceable></title>
1737 DELETE the specified Window SPN from the 'machine' Windows AD Computer
1738 object. If 'machine' is not specified then computer account for this
1746 <title>ADS WORKGROUP</title>
1748 <para>Print out workgroup name for specified kerberos realm.</para>
1753 <title>ADS ENCTYPES</title>
1756 List, modify or delete the value of the "msDS-SupportedEncryptionTypes" attribute of an account in AD.
1760 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:
1763 <para>0x00000001 DES-CBC-CRC</para>
1764 <para>0x00000002 DES-CBC-MD5</para>
1765 <para>0x00000004 RC4-HMAC</para>
1766 <para>0x00000008 AES128-CTS-HMAC-SHA1-96</para>
1767 <para>0x00000010 AES256-CTS-HMAC-SHA1-96</para>
1772 <title>ADS ENCTYPES LIST <replaceable><ACCOUNTNAME></replaceable></title>
1775 List the value of the "msDS-SupportedEncryptionTypes" attribute of a given account.
1778 <para>Example: <userinput>net ads enctypes list Computername</userinput></para>
1783 <title>ADS ENCTYPES SET <replaceable><ACCOUNTNAME></replaceable> <replaceable>[enctypes]</replaceable></title>
1786 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 31 which enables all the currently supported encryption types.
1789 <para>Example: <userinput>net ads enctypes set Computername 24</userinput></para>
1794 <title>ADS ENCTYPES DELETE <replaceable><ACCOUNTNAME></replaceable></title>
1797 Deletes the "msDS-SupportedEncryptionTypes" attribute of the LDAP object of ACCOUNTNAME.
1800 <para>Example: <userinput>net ads enctypes set Computername 24</userinput></para>
1806 <title>SAM CREATEBUILTINGROUP <NAME></title>
1809 (Re)Create a BUILTIN group.
1810 Only a wellknown set of BUILTIN groups can be created with this command.
1811 This is the list of currently recognized group names: Administrators,
1812 Users, Guests, Power Users, Account Operators, Server Operators, Print
1813 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
1816 This command requires a running Winbindd with idmap allocation properly
1817 configured. The group gid will be allocated out of the winbindd range.
1823 <title>SAM CREATELOCALGROUP <NAME></title>
1826 Create a LOCAL group (also known as Alias).
1828 This command requires a running Winbindd with idmap allocation properly
1829 configured. The group gid will be allocated out of the winbindd range.
1835 <title>SAM DELETELOCALGROUP <NAME></title>
1838 Delete an existing LOCAL group (also known as Alias).
1845 <title>SAM MAPUNIXGROUP <NAME></title>
1848 Map an existing Unix group and make it a Domain Group, the domain group
1849 will have the same name.
1855 <title>SAM UNMAPUNIXGROUP <NAME></title>
1858 Remove an existing group mapping entry.
1864 <title>SAM ADDMEM <GROUP> <MEMBER></title>
1867 Add a member to a Local group. The group can be specified only by name,
1868 the member can be specified by name or SID.
1874 <title>SAM DELMEM <GROUP> <MEMBER></title>
1877 Remove a member from a Local group. The group and the member must be
1884 <title>SAM LISTMEM <GROUP></title>
1887 List Local group members. The group must be specified by name.
1893 <title>SAM LIST <users|groups|localgroups|builtin|workstations> [verbose]</title>
1896 List the specified set of accounts by name. If verbose is specified,
1897 the rid and description is also provided for each account.
1903 <title>SAM RIGHTS LIST</title>
1906 List all available privileges.
1912 <title>SAM RIGHTS GRANT <NAME> <PRIVILEGE></title>
1915 Grant one or more privileges to a user.
1921 <title>SAM RIGHTS REVOKE <NAME> <PRIVILEGE></title>
1924 Revoke one or more privileges from a user.
1930 <title>SAM SHOW <NAME></title>
1933 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1940 <title>SAM SET HOMEDIR <NAME> <DIRECTORY></title>
1943 Set the home directory for a user account.
1949 <title>SAM SET PROFILEPATH <NAME> <PATH></title>
1952 Set the profile path for a user account.
1958 <title>SAM SET COMMENT <NAME> <COMMENT></title>
1961 Set the comment for a user or group account.
1967 <title>SAM SET FULLNAME <NAME> <FULL NAME></title>
1970 Set the full name for a user account.
1976 <title>SAM SET LOGONSCRIPT <NAME> <SCRIPT></title>
1979 Set the logon script for a user account.
1985 <title>SAM SET HOMEDRIVE <NAME> <DRIVE></title>
1988 Set the home drive for a user account.
1994 <title>SAM SET WORKSTATIONS <NAME> <WORKSTATIONS></title>
1997 Set the workstations a user account is allowed to log in from.
2003 <title>SAM SET DISABLE <NAME></title>
2006 Set the "disabled" flag for a user account.
2012 <title>SAM SET PWNOTREQ <NAME></title>
2015 Set the "password not required" flag for a user account.
2021 <title>SAM SET AUTOLOCK <NAME></title>
2024 Set the "autolock" flag for a user account.
2030 <title>SAM SET PWNOEXP <NAME></title>
2033 Set the "password do not expire" flag for a user account.
2039 <title>SAM SET PWDMUSTCHANGENOW <NAME> [yes|no]</title>
2042 Set or unset the "password must change" flag for a user account.
2048 <title>SAM POLICY LIST</title>
2051 List the available account policies.
2057 <title>SAM POLICY SHOW <account policy></title>
2060 Show the account policy value.
2066 <title>SAM POLICY SET <account policy> <value></title>
2069 Set a value for the account policy.
2070 Valid values can be: "forever", "never", "off", or a number.
2076 <title>SAM PROVISION</title>
2079 Only available if ldapsam:editposix is set and winbindd is running.
2080 Properly populates the ldap tree with the basic accounts (Administrator)
2081 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
2087 <title>IDMAP DUMP <local tdb file name></title>
2090 Dumps the mappings contained in the local tdb file specified.
2091 This command is useful to dump only the mappings produced by the idmap_tdb backend.
2097 <title>IDMAP RESTORE [input file]</title>
2100 Restore the mappings from the specified file or stdin.
2106 <title>IDMAP SET SECRET <DOMAIN> <secret></title>
2109 Store a secret for the specified domain, used primarily for domains
2110 that use idmap_ldap as a backend. In this case the secret is used
2111 as the password for the user DN used to bind to the ldap server.
2117 <title>IDMAP SET RANGE <RANGE> <SID> [index] [--db=<DB>]</title>
2120 Store a domain-range mapping for a given domain (and index) in autorid database.
2126 <title>IDMAP SET CONFIG <config> [--db=<DB>]</title>
2129 Update CONFIG entry in autorid database.
2135 <title>IDMAP GET RANGE <SID> [index] [--db=<DB>]</title>
2138 Get the range for a given domain and index from autorid database.
2144 <title>IDMAP GET RANGES [<SID>] [--db=<DB>]</title>
2147 Get ranges for all domains or for one identified by given SID.
2153 <title>IDMAP GET CONFIG [--db=<DB>]</title>
2156 Get CONFIG entry from autorid database.
2163 <title>IDMAP DELETE MAPPING [-f] [--db=<DB>] <ID></title>
2166 Delete a mapping sid <-> gid or sid <-> uid from the IDMAP database.
2167 The mapping is given by <ID> which may either be a sid: S-x-..., a gid: "GID number" or a uid: "UID number".
2168 Use -f to delete an invalid partial mapping <ID> -> xx
2171 Use "smbcontrol all idmap ..." to notify running smbd instances.
2172 See the <citerefentry><refentrytitle>smbcontrol</refentrytitle>
2173 <manvolnum>1</manvolnum></citerefentry> manpage for details.
2178 <title>IDMAP DELETE RANGE [-f] [--db=<TDB>] <RANGE>|(<SID> [<INDEX>])</title>
2181 Delete a domain range mapping identified by 'RANGE' or "domain SID and INDEX" from autorid database.
2182 Use -f to delete invalid mappings.
2188 <title>IDMAP DELETE RANGES [-f] [--db=<TDB>] <SID></title>
2191 Delete all domain range mappings for a domain identified by SID.
2192 Use -f to delete invalid mappings.
2199 <title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=<DB>]</title>
2202 Check and repair the IDMAP database. If no option is given a read only check
2203 of the database is done. Among others an interactive or automatic repair mode
2204 may be chosen with one of the following options:
2207 <varlistentry><term>-r|--repair</term>
2209 Interactive repair mode, ask a lot of questions.
2213 <varlistentry><term>-a|--auto</term>
2215 Noninteractive repair mode, use default answers.
2219 <varlistentry><term>-v|--verbose</term>
2221 Produce more output.
2225 <varlistentry><term>-f|--force</term>
2227 Try to apply changes, even if they do not apply cleanly.
2231 <varlistentry><term>-T|--test</term>
2233 Dry run, show what changes would be made but don't touch anything.
2237 <varlistentry><term>-l|--lock</term>
2239 Lock the database while doing the check.
2243 <varlistentry><term>--db <DB></term>
2245 Check the specified database.
2248 <varlistentry><term></term>
2254 It reports about the finding of the following errors:
2257 <varlistentry><term>Missing reverse mapping:</term>
2259 A record with mapping A->B where there is no B->A. Default action
2260 in repair mode is to "fix" this by adding the reverse mapping.
2264 <varlistentry><term>Invalid mapping:</term>
2266 A record with mapping A->B where B->C. Default action
2267 is to "delete" this record.
2271 <varlistentry><term>Missing or invalid HWM:</term>
2273 A high water mark is not at least equal to the largest ID in the
2274 database. Default action is to "fix" this by setting it to the
2275 largest ID found +1.
2279 <varlistentry><term>Invalid record:</term>
2281 Something we failed to parse. Default action is to "edit" it
2282 in interactive and "delete" it in automatic mode.
2291 <title>USERSHARE</title>
2293 <para>Starting with version 3.0.23, a Samba server now supports the ability for
2294 non-root users to add user defined shares to be exported using the "net usershare"
2299 To set this up, first set up your &smb.conf; by adding to the [global] section:
2301 usershare path = /usr/local/samba/lib/usershares
2303 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
2304 set the group owner to the UNIX group who should have the ability to create usershares,
2305 for example a group called "serverops".
2307 Set the permissions on /usr/local/samba/lib/usershares to 01770.
2309 (Owner and group all access, no access for others, plus the sticky bit,
2310 which means that a file in that directory can be renamed or deleted only
2311 by the owner of the file).
2313 Finally, tell smbd how many usershares you will allow by adding to the [global]
2314 section of &smb.conf; a line such as :
2316 usershare max shares = 100.
2318 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
2319 can create user defined shares on demand using the commands below.
2322 <para>The usershare commands are:
2325 <member>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</member>
2326 <member>net usershare delete sharename - to delete a user defined share.</member>
2327 <member>net usershare info [--long] [wildcard sharename] - to print info about a user defined share.</member>
2328 <member>net usershare list [--long] [wildcard sharename] - to list user defined shares.</member>
2334 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
2337 Add or replace a new user defined share, with name "sharename".
2341 "path" specifies the absolute pathname on the system to be exported.
2342 Restrictions may be put on this, see the global &smb.conf; parameters:
2343 "usershare owner only", "usershare prefix allow list", and
2344 "usershare prefix deny list".
2348 The optional "comment" parameter is the comment that will appear
2349 on the share when browsed to by a client.
2352 <para>The optional "acl" field
2353 specifies which users have read and write access to the entire share.
2354 Note that guest connections are not allowed unless the &smb.conf; parameter
2355 "usershare allow guests" has been set. The definition of a user
2356 defined share acl is: "user:permission", where user is a valid
2357 username on the system and permission can be "F", "R", or "D".
2358 "F" stands for "full permissions", ie. read and write permissions.
2359 "D" stands for "deny" for a user, ie. prevent this user from accessing
2361 "R" stands for "read only", ie. only allow read access to this
2362 share (no creation of new files or directories or writing to files).
2366 The default if no "acl" is given is "Everyone:R", which means any
2367 authenticated user has read-only access.
2371 The optional "guest_ok" has the same effect as the parameter of the
2372 same name in &smb.conf;, in that it allows guest access to this user
2373 defined share. This parameter is only allowed if the global parameter
2374 "usershare allow guests" has been set to true in the &smb.conf;.
2378 There is no separate command to modify an existing user defined share,
2379 just use the "net usershare add [sharename]" command using the same
2380 sharename as the one you wish to modify and specify the new options
2381 you wish. The Samba smbd daemon notices user defined share modifications
2382 at connect time so will see the change immediately, there is no need
2383 to restart smbd on adding, deleting or changing a user defined share.
2388 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
2391 Deletes the user defined share by name. The Samba smbd daemon
2392 immediately notices this change, although it will not disconnect
2393 any users currently connected to the deleted share.
2399 <title>USERSHARE INFO <replaceable>[--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
2402 Get info on user defined shares owned by the current user matching the given pattern, or all users.
2406 net usershare info on its own dumps out info on the user defined shares that were
2407 created by the current user, or restricts them to share names that match the given
2408 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
2409 If the '--long' option is also given, it prints out info on user defined
2410 shares created by other users.
2414 The information given about a share looks like:
2419 usershare_acl=Everyone:F
2422 And is a list of the current settings of the user defined share that can be
2423 modified by the "net usershare add" command.
2429 <title>USERSHARE LIST <replaceable>[--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
2432 List all the user defined shares owned by the current user matching the given pattern, or all users.
2436 net usershare list on its own list out the names of the user defined shares that were
2437 created by the current user, or restricts the list to share names that match the given
2438 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
2439 If the '--long' option is also given, it includes the names of user defined
2440 shares created by other users.
2448 <title>[RPC] CONF</title>
2450 <para>Starting with version 3.2.0, a Samba server can be configured by data
2451 stored in registry. This configuration data can be edited with the new "net
2452 conf" commands. There is also the possibility to configure a remote Samba server
2453 by enabling the RPC conf mode and specifying the address of the remote server.
2457 The deployment of this configuration data can be activated in two levels from the
2458 <emphasis>&smb.conf;</emphasis> file: Share definitions from registry are
2459 activated by setting <parameter>registry shares</parameter> to
2460 <quote>yes</quote> in the [global] section and global configuration options are
2461 activated by setting <smbconfoption name="include">registry</smbconfoption> in
2462 the [global] section for a mixed configuration or by setting
2463 <smbconfoption name="config backend">registry</smbconfoption> in the [global]
2464 section for a registry-only configuration.
2465 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
2466 <manvolnum>5</manvolnum></citerefentry> manpage for details.
2469 <para>The conf commands are:
2471 <member>net [rpc] conf list - Dump the complete configuration in smb.conf like
2473 <member>net [rpc] conf import - Import configuration from file in smb.conf
2475 <member>net [rpc] conf listshares - List the registry shares.</member>
2476 <member>net [rpc] conf drop - Delete the complete configuration from
2478 <member>net [rpc] conf showshare - Show the definition of a registry share.</member>
2479 <member>net [rpc] conf addshare - Create a new registry share.</member>
2480 <member>net [rpc] conf delshare - Delete a registry share.</member>
2481 <member>net [rpc] conf setparm - Store a parameter.</member>
2482 <member>net [rpc] conf getparm - Retrieve the value of a parameter.</member>
2483 <member>net [rpc] conf delparm - Delete a parameter.</member>
2484 <member>net [rpc] conf getincludes - Show the includes of a share definition.</member>
2485 <member>net [rpc] conf setincludes - Set includes for a share.</member>
2486 <member>net [rpc] conf delincludes - Delete includes from a share definition.</member>
2491 <title>[RPC] CONF LIST</title>
2494 Print the configuration data stored in the registry in a smb.conf-like format to
2500 <title>[RPC] CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
2503 This command imports configuration from a file in smb.conf format.
2504 If a section encountered in the input file is present in registry,
2505 its contents is replaced. Sections of registry configuration that have
2506 no counterpart in the input file are not affected. If you want to delete these,
2507 you will have to use the "net conf drop" or "net conf delshare" commands.
2508 Optionally, a section may be specified to restrict the effect of the
2509 import command to that specific section. A test mode is enabled by specifying
2510 the parameter "-T" on the commandline. In test mode, no changes are made to the
2511 registry, and the resulting configuration is printed to standard output instead.
2516 <title>[RPC] CONF LISTSHARES</title>
2519 List the names of the shares defined in registry.
2524 <title>[RPC] CONF DROP</title>
2527 Delete the complete configuration data from registry.
2532 <title>[RPC] CONF SHOWSHARE <replaceable>sharename</replaceable></title>
2535 Show the definition of the share or section specified. It is valid to specify
2536 "global" as sharename to retrieve the global configuration options from
2542 <title>[RPC] CONF ADDSHARE <replaceable>sharename</replaceable> <replaceable>path</replaceable> [<replaceable>writeable={y|N}</replaceable> [<replaceable>guest_ok={y|N}</replaceable> [<replaceable>comment</replaceable>]]] </title>
2544 <para>Create a new share definition in registry.
2545 The sharename and path have to be given. The share name may
2546 <emphasis>not</emphasis> be "global". Optionally, values for the very
2547 common options "writeable", "guest ok" and a "comment" may be specified.
2548 The same result may be obtained by a sequence of "net conf setparm"
2554 <title>[RPC] CONF DELSHARE <replaceable>sharename</replaceable></title>
2557 Delete a share definition from registry.
2562 <title>[RPC] CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
2565 Store a parameter in registry. The section may be global or a sharename.
2566 The section is created if it does not exist yet.
2571 <title>[RPC] CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
2574 Show a parameter stored in registry.
2579 <title>[RPC] CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
2582 Delete a parameter stored in registry.
2587 <title>[RPC] CONF GETINCLUDES <replaceable>section</replaceable></title>
2590 Get the list of includes for the provided section (global or share).
2594 Note that due to the nature of the registry database and the nature of include directives,
2595 the includes need special treatment: Parameters are stored in registry by the parameter
2596 name as valuename, so there is only ever one instance of a parameter per share.
2597 Also, a specific order like in a text file is not guaranteed. For all real
2598 parameters, this is perfectly ok, but the include directive is rather a meta
2599 parameter, for which, in the smb.conf text file, the place where it is specified
2600 between the other parameters is very important. This can not be achieved by the
2601 simple registry smbconf data model, so there is one ordered list of includes
2602 per share, and this list is evaluated after all the parameters of the share.
2606 Further note that currently, only files can be included from registry
2607 configuration. In the future, there will be the ability to include configuration
2608 data from other registry keys.
2613 <title>[RPC] CONF SETINCLUDES <replaceable>section</replaceable> [<replaceable>filename</replaceable>]+</title>
2616 Set the list of includes for the provided section (global or share) to the given
2617 list of one or more filenames. The filenames may contain the usual smb.conf
2623 <title>[RPC] CONF DELINCLUDES <replaceable>section</replaceable></title>
2626 Delete the list of includes from the provided section (global or share).
2633 <title>REGISTRY</title>
2635 Manipulate Samba's registry.
2638 <para>The registry commands are:
2640 <member>net registry enumerate - Enumerate registry keys and values.</member>
2641 <member>net registry enumerate_recursive - Enumerate registry key and its subkeys.</member>
2642 <member>net registry createkey - Create a new registry key.</member>
2643 <member>net registry deletekey - Delete a registry key.</member>
2644 <member>net registry deletekey_recursive - Delete a registry key with subkeys.</member>
2645 <member>net registry getvalue - Print a registry value.</member>
2646 <member>net registry getvalueraw - Print a registry value (raw format).</member>
2647 <member>net registry setvalue - Set a new registry value.</member>
2648 <member>net registry increment - Increment a DWORD registry value under a lock.
2650 <member>net registry deletevalue - Delete a registry value.</member>
2651 <member>net registry getsd - Get security descriptor.</member>
2652 <member>net registry getsd_sdd1 - Get security descriptor in sddl format.
2654 <member>net registry setsd_sdd1 - Set security descriptor from sddl format
2656 <member>net registry import - Import a registration entries (.reg) file.
2658 <member>net registry export - Export a registration entries (.reg) file.
2660 <member>net registry convert - Convert a registration entries (.reg) file.
2662 <member>net registry check - Check and repair a registry database.
2668 <title>REGISTRY ENUMERATE <replaceable>key</replaceable> </title>
2669 <para>Enumerate subkeys and values of <emphasis>key</emphasis>.
2674 <title>REGISTRY ENUMERATE_RECURSIVE <replaceable>key</replaceable> </title>
2675 <para>Enumerate values of <emphasis>key</emphasis> and its subkeys.
2680 <title>REGISTRY CREATEKEY <replaceable>key</replaceable> </title>
2681 <para>Create a new <emphasis>key</emphasis> if not yet existing.
2686 <title>REGISTRY DELETEKEY <replaceable>key</replaceable> </title>
2687 <para>Delete the given <emphasis>key</emphasis> and its
2688 values from the registry, if it has no subkeys.
2693 <title>REGISTRY DELETEKEY_RECURSIVE <replaceable>key</replaceable> </title>
2694 <para>Delete the given <emphasis>key</emphasis> and all of its
2695 subkeys and values from the registry.
2700 <title>REGISTRY GETVALUE <replaceable>key</replaceable> <!--
2701 --><replaceable>name</replaceable></title>
2703 <para>Output type and actual value of the value <emphasis>name</emphasis>
2704 of the given <emphasis>key</emphasis>.
2709 <title>REGISTRY GETVALUERAW <replaceable>key</replaceable> <!--
2710 --><replaceable>name</replaceable></title>
2711 <para>Output the actual value of the value <emphasis>name</emphasis>
2712 of the given <emphasis>key</emphasis>.
2717 <title>REGISTRY SETVALUE <replaceable>key</replaceable> <!--
2718 --><replaceable>name</replaceable> <replaceable>type</replaceable> <!--
2719 --><replaceable>value</replaceable> ...<!--
2722 <para>Set the value <emphasis>name</emphasis>
2723 of an existing <emphasis>key</emphasis>.
2724 <emphasis>type</emphasis> may be one of
2725 <emphasis>sz</emphasis>, <emphasis>multi_sz</emphasis> or
2726 <emphasis>dword</emphasis>.
2727 In case of <emphasis>multi_sz</emphasis> <replaceable>value</replaceable> may
2728 be given multiple times.
2733 <title>REGISTRY INCREMENT <replaceable>key</replaceable> <!--
2734 --><replaceable>name</replaceable> <replaceable>[inc]</replaceable><!--
2737 <para>Increment the DWORD value <emphasis>name</emphasis>
2738 of <emphasis>key</emphasis> by <replaceable>inc</replaceable>
2739 while holding a g_lock.
2740 <emphasis>inc</emphasis> defaults to 1.
2745 <title>REGISTRY DELETEVALUE <replaceable>key</replaceable> <!--
2746 --><replaceable>name</replaceable></title>
2748 <para>Delete the value <emphasis>name</emphasis>
2749 of the given <emphasis>key</emphasis>.
2754 <title>REGISTRY GETSD <replaceable>key</replaceable></title>
2756 <para>Get the security descriptor of the given <emphasis>key</emphasis>.
2761 <title>REGISTRY GETSD_SDDL <replaceable>key</replaceable></title>
2763 <para>Get the security descriptor of the given <emphasis>key</emphasis> as a
2764 Security Descriptor Definition Language (SDDL) string.
2769 <title>REGISTRY SETSD_SDDL <replaceable>key</replaceable><!--
2770 --><replaceable>sd</replaceable></title>
2772 <para>Set the security descriptor of the given <emphasis>key</emphasis> from a
2773 Security Descriptor Definition Language (SDDL) string <emphasis>sd</emphasis>.
2778 <title>REGISTRY IMPORT <replaceable>file</replaceable><!--
2779 --><replaceable> [--precheck <check-file>] [opt]</replaceable></title>
2780 <para>Import a registration entries (.reg) <emphasis>file</emphasis>.</para>
2781 <para>The following options are available:</para>
2783 <varlistentry><term>--precheck <replaceable>check-file</replaceable></term>
2785 This is a mechanism to check the existence or non-existence of
2786 certain keys or values specified in a precheck file before applying
2788 The import file will only be applied if the precheck succeeds.
2791 The check-file follows the normal registry file syntax with the
2792 following semantics:
2795 <listitem><para><value name>=<value> checks whether the
2796 value exists and has the given value.</para></listitem>
2797 <listitem><para><value name>=- checks whether the value does
2798 not exist.</para></listitem>
2799 <listitem><para>[key] checks whether the key exists.</para>
2801 <listitem><para>[-key] checks whether the key does not exist.</para>
2810 <title>REGISTRY EXPORT <replaceable>key</replaceable><!--
2811 --><replaceable>file</replaceable><!--
2812 --><replaceable>[opt]</replaceable></title>
2814 <para>Export a <emphasis>key</emphasis> to a registration entries (.reg)
2815 <emphasis>file</emphasis>.
2820 <title>REGISTRY CONVERT <replaceable>in</replaceable> <!--
2821 --><replaceable>out</replaceable> <!--
2822 --><replaceable>[[inopt] outopt]</replaceable></title>
2824 <para>Convert a registration entries (.reg) file <emphasis>in</emphasis>.
2829 <title>REGISTRY CHECK [-ravTl] [-o <ODB>] [--wipe] [<DB>]</title>
2830 <para>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
2833 <varlistentry><term>-r|--repair</term>
2835 Interactive repair mode, ask a lot of questions.
2839 <varlistentry><term>-a|--auto</term>
2841 Noninteractive repair mode, use default answers.
2845 <varlistentry><term>-v|--verbose</term>
2847 Produce more output.
2851 <varlistentry><term>-T|--test</term>
2853 Dry run, show what changes would be made but don't touch anything.
2857 <varlistentry><term>-l|--lock</term>
2859 Lock the database while doing the check.
2863 <varlistentry><term>--reg-version={1,2,3}</term>
2865 Specify the format of the registry database. If not given it defaults to
2866 the value of the binary or, if an registry.tdb is explicitly stated at
2867 the commandline, to the value found in the INFO/version record.
2871 <varlistentry><term>[--db] <DB></term>
2873 Check the specified database.
2877 <varlistentry><term>-o|--output <ODB></term>
2879 Create a new registry database <ODB> instead of modifying the
2880 input. If <ODB> is already existing --wipe may be used to
2885 <varlistentry><term>--wipe</term>
2887 Replace the registry database instead of modifying the input or
2888 overwrite an existing output database.
2892 <varlistentry><term></term>
2903 <title>EVENTLOG</title>
2905 <para>Starting with version 3.4.0 net can read, dump, import and export native
2906 win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools.
2910 The import and export of evt files can only succeed when <parameter>eventlog list</parameter> is used in
2911 <emphasis>&smb.conf;</emphasis> file.
2912 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2915 <para>The eventlog commands are:
2917 <member>net eventlog dump - Dump a eventlog *.evt file on the screen.</member>
2918 <member>net eventlog import - Import a eventlog *.evt into the samba internal
2919 tdb based representation of eventlogs.</member>
2920 <member>net eventlog export - Export the samba internal tdb based representation
2921 of eventlogs into an eventlog *.evt file.</member>
2926 <title>EVENTLOG DUMP <replaceable>filename</replaceable></title>
2929 Prints a eventlog *.evt file to standard output.
2934 <title>EVENTLOG IMPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2937 Imports a eventlog *.evt file defined by <replaceable>filename</replaceable> into the
2938 samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>.
2939 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2940 defined in &smb.conf;.
2941 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2947 <title>EVENTLOG EXPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2950 Exports the samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>
2951 to a eventlog *.evt file defined by <replaceable>filename</replaceable>.
2952 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2953 defined in &smb.conf;.
2954 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2964 <para>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.
2966 <para>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.
2969 <para>The client side support for remote join is implemented in the net dom commands which are:
2971 <member>net dom join - Join a remote computer into a domain.</member>
2972 <member>net dom unjoin - Unjoin a remote computer from a domain.</member>
2973 <member>net dom renamecomputer - Renames a remote computer joined to a domain.</member>
2978 <title>DOM JOIN <replaceable>domain=DOMAIN</replaceable> <replaceable>ou=OU</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2981 Joins a computer into a domain. This command supports the following additional parameters:
2986 <listitem><para><replaceable>DOMAIN</replaceable> 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 \ separator character. Example: MYDOM\MYDC. The <replaceable>DOMAIN</replaceable> parameter cannot be NULL.</para></listitem>
2988 <listitem><para><replaceable>OU</replaceable> can be set to a RFC 1779 LDAP DN, like <emphasis>ou=mymachines,cn=Users,dc=example,dc=com</emphasis> in order to create the machine account in a non-default LDAP container. This optional parameter is only supported when joining Active Directory Domains.</para></listitem>
2990 <listitem><para><replaceable>ACCOUNT</replaceable> 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.</para></listitem>
2992 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2994 <listitem><para><replaceable>REBOOT</replaceable> is an optional parameter that can be set to reboot the remote machine after successful join to the domain.</para></listitem>
2999 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.
3003 net dom join -S xp -U XP\\administrator%secret domain=MYDOM account=MYDOM\\administrator password=topsecret reboot.
3006 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.
3012 <title>DOM UNJOIN <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
3015 Unjoins a computer from a domain. This command supports the following additional parameters:
3020 <listitem><para><replaceable>ACCOUNT</replaceable> 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.</para></listitem>
3022 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
3024 <listitem><para><replaceable>REBOOT</replaceable> is an optional parameter that can be set to reboot the remote machine after successful unjoin from the domain.</para></listitem>
3029 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.
3033 net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot.
3036 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.
3042 <title>DOM RENAMECOMPUTER <replaceable>newname=NEWNAME</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
3045 Renames a computer that is joined to a domain. This command supports the following additional parameters:
3050 <listitem><para><replaceable>NEWNAME</replaceable> defines the new name of the machine in the domain.</para></listitem>
3052 <listitem><para><replaceable>ACCOUNT</replaceable> 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.</para></listitem>
3054 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
3056 <listitem><para><replaceable>REBOOT</replaceable> is an optional parameter that can be set to reboot the remote machine after successful rename in the domain.</para></listitem>
3061 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.
3065 net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot.
3068 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.
3076 <title>G_LOCK</title>
3078 <para>Manage global locks.</para>
3081 <title>G_LOCK DO <replaceable>lockname</replaceable> <replaceable>timeout</replaceable> <replaceable>command</replaceable></title>
3084 Execute a shell command under a global lock. This might be useful to define the
3085 order in which several shell commands will be executed. The locking information
3086 is stored in a file called <filename>g_lock.tdb</filename>. In setups with CTDB
3087 running, the locking information will be available on all cluster nodes.
3091 <listitem><para><replaceable>LOCKNAME</replaceable> defines the name of the global lock.</para></listitem>
3092 <listitem><para><replaceable>TIMEOUT</replaceable> defines the timeout.</para></listitem>
3093 <listitem><para><replaceable>COMMAND</replaceable> defines the shell command to execute.</para></listitem>
3098 <title>G_LOCK LOCKS</title>
3101 Print a list of all currently existing locknames.
3106 <title>G_LOCK DUMP <replaceable>lockname</replaceable></title>
3109 Dump the locking table of a certain global lock.
3118 <para>Print information from tdb records.</para>
3121 <title>TDB LOCKING <replaceable>key</replaceable> [DUMP]</title>
3123 <para>List sharename, filename and number of share modes
3124 for a record from locking.tdb. With the optional DUMP options,
3125 dump the complete record.</para>
3129 <para><replaceable>KEY</replaceable>
3130 Key of the tdb record as hex string.</para>
3139 <para>Access shared filesystem through the VFS.</para>
3142 <title>vfs stream2abouble [--recursive] [--verbose] [--continue] [--follow-symlinks] <replaceable>share</replaceable> <replaceable>path</replaceable></title>
3144 <para>Convert file streams to AppleDouble files.</para>
3147 <para><replaceable>share</replaceable>
3148 A Samba share.</para>
3153 <para><replaceable>path</replaceable> A relative path of something in
3154 the Samba share. "." can be used for the root directory of the
3159 <para>Options:</para>
3162 <term>--recursive</term>
3163 <listitem><para>Traverse a directory hierarchy.</para></listitem>
3166 <term>--verbose</term>
3167 <listitem><para>Verbose output.</para></listitem>
3170 <term>--continue</term>
3171 <listitem><para>Continue traversing a directory hierarchy if a single
3172 conversion fails.</para></listitem>
3175 <term>--follow-symlinks</term>
3176 <listitem><para>Follow symlinks encountered while traversing a
3177 directory.</para></listitem>
3183 <title>vfs getntacl <replaceable>share</replaceable> <replaceable>path</replaceable></title>
3185 <para>Display the security descriptor of a file or directory.</para>
3188 <para><replaceable>share</replaceable>
3189 A Samba share.</para>
3194 <para><replaceable>path</replaceable> A relative path of something in
3195 the Samba share. "." can be used for the root directory of the
3204 <title>OFFLINEJOIN</title>
3206 <para>Starting with version 4.15 Samba has support for offline join APIs. Windows supports offline join capabilities since Windows 7 and Windows 2008 R2.
3209 <para>The following offline commands are implemented:
3211 <member>net offlinejoin provision - Provisions a machine account in AD.</member>
3212 <member>net offlinejoin requestodj - Requests a domain offline join.</member>
3217 <title>OFFLINEJOIN PROVISION <replaceable>domain=DOMAIN</replaceable> <replaceable>machine_name=MACHINE_NAME</replaceable> <replaceable>machine_account_ou=MACHINE_ACCOUNT_OU</replaceable> <replaceable>dcname=DCNAME</replaceable> <replaceable>defpwd</replaceable> <replaceable>reuse</replaceable> <replaceable>savefile=FILENAME</replaceable> <replaceable>printblob</replaceable></title>
3220 Provisions a machine account in AD. This command needs network connectivity to the domain controller to succeed. This command supports the following additional parameters:
3225 <listitem><para><replaceable>DOMAIN</replaceable> can be a NetBIOS domain name (also known as short domain name) or a DNS domain name for Active Directory Domains. The <replaceable>DOMAIN</replaceable> parameter cannot be NULL.</para></listitem>
3227 <listitem><para><replaceable>MACHINE_NAME</replaceable> defines the machine account name that will be provisioned in AD. The <replaceable>MACHINE_NAME</replaceable> parameter cannot be NULL.</para></listitem>
3229 <listitem><para><replaceable>MACHINE_ACCOUNT_OU</replaceable> can be set to a RFC 1779 LDAP DN, like <emphasis>ou=mymachines,cn=Users,dc=example,dc=com</emphasis> in order to create the machine account in a non-default LDAP container. This optional parameter is only supported when joining Active Directory Domains.</para></listitem>
3231 <listitem><para><replaceable>DCNAME</replaceable> defines a specific domain controller for creating the machine account in AD.</para></listitem>
3233 <listitem><para><replaceable>DEFPWD</replaceable> 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. </para></listitem>
3235 <listitem><para><replaceable>REUSE</replaceable> is an optional parameter that can be set to enforce reusing an existing machine account in AD.</para></listitem>
3237 <listitem><para><replaceable>SAVEFILE</replaceable> is an optional parameter to store the generated provisioning data on disk.</para></listitem>
3239 <listitem><para><replaceable>PRINTBLOB</replaceable> is an optional parameter to print the generated provisioning data on stdout.</para></listitem>
3245 net offlinejoin provision -U administrator%secret domain=MYDOM machine_name=MYHOST savefile=provisioning.txt
3250 <title>OFFLINEJOIN REQUESTODJ <replaceable>loadfile=FILENAME</replaceable></title>
3253 Requests an offline domain join by providing file-based provisioning data. This command supports the following additional parameters:
3258 <listitem><para><replaceable>LOADFILE</replaceable> is a required parameter to load the provisioning from a file.</para></listitem>
3264 net offlinejoin requestodj -U administrator%secret loadfile=provisioning.txt
3272 <title>WITNESS</title>
3274 <para>Starting with version 4.20 Samba has support for the SMB Witness service in a cluster.
3277 <para>The following witness commands are implemented:
3280 net witness list List witness registrations from rpcd_witness_registration.tdb.
3283 net witness client-move Generate client move notifications for witness registrations to a new ip or node.
3286 net witness share-move Generate share move notifications for witness registrations to a new ip or node.
3289 net witness force-unregister Force unregistrations for witness registrations.
3292 net witness force-response Force an AsyncNotify response based on json input (mostly for testing).
3299 <title>WITNESS LIST</title>
3301 List witness registrations from rpcd_witness_registration.tdb
3304 Note: Only supported with clustering=yes!
3307 Machine readable output can be generated with the following option:
3313 The selection of registrations can be limited by the following options:
3316 --witness-registration=REGISTRATION_UUID
3319 This does a direct lookup for REGISTRATION_UUID
3320 instead of doing a database traversal.
3323 The following options all take a POSIX Extended Regular Expression,
3324 which can further filter the selection of registrations.
3325 These options are applied as logical AND, but each REGEX
3326 allows specifying multiple strings using the pipe symbol.
3329 --witness-net-name=REGEX
3332 This specifies the 'server name' the client
3333 registered for monitoring.
3336 --witness-share-name=REGEX
3339 This specifies the 'share name' the client
3340 registered for monitoring.
3341 Note that the share name is optional in the
3342 registration, otherwise an empty string is
3346 --witness-ip-address=REGEX
3349 This specifies the ip address the client
3350 registered for monitoring.
3353 --witness-client-computer-name=REGEX
3356 This specifies the client computer name the client
3357 specified in the registration.
3358 Note it is just a string chosen by the client itself.
3364 <title>WITNESS CLIENT-MOVE</title>
3366 Generate client move notifications for witness registrations to a new ip or node
3369 Note: Only supported with clustering=yes!
3372 Machine readable output can be generated with the following option:
3378 The selection of registrations can be limited by the following options:
3381 --witness-registration=REGISTRATION_UUID
3384 This does a direct lookup for REGISTRATION_UUID
3385 instead of doing a database traversal.
3388 The following options all take a POSIX Extended Regular Expression,
3389 which can further filter the selection of registrations.
3390 These options are applied as logical AND, but each REGEX
3391 allows specifying multiple strings using the pipe symbol.
3394 --witness-net-name=REGEX
3397 This specifies the 'server name' the client
3398 registered for monitoring.
3401 --witness-share-name=REGEX
3404 This specifies the 'share name' the client
3405 registered for monitoring.
3406 Note that the share name is optional in the
3407 registration, otherwise an empty string is
3411 --witness-ip-address=REGEX
3414 This specifies the ip address the client
3415 registered for monitoring.
3418 --witness-client-computer-name=REGEX
3421 This specifies the client computer name the client
3422 specified in the registration.
3423 Note it is just a string chosen by the client itself.
3426 If the update should be applied to all registrations
3427 it needs to be explicitly specified:
3430 --witness-apply-to-all
3433 This selects all registrations.
3434 Note: This is mutual exclusive to the above options.
3437 The content of the CLIENT_MOVE notification contains ip addresses
3438 specified by (exactly one) of the following options:
3441 --witness-new-node=NODEID
3444 By specifying a NODEID all ip addresses
3445 currently available on the given node are
3446 included in the response.
3447 By specifying '-1' as NODEID all ip addresses
3448 of the cluster are included in the response.
3451 --witness-new-ip=IPADDRESS
3454 By specifying an IPADDRESS only the specified
3455 ip address is included in the response.
3461 <title>WITNESS SHARE-MOVE</title>
3463 Generate share move notifications for witness registrations to a new ip or node
3466 Note: Only supported with clustering=yes!
3469 Machine readable output can be generated with the following option:
3475 The selection of registrations can be limited by the following options:
3478 --witness-registration=REGISTRATION_UUID
3481 This does a direct lookup for REGISTRATION_UUID
3482 instead of doing a database traversal.
3485 The following options all take a POSIX Extended Regular Expression,
3486 which can further filter the selection of registrations.
3487 These options are applied as logical AND, but each REGEX
3488 allows specifying multiple strings using the pipe symbol.
3491 --witness-net-name=REGEX
3494 This specifies the 'server name' the client
3495 registered for monitoring.
3498 --witness-share-name=REGEX
3501 This specifies the 'share name' the client
3502 registered for monitoring.
3503 Note that the share name is optional in the
3504 registration, otherwise an empty string is
3508 --witness-ip-address=REGEX
3511 This specifies the ip address the client
3512 registered for monitoring.
3515 --witness-client-computer-name=REGEX
3518 This specifies the client computer name the client
3519 specified in the registration.
3520 Note it is just a string chosen by the client itself.
3523 If the update should be applied to all registrations
3524 it needs to be explicitly specified:
3527 --witness-apply-to-all
3530 This selects all registrations.
3531 Note: This is mutual exclusive to the above options.
3534 Note: This only applies to registrations with a non empty share name!
3537 The content of the SHARE_MOVE notification contains ip addresses
3538 specified by (exactly one) of the following options:
3541 --witness-new-node=NODEID
3544 By specifying a NODEID all ip addresses
3545 currently available on the given node are
3546 included in the response.
3547 By specifying '-1' as NODEID all ip addresses
3548 of the cluster are included in the response.
3551 --witness-new-ip=IPADDRESS
3554 By specifying an IPADDRESS only the specified
3555 ip address is included in the response.
3561 <title>WITNESS FORCE-UNREGISTER</title>
3563 Force unregistrations for witness registrations
3566 Note: Only supported with clustering=yes!
3569 Machine readable output can be generated with the following option:
3575 The selection of registrations can be limited by the following options:
3578 --witness-registration=REGISTRATION_UUID
3581 This does a direct lookup for REGISTRATION_UUID
3582 instead of doing a database traversal.
3585 The following options all take a POSIX Extended Regular Expression,
3586 which can further filter the selection of registrations.
3587 These options are applied as logical AND, but each REGEX
3588 allows specifying multiple strings using the pipe symbol.
3591 --witness-net-name=REGEX
3594 This specifies the 'server name' the client
3595 registered for monitoring.
3598 --witness-share-name=REGEX
3601 This specifies the 'share name' the client
3602 registered for monitoring.
3603 Note that the share name is optional in the
3604 registration, otherwise an empty string is
3608 --witness-ip-address=REGEX
3611 This specifies the ip address the client
3612 registered for monitoring.
3615 --witness-client-computer-name=REGEX
3618 This specifies the client computer name the client
3619 specified in the registration.
3620 Note it is just a string chosen by the client itself.
3623 If the update should be applied to all registrations
3624 it needs to be explicitly specified:
3627 --witness-apply-to-all
3630 This selects all registrations.
3631 Note: This is mutual exclusive to the above options.
3634 The selected registrations are removed on the server and
3635 any pending AsyncNotify request will get a NOT_FOUND error.
3638 Typically this triggers a clean re-registration on the client.
3644 <title>WITNESS FORCE-RESPONSE</title>
3646 Force an AsyncNotify response based on json input (mostly for testing)
3649 Note: Only supported with clustering=yes!
3652 Machine readable output can be generated with the following option:
3658 The selection of registrations can be limited by the following options:
3661 --witness-registration=REGISTRATION_UUID
3664 This does a direct lookup for REGISTRATION_UUID
3665 instead of doing a database traversal.
3668 The following options all take a POSIX Extended Regular Expression,
3669 which can further filter the selection of registrations.
3670 These options are applied as logical AND, but each REGEX
3671 allows specifying multiple strings using the pipe symbol.
3674 --witness-net-name=REGEX
3677 This specifies the 'server name' the client
3678 registered for monitoring.
3681 --witness-share-name=REGEX
3684 This specifies the 'share name' the client
3685 registered for monitoring.
3686 Note that the share name is optional in the
3687 registration, otherwise an empty string is
3691 --witness-ip-address=REGEX
3694 This specifies the ip address the client
3695 registered for monitoring.
3698 --witness-client-computer-name=REGEX
3701 This specifies the client computer name the client
3702 specified in the registration.
3703 Note it is just a string chosen by the client itself.
3706 If the update should be applied to all registrations
3707 it needs to be explicitly specified:
3710 --witness-apply-to-all
3713 This selects all registrations.
3714 Note: This is mutual exclusive to the above options.
3717 Note this is designed for testing and debugging!
3720 In short it is not designed to be used by administrators,
3721 but developers and automated tests.
3724 By default an empty response with WERR_OK is generated,
3725 but basically any valid response can be specified by a
3726 specifying a JSON string:
3729 --witness-forced-response=JSON
3732 This allows the generation of very complex
3733 witness_notifyResponse structures.
3736 As this is for developers, please read the code
3737 in order to understand all possible values
3738 of the JSON string format...
3741 See 'net help witness force-response' for further details.
3749 <title>HELP [COMMAND]</title>
3751 <para>Gives usage information for the specified command.</para>
3758 <title>VERSION</title>
3760 <para>This man page is complete for version 3 of the Samba
3765 <title>AUTHOR</title>
3767 <para>The original Samba software and related utilities
3768 were created by Andrew Tridgell. Samba is now developed
3769 by the Samba Team as an Open Source project similar
3770 to the way the Linux kernel is developed.</para>
3772 <para>The net manpage was written by Jelmer Vernooij.</para>