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 [HOSTNAME [IP [IP.....]]]</title>
1468 <para>Add host dns entry to Active Directory.</para>
1472 <title>ADS DNS UNREGISTER <HOSTNAME></title>
1473 <para>Remove host 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 Creates a new keytab file if one doesn't exist with default entries. Default
1552 entries are kerberos principals created from the machinename of the
1553 client, the UPN (if it exists) and any Windows SPN(s) associated with the
1554 computer AD account for the client. If a keytab file already exists then only
1555 missing kerberos principals from the default entries are added. No changes
1556 are made to the computer AD account.
1561 <title>(Removed!) ADS KEYTAB <replaceable>ADD</replaceable> <replaceable>(principal | machine | serviceclass | windows SPN</replaceable></title>
1564 This command is no longer available in Samba 4.21.0 and newer. See <smbconfoption name="sync machine password to keytab"/> for replacement.
1567 To replace e.g. call of
1569 net ads keytab add wurst/brot@REALM
1573 sync machine password to keytab = /path/to/keytab1:spns=wurst/brot@REALM:machine_password
1577 net ads keytab create
1581 Original description of this command:
1584 Adds a new keytab entry, the entry can be either;
1586 <varlistentry><term>kerberos principal</term>
1588 A kerberos principal (identified by the presence of '@') is just
1589 added to the keytab file.
1592 <varlistentry><term>machinename</term>
1594 A machinename (identified by the trailing '$') is used to create a
1595 a kerberos principal 'machinename@realm' which is added to the
1599 <varlistentry><term>serviceclass</term>
1601 A serviceclass (such as 'cifs', 'html' etc.) is used to create a pair
1602 of kerberos principals 'serviceclass/fully_qualified_dns_name@realm' &
1603 'serviceclass/netbios_name@realm' which are added to the keytab file.
1606 <varlistentry><term>Windows SPN</term>
1608 A Windows SPN is of the format 'serviceclass/host:port', it is used to
1609 create a kerberos principal 'serviceclass/host@realm' which will
1610 be written to the keytab file.
1616 Unlike old versions no computer AD objects are modified by this command. To
1617 preserve the behaviour of older clients 'net ads keytab ad_update_ads' is
1623 <title>(Removed!) ADS KEYTAB <replaceable>DELETE</replaceable> <replaceable>(principal | machine | serviceclass | windows SPN</replaceable></title>
1626 This command is no longer available in Samba 4.21.0 and newer. See <smbconfoption name="sync machine password to keytab"/> for replacement.
1630 To replace e.g. call of
1632 net ads keytab delete wurst/brot@REALM
1634 Delete from <smbconfoption name="sync machine password to keytab"/> principal "wurst/brot@REALM" and run:
1636 net ads keytab create
1643 <title>(Removed!) ADS KEYTAB <replaceable>ADD_UPDATE_ADS</replaceable> <replaceable>(principal | machine | serviceclass | windows SPN</replaceable></title>
1645 This command is no longer available in Samba 4.21.0 and newer. See <smbconfoption name="sync machine password to keytab"/> for replacement.
1648 To replace e.g. call of
1650 net ads keytab add_update_ads wurst/brot@REALM
1654 sync machine password to keytab = /path/to/keytab2:sync_spns:machine_password
1658 net ads setspn add wurst/brot@REALM
1659 net ads keytab create
1663 Original description of this command:
1667 Adds a new keytab entry (see section for net ads keytab add). In addition to
1668 adding entries to the keytab file corresponding Windows SPNs are created
1669 from the entry passed to this command. These SPN(s) added to the AD computer
1670 account object associated with the client machine running this command for
1671 the following entry types;
1673 <varlistentry><term>serviceclass</term>
1675 A serviceclass (such as 'cifs', 'html' etc.) is used to create a
1676 pair of Windows SPN(s) 'param/full_qualified_dns' &
1677 'param/netbios_name' which are added to the AD computer account object
1681 <varlistentry><term>Windows SPN</term>
1683 A Windows SPN is of the format 'serviceclass/host:port', it is
1684 added as passed to the AD computer account object for this client.
1692 <title>ADS setspn <replaceable>SETSPN LIST [machine]</replaceable></title>
1695 Lists the Windows SPNs stored in the 'machine' Windows AD Computer object.
1696 If 'machine' is not specified then computer account for this client is used
1702 <title>ADS setspn <replaceable>SETSPN ADD SPN [machine]</replaceable></title>
1705 Adds the specified Windows SPN to the 'machine' Windows AD Computer object.
1706 If 'machine' is not specified then computer account for this client is used
1713 <title>ADS setspn <replaceable>SETSPN DELETE SPN [machine]</replaceable></title>
1716 DELETE the specified Window SPN from the 'machine' Windows AD Computer
1717 object. If 'machine' is not specified then computer account for this
1725 <title>ADS WORKGROUP</title>
1727 <para>Print out workgroup name for specified kerberos realm.</para>
1732 <title>ADS ENCTYPES</title>
1735 List, modify or delete the value of the "msDS-SupportedEncryptionTypes" attribute of an account in AD.
1739 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:
1742 <para>0x00000001 DES-CBC-CRC</para>
1743 <para>0x00000002 DES-CBC-MD5</para>
1744 <para>0x00000004 RC4-HMAC</para>
1745 <para>0x00000008 AES128-CTS-HMAC-SHA1-96</para>
1746 <para>0x00000010 AES256-CTS-HMAC-SHA1-96</para>
1751 <title>ADS ENCTYPES LIST <replaceable><ACCOUNTNAME></replaceable></title>
1754 List the value of the "msDS-SupportedEncryptionTypes" attribute of a given account.
1757 <para>Example: <userinput>net ads enctypes list Computername</userinput></para>
1762 <title>ADS ENCTYPES SET <replaceable><ACCOUNTNAME></replaceable> <replaceable>[enctypes]</replaceable></title>
1765 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.
1768 <para>Example: <userinput>net ads enctypes set Computername 24</userinput></para>
1773 <title>ADS ENCTYPES DELETE <replaceable><ACCOUNTNAME></replaceable></title>
1776 Deletes the "msDS-SupportedEncryptionTypes" attribute of the LDAP object of ACCOUNTNAME.
1779 <para>Example: <userinput>net ads enctypes set Computername 24</userinput></para>
1785 <title>SAM CREATEBUILTINGROUP <NAME></title>
1788 (Re)Create a BUILTIN group.
1789 Only a wellknown set of BUILTIN groups can be created with this command.
1790 This is the list of currently recognized group names: Administrators,
1791 Users, Guests, Power Users, Account Operators, Server Operators, Print
1792 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
1795 This command requires a running Winbindd with idmap allocation properly
1796 configured. The group gid will be allocated out of the winbindd range.
1802 <title>SAM CREATELOCALGROUP <NAME></title>
1805 Create a LOCAL group (also known as Alias).
1807 This command requires a running Winbindd with idmap allocation properly
1808 configured. The group gid will be allocated out of the winbindd range.
1814 <title>SAM DELETELOCALGROUP <NAME></title>
1817 Delete an existing LOCAL group (also known as Alias).
1824 <title>SAM MAPUNIXGROUP <NAME></title>
1827 Map an existing Unix group and make it a Domain Group, the domain group
1828 will have the same name.
1834 <title>SAM UNMAPUNIXGROUP <NAME></title>
1837 Remove an existing group mapping entry.
1843 <title>SAM ADDMEM <GROUP> <MEMBER></title>
1846 Add a member to a Local group. The group can be specified only by name,
1847 the member can be specified by name or SID.
1853 <title>SAM DELMEM <GROUP> <MEMBER></title>
1856 Remove a member from a Local group. The group and the member must be
1863 <title>SAM LISTMEM <GROUP></title>
1866 List Local group members. The group must be specified by name.
1872 <title>SAM LIST <users|groups|localgroups|builtin|workstations> [verbose]</title>
1875 List the specified set of accounts by name. If verbose is specified,
1876 the rid and description is also provided for each account.
1882 <title>SAM RIGHTS LIST</title>
1885 List all available privileges.
1891 <title>SAM RIGHTS GRANT <NAME> <PRIVILEGE></title>
1894 Grant one or more privileges to a user.
1900 <title>SAM RIGHTS REVOKE <NAME> <PRIVILEGE></title>
1903 Revoke one or more privileges from a user.
1909 <title>SAM SHOW <NAME></title>
1912 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1919 <title>SAM SET HOMEDIR <NAME> <DIRECTORY></title>
1922 Set the home directory for a user account.
1928 <title>SAM SET PROFILEPATH <NAME> <PATH></title>
1931 Set the profile path for a user account.
1937 <title>SAM SET COMMENT <NAME> <COMMENT></title>
1940 Set the comment for a user or group account.
1946 <title>SAM SET FULLNAME <NAME> <FULL NAME></title>
1949 Set the full name for a user account.
1955 <title>SAM SET LOGONSCRIPT <NAME> <SCRIPT></title>
1958 Set the logon script for a user account.
1964 <title>SAM SET HOMEDRIVE <NAME> <DRIVE></title>
1967 Set the home drive for a user account.
1973 <title>SAM SET WORKSTATIONS <NAME> <WORKSTATIONS></title>
1976 Set the workstations a user account is allowed to log in from.
1982 <title>SAM SET DISABLE <NAME></title>
1985 Set the "disabled" flag for a user account.
1991 <title>SAM SET PWNOTREQ <NAME></title>
1994 Set the "password not required" flag for a user account.
2000 <title>SAM SET AUTOLOCK <NAME></title>
2003 Set the "autolock" flag for a user account.
2009 <title>SAM SET PWNOEXP <NAME></title>
2012 Set the "password do not expire" flag for a user account.
2018 <title>SAM SET PWDMUSTCHANGENOW <NAME> [yes|no]</title>
2021 Set or unset the "password must change" flag for a user account.
2027 <title>SAM POLICY LIST</title>
2030 List the available account policies.
2036 <title>SAM POLICY SHOW <account policy></title>
2039 Show the account policy value.
2045 <title>SAM POLICY SET <account policy> <value></title>
2048 Set a value for the account policy.
2049 Valid values can be: "forever", "never", "off", or a number.
2055 <title>SAM PROVISION</title>
2058 Only available if ldapsam:editposix is set and winbindd is running.
2059 Properly populates the ldap tree with the basic accounts (Administrator)
2060 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
2066 <title>IDMAP DUMP <local tdb file name></title>
2069 Dumps the mappings contained in the local tdb file specified.
2070 This command is useful to dump only the mappings produced by the idmap_tdb backend.
2076 <title>IDMAP RESTORE [input file]</title>
2079 Restore the mappings from the specified file or stdin.
2085 <title>IDMAP SET SECRET <DOMAIN> <secret></title>
2088 Store a secret for the specified domain, used primarily for domains
2089 that use idmap_ldap as a backend. In this case the secret is used
2090 as the password for the user DN used to bind to the ldap server.
2096 <title>IDMAP SET RANGE <RANGE> <SID> [index] [--db=<DB>]</title>
2099 Store a domain-range mapping for a given domain (and index) in autorid database.
2105 <title>IDMAP SET CONFIG <config> [--db=<DB>]</title>
2108 Update CONFIG entry in autorid database.
2114 <title>IDMAP GET RANGE <SID> [index] [--db=<DB>]</title>
2117 Get the range for a given domain and index from autorid database.
2123 <title>IDMAP GET RANGES [<SID>] [--db=<DB>]</title>
2126 Get ranges for all domains or for one identified by given SID.
2132 <title>IDMAP GET CONFIG [--db=<DB>]</title>
2135 Get CONFIG entry from autorid database.
2142 <title>IDMAP DELETE MAPPING [-f] [--db=<DB>] <ID></title>
2145 Delete a mapping sid <-> gid or sid <-> uid from the IDMAP database.
2146 The mapping is given by <ID> which may either be a sid: S-x-..., a gid: "GID number" or a uid: "UID number".
2147 Use -f to delete an invalid partial mapping <ID> -> xx
2150 Use "smbcontrol all idmap ..." to notify running smbd instances.
2151 See the <citerefentry><refentrytitle>smbcontrol</refentrytitle>
2152 <manvolnum>1</manvolnum></citerefentry> manpage for details.
2157 <title>IDMAP DELETE RANGE [-f] [--db=<TDB>] <RANGE>|(<SID> [<INDEX>])</title>
2160 Delete a domain range mapping identified by 'RANGE' or "domain SID and INDEX" from autorid database.
2161 Use -f to delete invalid mappings.
2167 <title>IDMAP DELETE RANGES [-f] [--db=<TDB>] <SID></title>
2170 Delete all domain range mappings for a domain identified by SID.
2171 Use -f to delete invalid mappings.
2178 <title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=<DB>]</title>
2181 Check and repair the IDMAP database. If no option is given a read only check
2182 of the database is done. Among others an interactive or automatic repair mode
2183 may be chosen with one of the following options:
2186 <varlistentry><term>-r|--repair</term>
2188 Interactive repair mode, ask a lot of questions.
2192 <varlistentry><term>-a|--auto</term>
2194 Noninteractive repair mode, use default answers.
2198 <varlistentry><term>-v|--verbose</term>
2200 Produce more output.
2204 <varlistentry><term>-f|--force</term>
2206 Try to apply changes, even if they do not apply cleanly.
2210 <varlistentry><term>-T|--test</term>
2212 Dry run, show what changes would be made but don't touch anything.
2216 <varlistentry><term>-l|--lock</term>
2218 Lock the database while doing the check.
2222 <varlistentry><term>--db <DB></term>
2224 Check the specified database.
2227 <varlistentry><term></term>
2233 It reports about the finding of the following errors:
2236 <varlistentry><term>Missing reverse mapping:</term>
2238 A record with mapping A->B where there is no B->A. Default action
2239 in repair mode is to "fix" this by adding the reverse mapping.
2243 <varlistentry><term>Invalid mapping:</term>
2245 A record with mapping A->B where B->C. Default action
2246 is to "delete" this record.
2250 <varlistentry><term>Missing or invalid HWM:</term>
2252 A high water mark is not at least equal to the largest ID in the
2253 database. Default action is to "fix" this by setting it to the
2254 largest ID found +1.
2258 <varlistentry><term>Invalid record:</term>
2260 Something we failed to parse. Default action is to "edit" it
2261 in interactive and "delete" it in automatic mode.
2270 <title>USERSHARE</title>
2272 <para>Starting with version 3.0.23, a Samba server now supports the ability for
2273 non-root users to add user defined shares to be exported using the "net usershare"
2278 To set this up, first set up your &smb.conf; by adding to the [global] section:
2280 usershare path = /usr/local/samba/lib/usershares
2282 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
2283 set the group owner to the UNIX group who should have the ability to create usershares,
2284 for example a group called "serverops".
2286 Set the permissions on /usr/local/samba/lib/usershares to 01770.
2288 (Owner and group all access, no access for others, plus the sticky bit,
2289 which means that a file in that directory can be renamed or deleted only
2290 by the owner of the file).
2292 Finally, tell smbd how many usershares you will allow by adding to the [global]
2293 section of &smb.conf; a line such as :
2295 usershare max shares = 100.
2297 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
2298 can create user defined shares on demand using the commands below.
2301 <para>The usershare commands are:
2304 <member>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</member>
2305 <member>net usershare delete sharename - to delete a user defined share.</member>
2306 <member>net usershare info [--long] [wildcard sharename] - to print info about a user defined share.</member>
2307 <member>net usershare list [--long] [wildcard sharename] - to list user defined shares.</member>
2313 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
2316 Add or replace a new user defined share, with name "sharename".
2320 "path" specifies the absolute pathname on the system to be exported.
2321 Restrictions may be put on this, see the global &smb.conf; parameters:
2322 "usershare owner only", "usershare prefix allow list", and
2323 "usershare prefix deny list".
2327 The optional "comment" parameter is the comment that will appear
2328 on the share when browsed to by a client.
2331 <para>The optional "acl" field
2332 specifies which users have read and write access to the entire share.
2333 Note that guest connections are not allowed unless the &smb.conf; parameter
2334 "usershare allow guests" has been set. The definition of a user
2335 defined share acl is: "user:permission", where user is a valid
2336 username on the system and permission can be "F", "R", or "D".
2337 "F" stands for "full permissions", ie. read and write permissions.
2338 "D" stands for "deny" for a user, ie. prevent this user from accessing
2340 "R" stands for "read only", ie. only allow read access to this
2341 share (no creation of new files or directories or writing to files).
2345 The default if no "acl" is given is "Everyone:R", which means any
2346 authenticated user has read-only access.
2350 The optional "guest_ok" has the same effect as the parameter of the
2351 same name in &smb.conf;, in that it allows guest access to this user
2352 defined share. This parameter is only allowed if the global parameter
2353 "usershare allow guests" has been set to true in the &smb.conf;.
2357 There is no separate command to modify an existing user defined share,
2358 just use the "net usershare add [sharename]" command using the same
2359 sharename as the one you wish to modify and specify the new options
2360 you wish. The Samba smbd daemon notices user defined share modifications
2361 at connect time so will see the change immediately, there is no need
2362 to restart smbd on adding, deleting or changing a user defined share.
2367 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
2370 Deletes the user defined share by name. The Samba smbd daemon
2371 immediately notices this change, although it will not disconnect
2372 any users currently connected to the deleted share.
2378 <title>USERSHARE INFO <replaceable>[--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
2381 Get info on user defined shares owned by the current user matching the given pattern, or all users.
2385 net usershare info on its own dumps out info on the user defined shares that were
2386 created by the current user, or restricts them to share names that match the given
2387 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
2388 If the '--long' option is also given, it prints out info on user defined
2389 shares created by other users.
2393 The information given about a share looks like:
2398 usershare_acl=Everyone:F
2401 And is a list of the current settings of the user defined share that can be
2402 modified by the "net usershare add" command.
2408 <title>USERSHARE LIST <replaceable>[--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
2411 List all the user defined shares owned by the current user matching the given pattern, or all users.
2415 net usershare list on its own list out the names of the user defined shares that were
2416 created by the current user, or restricts the list to share names that match the given
2417 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
2418 If the '--long' option is also given, it includes the names of user defined
2419 shares created by other users.
2427 <title>[RPC] CONF</title>
2429 <para>Starting with version 3.2.0, a Samba server can be configured by data
2430 stored in registry. This configuration data can be edited with the new "net
2431 conf" commands. There is also the possibility to configure a remote Samba server
2432 by enabling the RPC conf mode and specifying the address of the remote server.
2436 The deployment of this configuration data can be activated in two levels from the
2437 <emphasis>&smb.conf;</emphasis> file: Share definitions from registry are
2438 activated by setting <parameter>registry shares</parameter> to
2439 <quote>yes</quote> in the [global] section and global configuration options are
2440 activated by setting <smbconfoption name="include">registry</smbconfoption> in
2441 the [global] section for a mixed configuration or by setting
2442 <smbconfoption name="config backend">registry</smbconfoption> in the [global]
2443 section for a registry-only configuration.
2444 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
2445 <manvolnum>5</manvolnum></citerefentry> manpage for details.
2448 <para>The conf commands are:
2450 <member>net [rpc] conf list - Dump the complete configuration in smb.conf like
2452 <member>net [rpc] conf import - Import configuration from file in smb.conf
2454 <member>net [rpc] conf listshares - List the registry shares.</member>
2455 <member>net [rpc] conf drop - Delete the complete configuration from
2457 <member>net [rpc] conf showshare - Show the definition of a registry share.</member>
2458 <member>net [rpc] conf addshare - Create a new registry share.</member>
2459 <member>net [rpc] conf delshare - Delete a registry share.</member>
2460 <member>net [rpc] conf setparm - Store a parameter.</member>
2461 <member>net [rpc] conf getparm - Retrieve the value of a parameter.</member>
2462 <member>net [rpc] conf delparm - Delete a parameter.</member>
2463 <member>net [rpc] conf getincludes - Show the includes of a share definition.</member>
2464 <member>net [rpc] conf setincludes - Set includes for a share.</member>
2465 <member>net [rpc] conf delincludes - Delete includes from a share definition.</member>
2470 <title>[RPC] CONF LIST</title>
2473 Print the configuration data stored in the registry in a smb.conf-like format to
2479 <title>[RPC] CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
2482 This command imports configuration from a file in smb.conf format.
2483 If a section encountered in the input file is present in registry,
2484 its contents is replaced. Sections of registry configuration that have
2485 no counterpart in the input file are not affected. If you want to delete these,
2486 you will have to use the "net conf drop" or "net conf delshare" commands.
2487 Optionally, a section may be specified to restrict the effect of the
2488 import command to that specific section. A test mode is enabled by specifying
2489 the parameter "-T" on the commandline. In test mode, no changes are made to the
2490 registry, and the resulting configuration is printed to standard output instead.
2495 <title>[RPC] CONF LISTSHARES</title>
2498 List the names of the shares defined in registry.
2503 <title>[RPC] CONF DROP</title>
2506 Delete the complete configuration data from registry.
2511 <title>[RPC] CONF SHOWSHARE <replaceable>sharename</replaceable></title>
2514 Show the definition of the share or section specified. It is valid to specify
2515 "global" as sharename to retrieve the global configuration options from
2521 <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>
2523 <para>Create a new share definition in registry.
2524 The sharename and path have to be given. The share name may
2525 <emphasis>not</emphasis> be "global". Optionally, values for the very
2526 common options "writeable", "guest ok" and a "comment" may be specified.
2527 The same result may be obtained by a sequence of "net conf setparm"
2533 <title>[RPC] CONF DELSHARE <replaceable>sharename</replaceable></title>
2536 Delete a share definition from registry.
2541 <title>[RPC] CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
2544 Store a parameter in registry. The section may be global or a sharename.
2545 The section is created if it does not exist yet.
2550 <title>[RPC] CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
2553 Show a parameter stored in registry.
2558 <title>[RPC] CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
2561 Delete a parameter stored in registry.
2566 <title>[RPC] CONF GETINCLUDES <replaceable>section</replaceable></title>
2569 Get the list of includes for the provided section (global or share).
2573 Note that due to the nature of the registry database and the nature of include directives,
2574 the includes need special treatment: Parameters are stored in registry by the parameter
2575 name as valuename, so there is only ever one instance of a parameter per share.
2576 Also, a specific order like in a text file is not guaranteed. For all real
2577 parameters, this is perfectly ok, but the include directive is rather a meta
2578 parameter, for which, in the smb.conf text file, the place where it is specified
2579 between the other parameters is very important. This can not be achieved by the
2580 simple registry smbconf data model, so there is one ordered list of includes
2581 per share, and this list is evaluated after all the parameters of the share.
2585 Further note that currently, only files can be included from registry
2586 configuration. In the future, there will be the ability to include configuration
2587 data from other registry keys.
2592 <title>[RPC] CONF SETINCLUDES <replaceable>section</replaceable> [<replaceable>filename</replaceable>]+</title>
2595 Set the list of includes for the provided section (global or share) to the given
2596 list of one or more filenames. The filenames may contain the usual smb.conf
2602 <title>[RPC] CONF DELINCLUDES <replaceable>section</replaceable></title>
2605 Delete the list of includes from the provided section (global or share).
2612 <title>REGISTRY</title>
2614 Manipulate Samba's registry.
2617 <para>The registry commands are:
2619 <member>net registry enumerate - Enumerate registry keys and values.</member>
2620 <member>net registry enumerate_recursive - Enumerate registry key and its subkeys.</member>
2621 <member>net registry createkey - Create a new registry key.</member>
2622 <member>net registry deletekey - Delete a registry key.</member>
2623 <member>net registry deletekey_recursive - Delete a registry key with subkeys.</member>
2624 <member>net registry getvalue - Print a registry value.</member>
2625 <member>net registry getvalueraw - Print a registry value (raw format).</member>
2626 <member>net registry setvalue - Set a new registry value.</member>
2627 <member>net registry increment - Increment a DWORD registry value under a lock.
2629 <member>net registry deletevalue - Delete a registry value.</member>
2630 <member>net registry getsd - Get security descriptor.</member>
2631 <member>net registry getsd_sdd1 - Get security descriptor in sddl format.
2633 <member>net registry setsd_sdd1 - Set security descriptor from sddl format
2635 <member>net registry import - Import a registration entries (.reg) file.
2637 <member>net registry export - Export a registration entries (.reg) file.
2639 <member>net registry convert - Convert a registration entries (.reg) file.
2641 <member>net registry check - Check and repair a registry database.
2647 <title>REGISTRY ENUMERATE <replaceable>key</replaceable> </title>
2648 <para>Enumerate subkeys and values of <emphasis>key</emphasis>.
2653 <title>REGISTRY ENUMERATE_RECURSIVE <replaceable>key</replaceable> </title>
2654 <para>Enumerate values of <emphasis>key</emphasis> and its subkeys.
2659 <title>REGISTRY CREATEKEY <replaceable>key</replaceable> </title>
2660 <para>Create a new <emphasis>key</emphasis> if not yet existing.
2665 <title>REGISTRY DELETEKEY <replaceable>key</replaceable> </title>
2666 <para>Delete the given <emphasis>key</emphasis> and its
2667 values from the registry, if it has no subkeys.
2672 <title>REGISTRY DELETEKEY_RECURSIVE <replaceable>key</replaceable> </title>
2673 <para>Delete the given <emphasis>key</emphasis> and all of its
2674 subkeys and values from the registry.
2679 <title>REGISTRY GETVALUE <replaceable>key</replaceable> <!--
2680 --><replaceable>name</replaceable></title>
2682 <para>Output type and actual value of the value <emphasis>name</emphasis>
2683 of the given <emphasis>key</emphasis>.
2688 <title>REGISTRY GETVALUERAW <replaceable>key</replaceable> <!--
2689 --><replaceable>name</replaceable></title>
2690 <para>Output the actual value of the value <emphasis>name</emphasis>
2691 of the given <emphasis>key</emphasis>.
2696 <title>REGISTRY SETVALUE <replaceable>key</replaceable> <!--
2697 --><replaceable>name</replaceable> <replaceable>type</replaceable> <!--
2698 --><replaceable>value</replaceable> ...<!--
2701 <para>Set the value <emphasis>name</emphasis>
2702 of an existing <emphasis>key</emphasis>.
2703 <emphasis>type</emphasis> may be one of
2704 <emphasis>sz</emphasis>, <emphasis>multi_sz</emphasis> or
2705 <emphasis>dword</emphasis>.
2706 In case of <emphasis>multi_sz</emphasis> <replaceable>value</replaceable> may
2707 be given multiple times.
2712 <title>REGISTRY INCREMENT <replaceable>key</replaceable> <!--
2713 --><replaceable>name</replaceable> <replaceable>[inc]</replaceable><!--
2716 <para>Increment the DWORD value <emphasis>name</emphasis>
2717 of <emphasis>key</emphasis> by <replaceable>inc</replaceable>
2718 while holding a g_lock.
2719 <emphasis>inc</emphasis> defaults to 1.
2724 <title>REGISTRY DELETEVALUE <replaceable>key</replaceable> <!--
2725 --><replaceable>name</replaceable></title>
2727 <para>Delete the value <emphasis>name</emphasis>
2728 of the given <emphasis>key</emphasis>.
2733 <title>REGISTRY GETSD <replaceable>key</replaceable></title>
2735 <para>Get the security descriptor of the given <emphasis>key</emphasis>.
2740 <title>REGISTRY GETSD_SDDL <replaceable>key</replaceable></title>
2742 <para>Get the security descriptor of the given <emphasis>key</emphasis> as a
2743 Security Descriptor Definition Language (SDDL) string.
2748 <title>REGISTRY SETSD_SDDL <replaceable>key</replaceable><!--
2749 --><replaceable>sd</replaceable></title>
2751 <para>Set the security descriptor of the given <emphasis>key</emphasis> from a
2752 Security Descriptor Definition Language (SDDL) string <emphasis>sd</emphasis>.
2757 <title>REGISTRY IMPORT <replaceable>file</replaceable><!--
2758 --><replaceable> [--precheck <check-file>] [opt]</replaceable></title>
2759 <para>Import a registration entries (.reg) <emphasis>file</emphasis>.</para>
2760 <para>The following options are available:</para>
2762 <varlistentry><term>--precheck <replaceable>check-file</replaceable></term>
2764 This is a mechanism to check the existence or non-existence of
2765 certain keys or values specified in a precheck file before applying
2767 The import file will only be applied if the precheck succeeds.
2770 The check-file follows the normal registry file syntax with the
2771 following semantics:
2774 <listitem><para><value name>=<value> checks whether the
2775 value exists and has the given value.</para></listitem>
2776 <listitem><para><value name>=- checks whether the value does
2777 not exist.</para></listitem>
2778 <listitem><para>[key] checks whether the key exists.</para>
2780 <listitem><para>[-key] checks whether the key does not exist.</para>
2789 <title>REGISTRY EXPORT <replaceable>key</replaceable><!--
2790 --><replaceable>file</replaceable><!--
2791 --><replaceable>[opt]</replaceable></title>
2793 <para>Export a <emphasis>key</emphasis> to a registration entries (.reg)
2794 <emphasis>file</emphasis>.
2799 <title>REGISTRY CONVERT <replaceable>in</replaceable> <!--
2800 --><replaceable>out</replaceable> <!--
2801 --><replaceable>[[inopt] outopt]</replaceable></title>
2803 <para>Convert a registration entries (.reg) file <emphasis>in</emphasis>.
2808 <title>REGISTRY CHECK [-ravTl] [-o <ODB>] [--wipe] [<DB>]</title>
2809 <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
2812 <varlistentry><term>-r|--repair</term>
2814 Interactive repair mode, ask a lot of questions.
2818 <varlistentry><term>-a|--auto</term>
2820 Noninteractive repair mode, use default answers.
2824 <varlistentry><term>-v|--verbose</term>
2826 Produce more output.
2830 <varlistentry><term>-T|--test</term>
2832 Dry run, show what changes would be made but don't touch anything.
2836 <varlistentry><term>-l|--lock</term>
2838 Lock the database while doing the check.
2842 <varlistentry><term>--reg-version={1,2,3}</term>
2844 Specify the format of the registry database. If not given it defaults to
2845 the value of the binary or, if an registry.tdb is explicitly stated at
2846 the commandline, to the value found in the INFO/version record.
2850 <varlistentry><term>[--db] <DB></term>
2852 Check the specified database.
2856 <varlistentry><term>-o|--output <ODB></term>
2858 Create a new registry database <ODB> instead of modifying the
2859 input. If <ODB> is already existing --wipe may be used to
2864 <varlistentry><term>--wipe</term>
2866 Replace the registry database instead of modifying the input or
2867 overwrite an existing output database.
2871 <varlistentry><term></term>
2882 <title>EVENTLOG</title>
2884 <para>Starting with version 3.4.0 net can read, dump, import and export native
2885 win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools.
2889 The import and export of evt files can only succeed when <parameter>eventlog list</parameter> is used in
2890 <emphasis>&smb.conf;</emphasis> file.
2891 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2894 <para>The eventlog commands are:
2896 <member>net eventlog dump - Dump a eventlog *.evt file on the screen.</member>
2897 <member>net eventlog import - Import a eventlog *.evt into the samba internal
2898 tdb based representation of eventlogs.</member>
2899 <member>net eventlog export - Export the samba internal tdb based representation
2900 of eventlogs into an eventlog *.evt file.</member>
2905 <title>EVENTLOG DUMP <replaceable>filename</replaceable></title>
2908 Prints a eventlog *.evt file to standard output.
2913 <title>EVENTLOG IMPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2916 Imports a eventlog *.evt file defined by <replaceable>filename</replaceable> into the
2917 samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>.
2918 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2919 defined in &smb.conf;.
2920 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2926 <title>EVENTLOG EXPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2929 Exports the samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>
2930 to a eventlog *.evt file defined by <replaceable>filename</replaceable>.
2931 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2932 defined in &smb.conf;.
2933 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2943 <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.
2945 <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.
2948 <para>The client side support for remote join is implemented in the net dom commands which are:
2950 <member>net dom join - Join a remote computer into a domain.</member>
2951 <member>net dom unjoin - Unjoin a remote computer from a domain.</member>
2952 <member>net dom renamecomputer - Renames a remote computer joined to a domain.</member>
2957 <title>DOM JOIN <replaceable>domain=DOMAIN</replaceable> <replaceable>ou=OU</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2960 Joins a computer into a domain. This command supports the following additional parameters:
2965 <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>
2967 <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>
2969 <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>
2971 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2973 <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>
2978 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.
2982 net dom join -S xp -U XP\\administrator%secret domain=MYDOM account=MYDOM\\administrator password=topsecret reboot.
2985 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.
2991 <title>DOM UNJOIN <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2994 Unjoins a computer from a domain. This command supports the following additional parameters:
2999 <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>
3001 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
3003 <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>
3008 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.
3012 net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot.
3015 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.
3021 <title>DOM RENAMECOMPUTER <replaceable>newname=NEWNAME</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
3024 Renames a computer that is joined to a domain. This command supports the following additional parameters:
3029 <listitem><para><replaceable>NEWNAME</replaceable> defines the new name of the machine in the domain.</para></listitem>
3031 <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>
3033 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
3035 <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>
3040 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.
3044 net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot.
3047 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.
3055 <title>G_LOCK</title>
3057 <para>Manage global locks.</para>
3060 <title>G_LOCK DO <replaceable>lockname</replaceable> <replaceable>timeout</replaceable> <replaceable>command</replaceable></title>
3063 Execute a shell command under a global lock. This might be useful to define the
3064 order in which several shell commands will be executed. The locking information
3065 is stored in a file called <filename>g_lock.tdb</filename>. In setups with CTDB
3066 running, the locking information will be available on all cluster nodes.
3070 <listitem><para><replaceable>LOCKNAME</replaceable> defines the name of the global lock.</para></listitem>
3071 <listitem><para><replaceable>TIMEOUT</replaceable> defines the timeout.</para></listitem>
3072 <listitem><para><replaceable>COMMAND</replaceable> defines the shell command to execute.</para></listitem>
3077 <title>G_LOCK LOCKS</title>
3080 Print a list of all currently existing locknames.
3085 <title>G_LOCK DUMP <replaceable>lockname</replaceable></title>
3088 Dump the locking table of a certain global lock.
3097 <para>Print information from tdb records.</para>
3100 <title>TDB LOCKING <replaceable>key</replaceable> [DUMP]</title>
3102 <para>List sharename, filename and number of share modes
3103 for a record from locking.tdb. With the optional DUMP options,
3104 dump the complete record.</para>
3108 <para><replaceable>KEY</replaceable>
3109 Key of the tdb record as hex string.</para>
3118 <para>Access shared filesystem through the VFS.</para>
3121 <title>vfs stream2abouble [--recursive] [--verbose] [--continue] [--follow-symlinks] <replaceable>share</replaceable> <replaceable>path</replaceable></title>
3123 <para>Convert file streams to AppleDouble files.</para>
3126 <para><replaceable>share</replaceable>
3127 A Samba share.</para>
3132 <para><replaceable>path</replaceable> A relative path of something in
3133 the Samba share. "." can be used for the root directory of the
3138 <para>Options:</para>
3141 <term>--recursive</term>
3142 <listitem><para>Traverse a directory hierarchy.</para></listitem>
3145 <term>--verbose</term>
3146 <listitem><para>Verbose output.</para></listitem>
3149 <term>--continue</term>
3150 <listitem><para>Continue traversing a directory hierarchy if a single
3151 conversion fails.</para></listitem>
3154 <term>--follow-symlinks</term>
3155 <listitem><para>Follow symlinks encountered while traversing a
3156 directory.</para></listitem>
3162 <title>vfs getntacl <replaceable>share</replaceable> <replaceable>path</replaceable></title>
3164 <para>Display the security descriptor of a file or directory.</para>
3167 <para><replaceable>share</replaceable>
3168 A Samba share.</para>
3173 <para><replaceable>path</replaceable> A relative path of something in
3174 the Samba share. "." can be used for the root directory of the
3183 <title>OFFLINEJOIN</title>
3185 <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.
3188 <para>The following offline commands are implemented:
3190 <member>net offlinejoin provision - Provisions a machine account in AD.</member>
3191 <member>net offlinejoin requestodj - Requests a domain offline join.</member>
3196 <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>
3199 Provisions a machine account in AD. This command needs network connectivity to the domain controller to succeed. This command supports the following additional parameters:
3204 <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>
3206 <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>
3208 <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>
3210 <listitem><para><replaceable>DCNAME</replaceable> defines a specific domain controller for creating the machine account in AD.</para></listitem>
3212 <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>
3214 <listitem><para><replaceable>REUSE</replaceable> is an optional parameter that can be set to enforce reusing an existing machine account in AD.</para></listitem>
3216 <listitem><para><replaceable>SAVEFILE</replaceable> is an optional parameter to store the generated provisioning data on disk.</para></listitem>
3218 <listitem><para><replaceable>PRINTBLOB</replaceable> is an optional parameter to print the generated provisioning data on stdout.</para></listitem>
3224 net offlinejoin provision -U administrator%secret domain=MYDOM machine_name=MYHOST savefile=provisioning.txt
3229 <title>OFFLINEJOIN REQUESTODJ <replaceable>loadfile=FILENAME</replaceable></title>
3232 Requests an offline domain join by providing file-based provisioning data. This command supports the following additional parameters:
3237 <listitem><para><replaceable>LOADFILE</replaceable> is a required parameter to load the provisioning from a file.</para></listitem>
3243 net offlinejoin requestodj -U administrator%secret loadfile=provisioning.txt
3251 <title>WITNESS</title>
3253 <para>Starting with version 4.20 Samba has support for the SMB Witness service in a cluster.
3256 <para>The following witness commands are implemented:
3259 net witness list List witness registrations from rpcd_witness_registration.tdb.
3262 net witness client-move Generate client move notifications for witness registrations to a new ip or node.
3265 net witness share-move Generate share move notifications for witness registrations to a new ip or node.
3268 net witness force-unregister Force unregistrations for witness registrations.
3271 net witness force-response Force an AsyncNotify response based on json input (mostly for testing).
3278 <title>WITNESS LIST</title>
3280 List witness registrations from rpcd_witness_registration.tdb
3283 Note: Only supported with clustering=yes!
3286 Machine readable output can be generated with the following option:
3292 The selection of registrations can be limited by the following options:
3295 --witness-registration=REGISTRATION_UUID
3298 This does a direct lookup for REGISTRATION_UUID
3299 instead of doing a database traversal.
3302 The following options all take a POSIX Extended Regular Expression,
3303 which can further filter the selection of registrations.
3304 These options are applied as logical AND, but each REGEX
3305 allows specifying multiple strings using the pipe symbol.
3308 --witness-net-name=REGEX
3311 This specifies the 'server name' the client
3312 registered for monitoring.
3315 --witness-share-name=REGEX
3318 This specifies the 'share name' the client
3319 registered for monitoring.
3320 Note that the share name is optional in the
3321 registration, otherwise an empty string is
3325 --witness-ip-address=REGEX
3328 This specifies the ip address the client
3329 registered for monitoring.
3332 --witness-client-computer-name=REGEX
3335 This specifies the client computer name the client
3336 specified in the registration.
3337 Note it is just a string chosen by the client itself.
3343 <title>WITNESS CLIENT-MOVE</title>
3345 Generate client move notifications for witness registrations to a new ip or node
3348 Note: Only supported with clustering=yes!
3351 Machine readable output can be generated with the following option:
3357 The selection of registrations can be limited by the following options:
3360 --witness-registration=REGISTRATION_UUID
3363 This does a direct lookup for REGISTRATION_UUID
3364 instead of doing a database traversal.
3367 The following options all take a POSIX Extended Regular Expression,
3368 which can further filter the selection of registrations.
3369 These options are applied as logical AND, but each REGEX
3370 allows specifying multiple strings using the pipe symbol.
3373 --witness-net-name=REGEX
3376 This specifies the 'server name' the client
3377 registered for monitoring.
3380 --witness-share-name=REGEX
3383 This specifies the 'share name' the client
3384 registered for monitoring.
3385 Note that the share name is optional in the
3386 registration, otherwise an empty string is
3390 --witness-ip-address=REGEX
3393 This specifies the ip address the client
3394 registered for monitoring.
3397 --witness-client-computer-name=REGEX
3400 This specifies the client computer name the client
3401 specified in the registration.
3402 Note it is just a string chosen by the client itself.
3405 If the update should be applied to all registrations
3406 it needs to be explicitly specified:
3409 --witness-apply-to-all
3412 This selects all registrations.
3413 Note: This is mutual exclusive to the above options.
3416 The content of the CLIENT_MOVE notification contains ip addresses
3417 specified by (exactly one) of the following options:
3420 --witness-new-node=NODEID
3423 By specifying a NODEID all ip addresses
3424 currently available on the given node are
3425 included in the response.
3426 By specifying '-1' as NODEID all ip addresses
3427 of the cluster are included in the response.
3430 --witness-new-ip=IPADDRESS
3433 By specifying an IPADDRESS only the specified
3434 ip address is included in the response.
3440 <title>WITNESS SHARE-MOVE</title>
3442 Generate share move notifications for witness registrations to a new ip or node
3445 Note: Only supported with clustering=yes!
3448 Machine readable output can be generated with the following option:
3454 The selection of registrations can be limited by the following options:
3457 --witness-registration=REGISTRATION_UUID
3460 This does a direct lookup for REGISTRATION_UUID
3461 instead of doing a database traversal.
3464 The following options all take a POSIX Extended Regular Expression,
3465 which can further filter the selection of registrations.
3466 These options are applied as logical AND, but each REGEX
3467 allows specifying multiple strings using the pipe symbol.
3470 --witness-net-name=REGEX
3473 This specifies the 'server name' the client
3474 registered for monitoring.
3477 --witness-share-name=REGEX
3480 This specifies the 'share name' the client
3481 registered for monitoring.
3482 Note that the share name is optional in the
3483 registration, otherwise an empty string is
3487 --witness-ip-address=REGEX
3490 This specifies the ip address the client
3491 registered for monitoring.
3494 --witness-client-computer-name=REGEX
3497 This specifies the client computer name the client
3498 specified in the registration.
3499 Note it is just a string chosen by the client itself.
3502 If the update should be applied to all registrations
3503 it needs to be explicitly specified:
3506 --witness-apply-to-all
3509 This selects all registrations.
3510 Note: This is mutual exclusive to the above options.
3513 Note: This only applies to registrations with a non empty share name!
3516 The content of the SHARE_MOVE notification contains ip addresses
3517 specified by (exactly one) of the following options:
3520 --witness-new-node=NODEID
3523 By specifying a NODEID all ip addresses
3524 currently available on the given node are
3525 included in the response.
3526 By specifying '-1' as NODEID all ip addresses
3527 of the cluster are included in the response.
3530 --witness-new-ip=IPADDRESS
3533 By specifying an IPADDRESS only the specified
3534 ip address is included in the response.
3540 <title>WITNESS FORCE-UNREGISTER</title>
3542 Force unregistrations for witness registrations
3545 Note: Only supported with clustering=yes!
3548 Machine readable output can be generated with the following option:
3554 The selection of registrations can be limited by the following options:
3557 --witness-registration=REGISTRATION_UUID
3560 This does a direct lookup for REGISTRATION_UUID
3561 instead of doing a database traversal.
3564 The following options all take a POSIX Extended Regular Expression,
3565 which can further filter the selection of registrations.
3566 These options are applied as logical AND, but each REGEX
3567 allows specifying multiple strings using the pipe symbol.
3570 --witness-net-name=REGEX
3573 This specifies the 'server name' the client
3574 registered for monitoring.
3577 --witness-share-name=REGEX
3580 This specifies the 'share name' the client
3581 registered for monitoring.
3582 Note that the share name is optional in the
3583 registration, otherwise an empty string is
3587 --witness-ip-address=REGEX
3590 This specifies the ip address the client
3591 registered for monitoring.
3594 --witness-client-computer-name=REGEX
3597 This specifies the client computer name the client
3598 specified in the registration.
3599 Note it is just a string chosen by the client itself.
3602 If the update should be applied to all registrations
3603 it needs to be explicitly specified:
3606 --witness-apply-to-all
3609 This selects all registrations.
3610 Note: This is mutual exclusive to the above options.
3613 The selected registrations are removed on the server and
3614 any pending AsyncNotify request will get a NOT_FOUND error.
3617 Typically this triggers a clean re-registration on the client.
3623 <title>WITNESS FORCE-RESPONSE</title>
3625 Force an AsyncNotify response based on json input (mostly for testing)
3628 Note: Only supported with clustering=yes!
3631 Machine readable output can be generated with the following option:
3637 The selection of registrations can be limited by the following options:
3640 --witness-registration=REGISTRATION_UUID
3643 This does a direct lookup for REGISTRATION_UUID
3644 instead of doing a database traversal.
3647 The following options all take a POSIX Extended Regular Expression,
3648 which can further filter the selection of registrations.
3649 These options are applied as logical AND, but each REGEX
3650 allows specifying multiple strings using the pipe symbol.
3653 --witness-net-name=REGEX
3656 This specifies the 'server name' the client
3657 registered for monitoring.
3660 --witness-share-name=REGEX
3663 This specifies the 'share name' the client
3664 registered for monitoring.
3665 Note that the share name is optional in the
3666 registration, otherwise an empty string is
3670 --witness-ip-address=REGEX
3673 This specifies the ip address the client
3674 registered for monitoring.
3677 --witness-client-computer-name=REGEX
3680 This specifies the client computer name the client
3681 specified in the registration.
3682 Note it is just a string chosen by the client itself.
3685 If the update should be applied to all registrations
3686 it needs to be explicitly specified:
3689 --witness-apply-to-all
3692 This selects all registrations.
3693 Note: This is mutual exclusive to the above options.
3696 Note this is designed for testing and debugging!
3699 In short it is not designed to be used by administrators,
3700 but developers and automated tests.
3703 By default an empty response with WERR_OK is generated,
3704 but basically any valid response can be specified by a
3705 specifying a JSON string:
3708 --witness-forced-response=JSON
3711 This allows the generation of very complex
3712 witness_notifyResponse structures.
3715 As this is for developers, please read the code
3716 in order to understand all possible values
3717 of the JSON string format...
3720 See 'net help witness force-response' for further details.
3728 <title>HELP [COMMAND]</title>
3730 <para>Gives usage information for the specified command.</para>
3737 <title>VERSION</title>
3739 <para>This man page is complete for version 3 of the Samba
3744 <title>AUTHOR</title>
3746 <para>The original Samba software and related utilities
3747 were created by Andrew Tridgell. Samba is now developed
3748 by the Samba Team as an Open Source project similar
3749 to the way the Linux kernel is developed.</para>
3751 <para>The net manpage was written by Jelmer Vernooij.</para>