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">4.2</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">-w|--workgroup workgroup</arg>
27 <arg choice="opt">-W|--myworkgroup myworkgroup</arg>
28 <arg choice="opt">-U|--user user</arg>
29 <arg choice="opt">-I|--ipaddress ip-address</arg>
30 <arg choice="opt">-p|--port port</arg>
31 <arg choice="opt">-n myname</arg>
32 <arg choice="opt">-s conffile</arg>
33 <arg choice="opt">-S|--server server</arg>
34 <arg choice="opt">-l|--long</arg>
35 <arg choice="opt">-v|--verbose</arg>
36 <arg choice="opt">-f|--force</arg>
37 <arg choice="opt">-P|--machine-pass</arg>
38 <arg choice="opt">-d debuglevel</arg>
39 <arg choice="opt">-V</arg>
40 <arg choice="opt">--request-timeout seconds</arg>
41 <arg choice="opt">-t|--timeout seconds</arg>
42 <arg choice="opt">-i|--stdin</arg>
43 <arg choice="opt">--tallocreport</arg>
48 <title>DESCRIPTION</title>
50 <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
51 <manvolnum>7</manvolnum></citerefentry> suite.</para>
53 <para>The Samba net utility is meant to work just like the net utility
54 available for windows and DOS. The first argument should be used
55 to specify the protocol to use when executing a certain command.
56 ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3)
57 clients and RPC can be used for NT4 and Windows 2000. If this
58 argument is omitted, net will try to determine it automatically.
59 Not all commands are available on all protocols.
65 <title>OPTIONS</title>
72 <term>-w|--workgroup target-workgroup</term>
74 Sets target workgroup or domain. You have to specify
75 either this option or the IP address or the name of a server.
80 <term>-W|--myworkgroup workgroup</term>
82 Sets client workgroup or domain
87 <term>-U|--user user</term>
94 <term>-I|--ipaddress ip-address</term>
96 IP address of target server to use. You have to
97 specify either this option or a target workgroup or
103 <term>-p|--port port</term>
105 Port on the target server to connect to (usually 139 or 445).
106 Defaults to trying 445 first, then 139.
110 &stdarg.netbios.name;
114 <term>-S|--server server</term>
116 Name of target server. You should specify either
117 this option or a target workgroup or a target IP address.
122 <term>-l|--long</term>
124 When listing data, give more information on each item.
129 <term>-v|--verbose</term>
131 When listing data, give more verbose information on each item.
136 <term>-f|--force</term>
138 Enforcing a net command.
143 <term>-P|--machine-pass</term>
145 Make queries to the external server using the machine account of the local server.
150 <term>--request-timeout 30</term>
152 Let client requests timeout after 30 seconds the default is 10
158 <term>-t|--timeout 30</term>
160 Set timeout for client operations to 30 seconds.
165 <term>--use-ccache</term>
167 Try to use the credentials cached by winbind.
172 <term>-i|--stdin</term>
174 Take input for net commands from standard input.
179 <term>--tallocreport</term>
181 Generate a talloc report while processing a net
187 <term>-T|--test</term>
188 <listitem><para>Only test command sequence, dry-run.
193 <term>-F|--flags FLAGS</term>
194 <listitem><para>Pass down integer flags to a net subcommand.
199 <term>-C|--comment COMMENT</term>
200 <listitem><para>Pass down a comment string to a net subcommand.
205 <term>-n|--myname MYNAME</term>
206 <listitem><para>Use MYNAME as a requester name for a net subcommand.
211 <term>-c|--container CONTAINER</term>
212 <listitem><para>Use a specific AD container for net ads operations.
217 <term>-M|--maxusers MAXUSERS</term>
218 <listitem><para>Fill in the maxusers field in net rpc share operations.
223 <term>-r|--reboot</term>
224 <listitem><para>Reboot a remote machine after a command has been successfully executed (e.g. in remote join operations).
228 <!-- Options for net rpc vampire -->
231 <term>--force-full-repl</term>
233 When calling "net rpc vampire keytab" this option
234 enforces a full re-creation of the generated keytab file.
239 <term>--single-obj-repl</term>
241 When calling "net rpc vampire keytab" this option
242 allows to replicate just a single object to the generated keytab file.
247 <term>--clean-old-entries</term>
249 When calling "net rpc vampire keytab" this option
250 allows to cleanup old entries from the generated keytab file.
254 <!-- Options for net idmap -->
258 <listitem><para>Define dbfile for "net idmap" commands.
264 <listitem><para>Activates locking of the dbfile for "net idmap check" command.
269 <term>-a|--auto</term>
270 <listitem><para>Activates noninteractive mode in "net idmap check".
275 <term>--repair</term>
276 <listitem><para>Activates repair mode in "net idmap check".
280 <!-- Options for net rpc share migrate -->
284 <listitem><para>Includes ACLs to be copied in "net rpc share migrate".
290 <listitem><para>Includes file attributes to be copied in "net rpc share migrate".
295 <term>--timestamps</term>
296 <listitem><para>Includes timestamps to be copied in "net rpc share migrate".
301 <term>-X|--exclude DIRECTORY</term>
302 <listitem><para>Allows to exclude directories when copying with "net rpc share migrate".
307 <term>--destination SERVERNAME</term>
308 <listitem><para>Defines the target servername of migration process (defaults to localhost).
312 <!-- Options for net groupmap set -->
315 <term>-L|--local</term>
316 <listitem><para>Sets the type of group mapping to local
317 (used in "net groupmap set").
322 <term>-D|--domain</term>
323 <listitem><para>Sets the type of group mapping to domain
324 (used in "net groupmap set").
329 <term>-N|--ntname NTNAME</term>
330 <listitem><para>Sets the ntname of a group mapping
331 (used in "net groupmap set").
336 <term>-R|--rid RID</term>
337 <listitem><para>Sets the rid of a group mapping
338 (used in "net groupmap set").
342 <!-- Options for net registry check -->
345 <term>--reg-version REG_VERSION</term>
346 <listitem><para>Assume database version {n|1,2,3}
347 (used in "net registry check").
352 <term>-o|--output FILENAME</term>
353 <listitem><para>Output database file
354 (used in "net registry check").
360 <listitem><para>Create a new database from scratch
361 (used in "net registry check").
365 <!-- Options for net registry import -->
368 <term>--precheck PRECHECK_DB_FILENAME</term>
369 <listitem><para>Defines filename for database prechecking
370 (used in "net registry import").
375 &popt.common.samba.client;
381 <title>COMMANDS</title>
384 <title>CHANGESECRETPW</title>
386 <para>This command allows the Samba machine account password to be set from an external application
387 to a machine account password that has already been stored in Active Directory. DO NOT USE this command
388 unless you know exactly what you are doing. The use of this command requires that the force flag (-f)
389 be used also. There will be NO command prompt. Whatever information is piped into stdin, either by
390 typing at the command line or otherwise, will be stored as the literal machine password. Do NOT use
391 this without care and attention as it will overwrite a legitimate machine password without warning.
392 YOU HAVE BEEN WARNED.
400 <para>The <command>NET TIME</command> command allows you to view the time on a remote server
401 or synchronise the time on the local server with the time on the remote server.</para>
406 <para>Without any options, the <command>NET TIME</command> command
407 displays the time on the remote server. The remote server must be
408 specified with the -S option.
414 <title>TIME SYSTEM</title>
416 <para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.
417 The remote server must be specified with the -S option.
423 <title>TIME SET</title>
424 <para>Tries to set the date and time of the local server to that on
425 the remote server using <command>/bin/date</command>.
426 The remote server must be specified with the -S option.
432 <title>TIME ZONE</title>
434 <para>Displays the timezone in hours from GMT on the remote server.
435 The remote server must be specified with the -S option.
442 <title>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [createupn=UPN]
443 [createcomputer=OU] [machinepass=PASS] [osName=string osVer=string] [options]</title>
446 Join a domain. If the account already exists on the server, and
447 [TYPE] is MEMBER, the machine will attempt to join automatically.
448 (Assuming that the machine has been created in server manager)
449 Otherwise, a password will be prompted for, and a new account may
453 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
458 [UPN] (ADS only) set the principalname attribute during the join. The default
459 format is host/netbiosname@REALM.
463 [OU] (ADS only) Precreate the computer account in a specific OU. The
464 OU string reads from top to bottom without RDNs, and is delimited by
465 a '/'. Please note that '\' is used for escape by both the shell
466 and ldap, so it may need to be doubled or quadrupled to pass through,
467 and it is not used as a delimiter.
470 [PASS] (ADS only) Set a specific password on the computer account
471 being created by the join.
474 [osName=string osVer=String] (ADS only) Set the operatingSystem and
475 operatingSystemVersion attribute during the join. Both parameters
476 must be specified for either to take effect.
481 <title>[RPC] OLDJOIN [options]</title>
483 <para>Join a domain. Use the OLDJOIN option to join the domain
484 using the old style of domain joining - you need to create a trust
485 account in server manager first.</para>
489 <title>[RPC|ADS] USER</title>
492 <title>[RPC|ADS] USER</title>
494 <para>List all users</para>
499 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
501 <para>Delete specified user</para>
506 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
508 <para>List the domain groups of the specified user.</para>
513 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
515 <para>Rename specified user.</para>
520 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
522 <para>Add specified user.</para>
527 <title>[RPC|ADS] GROUP</title>
530 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
531 <para>List user groups.</para>
535 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
537 <para>Delete specified group.</para>
542 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
544 <para>Create specified group.</para>
550 <title>[RAP|RPC] SHARE</title>
553 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
555 <para>Enumerates all exported resources (network shares) on target server.</para>
560 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
562 <para>Adds a share from a server (makes the export active). Maxusers
563 specifies the number of users that can be connected to the
564 share simultaneously.</para>
569 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
571 <para>Delete specified share.</para>
576 <title>[RPC|RAP] FILE</title>
579 <title>[RPC|RAP] FILE</title>
581 <para>List all open files on remote server.</para>
586 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
588 <para>Close file with specified <replaceable>fileid</replaceable> on
589 remote server.</para>
594 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
597 Print information on specified <replaceable>fileid</replaceable>.
598 Currently listed are: file-id, username, locks, path, permissions.
604 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
607 List files opened by specified <replaceable>user</replaceable>.
608 Please note that <command>net rap file user</command> does not work
609 against Samba servers.
617 <title>SESSION</title>
620 <title>RAP SESSION</title>
622 <para>Without any other options, SESSION enumerates all active SMB/CIFS
623 sessions on the target server.</para>
628 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
630 <para>Close the specified sessions.</para>
635 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
637 <para>Give a list with all the open files in specified session.</para>
644 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
646 <para>List all servers in specified domain or workgroup. Defaults
647 to local domain.</para>
652 <title>RAP DOMAIN</title>
654 <para>Lists all domains and workgroups visible on the
655 current network.</para>
660 <title>RAP PRINTQ</title>
663 <title>RAP PRINTQ INFO <replaceable>QUEUE_NAME</replaceable></title>
665 <para>Lists the specified print queue and print jobs on the server.
666 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all
667 queues are listed.</para>
672 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
674 <para>Delete job with specified id.</para>
681 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
684 Validate whether the specified user can log in to the
685 remote server. If the password is not specified on the commandline, it
694 <title>RAP GROUPMEMBER</title>
697 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
699 <para>List all members of the specified group.</para>
704 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
706 <para>Delete member from group.</para>
711 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
713 <para>Add member to group.</para>
720 <title>RAP ADMIN <replaceable>command</replaceable></title>
722 <para>Execute the specified <replaceable>command</replaceable> on
723 the remote server. Only works with OS/2 servers.
731 <title>RAP SERVICE</title>
734 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
736 <para>Start the specified service on the remote server. Not implemented yet.</para>
743 <title>RAP SERVICE STOP</title>
745 <para>Stop the specified service on the remote server.</para>
754 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
757 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
763 <title>LOOKUP</title>
766 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
769 Lookup the IP address of the given host with the specified type (netbios suffix).
770 The type defaults to 0x20 (workstation).
776 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
778 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
783 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
785 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
786 Defaults to local realm.</para>
791 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
793 <para>Give IP's of Domain Controllers for specified <replaceable>
794 DOMAIN</replaceable>. Defaults to local domain.</para>
799 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
801 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
802 or workgroup. Defaults to local domain.</para>
811 <para>Samba uses a general caching interface called 'gencache'. It
812 can be controlled using 'NET CACHE'.</para>
814 <para>All the timeout parameters support the suffixes:
817 <member>s - Seconds</member>
818 <member>m - Minutes</member>
819 <member>h - Hours</member>
820 <member>d - Days</member>
821 <member>w - Weeks</member>
827 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
829 <para>Add specified key+data to the cache with the given timeout.</para>
834 <title>CACHE DEL <replaceable>key</replaceable></title>
836 <para>Delete key from the cache.</para>
841 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
843 <para>Update data of existing cache entry.</para>
848 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
850 <para>Search for the specified pattern in the cache data.</para>
855 <title>CACHE LIST</title>
858 List all current items in the cache.
864 <title>CACHE FLUSH</title>
866 <para>Remove all the current items from the cache.</para>
873 <title>GETLOCALSID [DOMAIN]</title>
875 <para>Prints the SID of the specified domain, or if the parameter is
876 omitted, the SID of the local server.</para>
881 <title>SETLOCALSID S-1-5-21-x-y-z</title>
883 <para>Sets SID for the local server to the specified SID.</para>
888 <title>GETDOMAINSID</title>
890 <para>Prints the local machine SID and the SID of the current
896 <title>SETDOMAINSID</title>
898 <para>Sets the SID of the current domain.</para>
903 <title>GROUPMAP</title>
905 <para>Manage the mappings between Windows group SIDs and UNIX groups.
906 Common options include:</para>
909 <listitem><para>unixgroup - Name of the UNIX group</para></listitem>
910 <listitem><para>ntgroup - Name of the Windows NT group (must be
911 resolvable to a SID</para></listitem>
912 <listitem><para>rid - Unsigned 32-bit integer</para></listitem>
913 <listitem><para>sid - Full SID in the form of "S-1-..."</para></listitem>
914 <listitem><para>type - Type of the group; either 'domain', 'local',
915 or 'builtin'</para></listitem>
916 <listitem><para>comment - Freeform text description of the group</para></listitem>
920 <title>GROUPMAP ADD</title>
923 Add a new group mapping entry:
925 net groupmap add {rid=int|sid=string} unixgroup=string \
926 [type={domain|local}] [ntgroup=string] [comment=string]
933 <title>GROUPMAP DELETE</title>
935 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
937 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
942 <title>GROUPMAP MODIFY</title>
944 <para>Update an existing group entry.</para>
948 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \
949 [comment=string] [type={domain|local}]
955 <title>GROUPMAP LIST</title>
957 <para>List existing group mapping entries.</para>
959 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
967 <title>MAXRID</title>
969 <para>Prints out the highest RID currently in use on the local
970 server (by the active 'passdb backend').
976 <title>RPC INFO</title>
978 <para>Print information about the domain of the remote server,
979 such as domain name, domain sid and number of users and groups.
985 <title>[RPC|ADS] TESTJOIN</title>
987 <para>Check whether participation in a domain is still valid.</para>
992 <title>[RPC|ADS] CHANGETRUSTPW</title>
994 <para>Force change of domain trust password.</para>
999 <title>RPC TRUSTDOM</title>
1002 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
1004 <para>Add a interdomain trust account for <replaceable>DOMAIN</replaceable>.
1005 This is in fact a Samba account named <replaceable>DOMAIN$</replaceable>
1006 with the account flag <constant>'I'</constant> (interdomain trust account).
1007 This is required for incoming trusts to work. It makes Samba be a
1008 trusted domain of the foreign (trusting) domain.
1009 Users of the Samba domain will be made available in the foreign domain.
1010 If the command is used against localhost it has the same effect as
1011 <command>smbpasswd -a -i DOMAIN</command>. Please note that both commands
1012 expect a appropriate UNIX account.
1018 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
1020 <para>Remove interdomain trust account for
1021 <replaceable>DOMAIN</replaceable>. If it is used against localhost
1022 it has the same effect as <command>smbpasswd -x DOMAIN$</command>.
1028 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
1031 Establish a trust relationship to a trusted domain.
1032 Interdomain account must already be created on the remote PDC.
1033 This is required for outgoing trusts to work. It makes Samba be a
1034 trusting domain of a foreign (trusted) domain.
1035 Users of the foreign domain will be made available in our domain.
1036 You'll need winbind and a working idmap config to make them
1037 appear in your system.
1043 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
1044 <para>Abandon relationship to trusted domain</para>
1049 <title>RPC TRUSTDOM LIST</title>
1051 <para>List all interdomain trust relationships.</para>
1057 <title>RPC TRUST</title>
1060 <title>RPC TRUST CREATE</title>
1062 <para>Create a trust object by calling lsaCreateTrustedDomainEx2.
1063 The can be done on a single server or on two servers at once with the
1064 possibility to use a random trust password.</para>
1066 <variablelist><title>Options:</title>
1068 <term>otherserver</term>
1069 <listitem><para>Domain controller of the second domain</para></listitem>
1073 <term>otheruser</term>
1074 <listitem><para>Admin user in the second domain</para></listitem>
1078 <term>otherdomainsid</term>
1079 <listitem><para>SID of the second domain</para></listitem>
1083 <term>other_netbios_domain</term>
1084 <listitem><para>NetBIOS (short) name of the second domain</para></listitem>
1088 <term>otherdomain</term>
1089 <listitem><para>DNS (full) name of the second domain</para></listitem>
1093 <term>trustpw</term>
1094 <listitem><para>Trust password</para></listitem>
1098 <variablelist><title>Examples:</title>
1100 <term>Create a trust object on srv1.dom1.dom for the domain dom2</term>
1101 <listitem><literallayout>
1102 net rpc trust create \
1103 otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
1104 other_netbios_domain=dom2 \
1105 otherdomain=dom2.dom \
1108 </literallayout></listitem>
1111 <term>Create a trust relationship between dom1 and dom2</term>
1112 <listitem><literallayout>
1113 net rpc trust create \
1114 otherserver=srv2.dom2.test \
1117 </literallayout></listitem>
1123 <title>RPC TRUST DELETE</title>
1125 <para>Delete a trust object by calling lsaDeleteTrustedDomain.
1126 The can be done on a single server or on two servers at once.</para>
1128 <variablelist><title>Options:</title>
1130 <term>otherserver</term>
1131 <listitem><para>Domain controller of the second domain</para></listitem>
1135 <term>otheruser</term>
1136 <listitem><para>Admin user in the second domain</para></listitem>
1140 <term>otherdomainsid</term>
1141 <listitem><para>SID of the second domain</para></listitem>
1145 <variablelist><title>Examples:</title>
1147 <term>Delete a trust object on srv1.dom1.dom for the domain dom2</term>
1148 <listitem><literallayout>
1149 net rpc trust delete \
1150 otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
1152 </literallayout></listitem>
1155 <term>Delete a trust relationship between dom1 and dom2</term>
1156 <listitem><literallayout>
1157 net rpc trust delete \
1158 otherserver=srv2.dom2.test \
1161 </literallayout></listitem>
1170 <title>RPC RIGHTS</title>
1172 <para>This subcommand is used to view and manage Samba's rights assignments (also
1173 referred to as privileges). There are three options currently available:
1174 <parameter>list</parameter>, <parameter>grant</parameter>, and
1175 <parameter>revoke</parameter>. More details on Samba's privilege model and its use
1176 can be found in the Samba-HOWTO-Collection.</para>
1184 <title>RPC ABORTSHUTDOWN</title>
1186 <para>Abort the shutdown of a remote server.</para>
1191 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
1193 <para>Shut down the remote server.</para>
1199 Reboot after shutdown.
1206 Force shutting down all applications.
1211 <term>-t timeout</term>
1213 Timeout before system will be shut down. An interactive
1214 user of the system can use this time to cancel the shutdown.
1219 <term>-C message</term>
1220 <listitem><para>Display the specified message on the screen to
1221 announce the shutdown.</para></listitem>
1228 <title>RPC SAMDUMP</title>
1230 <para>Print out sam database of remote server. You need
1231 to run this against the PDC, from a Samba machine joined as a BDC. </para>
1235 <title>RPC VAMPIRE</title>
1237 <para>Export users, aliases and groups from remote server to
1238 local server. You need to run this against the PDC, from a Samba machine joined as a BDC.
1239 This vampire command cannot be used against an Active Directory, only
1240 against an NT4 Domain Controller.
1245 <title>RPC VAMPIRE KEYTAB</title>
1247 <para>Dump remote SAM database to local Kerberos keytab file.
1252 <title>RPC VAMPIRE LDIF</title>
1254 <para>Dump remote SAM database to local LDIF file or standard output.
1259 <title>RPC GETSID</title>
1261 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename> (or <filename>secrets.ntdb</filename>). </para>
1266 <title>ADS LEAVE</title>
1268 <para>Make the remote host leave the domain it is part of. </para>
1273 <title>ADS STATUS</title>
1275 <para>Print out status of machine account of the local machine in ADS.
1276 Prints out quite some debug info. Aimed at developers, regular
1277 users should use <command>NET ADS TESTJOIN</command>.</para>
1282 <title>ADS PRINTER</title>
1285 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
1288 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the
1289 server name defaults to the local host.</para>
1294 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
1296 <para>Publish specified printer using ADS.</para>
1301 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
1303 <para>Remove specified printer from ADS directory.</para>
1310 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
1312 <para>Perform a raw LDAP search on a ADS server and dump the results. The
1313 expression is a standard LDAP search expression, and the
1314 attributes are a list of LDAP fields to show in the results.</para>
1316 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
1322 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
1325 Perform a raw LDAP search on a ADS server and dump the results. The
1326 DN standard LDAP DN, and the attributes are a list of LDAP fields
1327 to show in the result.
1330 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
1335 <title>ADS WORKGROUP</title>
1337 <para>Print out workgroup name for specified kerberos realm.</para>
1342 <title>ADS ENCTYPES</title>
1345 List, modify or delete the value of the "msDS-SupportedEncryptionTypes" attribute of an account in AD.
1349 This attribute allows 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:
1352 <para>0x00000001 DES-CBC-CRC</para>
1353 <para>0x00000002 DES-CBC-MD5</para>
1354 <para>0x00000004 RC4-HMAC</para>
1355 <para>0x00000008 AES128-CTS-HMAC-SHA1-96</para>
1356 <para>0x00000010 AES256-CTS-HMAC-SHA1-96</para>
1361 <title>ADS ENCTYPES LIST <replaceable><ACCOUNTNAME></replaceable></title>
1364 List the value of the "msDS-SupportedEncryptionTypes" attribute of a given account.
1367 <para>Example: <userinput>net ads enctypes list Computername</userinput></para>
1372 <title>ADS ENCTYPES SET <replaceable><ACCOUNTNAME></replaceable> <replaceable>[enctypes]</replaceable></title>
1375 Set the value of the "msDS-SupportedEncryptionTypes" attribute of the LDAP object of ACCOUNTNAME to a given value. If the value is ommitted, the value is set to 31 which enables all the currently supported encryption types.
1378 <para>Example: <userinput>net ads enctypes set Computername 24</userinput></para>
1383 <title>ADS ENCTYPES DELETE <replaceable><ACCOUNTNAME></replaceable></title>
1386 Deletes the "msDS-SupportedEncryptionTypes" attribute of the LDAP object of ACCOUNTNAME.
1389 <para>Example: <userinput>net ads enctypes set Computername 24</userinput></para>
1395 <title>SAM CREATEBUILTINGROUP <NAME></title>
1398 (Re)Create a BUILTIN group.
1399 Only a wellknown set of BUILTIN groups can be created with this command.
1400 This is the list of currently recognized group names: Administrators,
1401 Users, Guests, Power Users, Account Operators, Server Operators, Print
1402 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
1405 This command requires a running Winbindd with idmap allocation properly
1406 configured. The group gid will be allocated out of the winbindd range.
1412 <title>SAM CREATELOCALGROUP <NAME></title>
1415 Create a LOCAL group (also known as Alias).
1417 This command requires a running Winbindd with idmap allocation properly
1418 configured. The group gid will be allocated out of the winbindd range.
1424 <title>SAM DELETELOCALGROUP <NAME></title>
1427 Delete an existing LOCAL group (also known as Alias).
1434 <title>SAM MAPUNIXGROUP <NAME></title>
1437 Map an existing Unix group and make it a Domain Group, the domain group
1438 will have the same name.
1444 <title>SAM UNMAPUNIXGROUP <NAME></title>
1447 Remove an existing group mapping entry.
1453 <title>SAM ADDMEM <GROUP> <MEMBER></title>
1456 Add a member to a Local group. The group can be specified only by name,
1457 the member can be specified by name or SID.
1463 <title>SAM DELMEM <GROUP> <MEMBER></title>
1466 Remove a member from a Local group. The group and the member must be
1473 <title>SAM LISTMEM <GROUP></title>
1476 List Local group members. The group must be specified by name.
1482 <title>SAM LIST <users|groups|localgroups|builtin|workstations> [verbose]</title>
1485 List the specified set of accounts by name. If verbose is specified,
1486 the rid and description is also provided for each account.
1492 <title>SAM RIGHTS LIST</title>
1495 List all available privileges.
1501 <title>SAM RIGHTS GRANT <NAME> <PRIVILEGE></title>
1504 Grant one or more privileges to a user.
1510 <title>SAM RIGHTS REVOKE <NAME> <PRIVILEGE></title>
1513 Revoke one or more privileges from a user.
1519 <title>SAM SHOW <NAME></title>
1522 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1529 <title>SAM SET HOMEDIR <NAME> <DIRECTORY></title>
1532 Set the home directory for a user account.
1538 <title>SAM SET PROFILEPATH <NAME> <PATH></title>
1541 Set the profile path for a user account.
1547 <title>SAM SET COMMENT <NAME> <COMMENT></title>
1550 Set the comment for a user or group account.
1556 <title>SAM SET FULLNAME <NAME> <FULL NAME></title>
1559 Set the full name for a user account.
1565 <title>SAM SET LOGONSCRIPT <NAME> <SCRIPT></title>
1568 Set the logon script for a user account.
1574 <title>SAM SET HOMEDRIVE <NAME> <DRIVE></title>
1577 Set the home drive for a user account.
1583 <title>SAM SET WORKSTATIONS <NAME> <WORKSTATIONS></title>
1586 Set the workstations a user account is allowed to log in from.
1592 <title>SAM SET DISABLE <NAME></title>
1595 Set the "disabled" flag for a user account.
1601 <title>SAM SET PWNOTREQ <NAME></title>
1604 Set the "password not required" flag for a user account.
1610 <title>SAM SET AUTOLOCK <NAME></title>
1613 Set the "autolock" flag for a user account.
1619 <title>SAM SET PWNOEXP <NAME></title>
1622 Set the "password do not expire" flag for a user account.
1628 <title>SAM SET PWDMUSTCHANGENOW <NAME> [yes|no]</title>
1631 Set or unset the "password must change" flag for a user account.
1637 <title>SAM POLICY LIST</title>
1640 List the available account policies.
1646 <title>SAM POLICY SHOW <account policy></title>
1649 Show the account policy value.
1655 <title>SAM POLICY SET <account policy> <value></title>
1658 Set a value for the account policy.
1659 Valid values can be: "forever", "never", "off", or a number.
1665 <title>SAM PROVISION</title>
1668 Only available if ldapsam:editposix is set and winbindd is running.
1669 Properly populates the ldap tree with the basic accounts (Administrator)
1670 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1676 <title>IDMAP DUMP <local tdb file name></title>
1679 Dumps the mappings contained in the local tdb file specified.
1680 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1686 <title>IDMAP RESTORE [input file]</title>
1689 Restore the mappings from the specified file or stdin.
1695 <title>IDMAP SET SECRET <DOMAIN> <secret></title>
1698 Store a secret for the specified domain, used primarily for domains
1699 that use idmap_ldap as a backend. In this case the secret is used
1700 as the password for the user DN used to bind to the ldap server.
1706 <title>IDMAP SET RANGE <RANGE> <SID> [index] [--db=<DB>]</title>
1709 Store a domain-range mapping for a given domain (and index) in autorid database.
1715 <title>IDMAP SET CONFIG <config> [--db=<DB>]</title>
1718 Update CONFIG entry in autorid database.
1724 <title>IDMAP GET RANGE <SID> [index] [--db=<DB>]</title>
1727 Get the range for a given domain and index from autorid database.
1733 <title>IDMAP GET RANGES [<SID>] [--db=<DB>]</title>
1736 Get ranges for all domains or for one identified by given SID.
1742 <title>IDMAP GET CONFIG [--db=<DB>]</title>
1745 Get CONFIG entry from autorid database.
1752 <title>IDMAP DELETE MAPPING [-f] [--db=<DB>] <ID></title>
1755 Delete a mapping sid <-> gid or sid <-> uid from the IDMAP database.
1756 The mapping is given by <ID> which may either be a sid: S-x-..., a gid: "GID number" or a uid: "UID number".
1757 Use -f to delete an invalid partial mapping <ID> -> xx
1760 Use "smbcontrol all idmap ..." to notify running smbd instances.
1761 See the <citerefentry><refentrytitle>smbcontrol</refentrytitle>
1762 <manvolnum>1</manvolnum></citerefentry> manpage for details.
1767 <title>IDMAP DELETE RANGE [-f] [--db=<TDB>] <RANGE>|(<SID> [<INDEX>])</title>
1770 Delete a domain range mapping identified by 'RANGE' or "domain SID and INDEX" from autorid database.
1771 Use -f to delete invalid mappings.
1777 <title>IDMAP DELETE RANGES [-f] [--db=<TDB>] <SID></title>
1780 Delete all domain range mappings for a domain identified by SID.
1781 Use -f to delete invalid mappings.
1788 <title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=<DB>]</title>
1791 Check and repair the IDMAP database. If no option is given a read only check
1792 of the database is done. Among others an interactive or automatic repair mode
1793 may be chosen with one of the following options:
1796 <varlistentry><term>-r|--repair</term>
1798 Interactive repair mode, ask a lot of questions.
1802 <varlistentry><term>-a|--auto</term>
1804 Noninteractive repair mode, use default answers.
1808 <varlistentry><term>-v|--verbose</term>
1810 Produce more output.
1814 <varlistentry><term>-f|--force</term>
1816 Try to apply changes, even if they do not apply cleanly.
1820 <varlistentry><term>-T|--test</term>
1822 Dry run, show what changes would be made but don't touch anything.
1826 <varlistentry><term>-l|--lock</term>
1828 Lock the database while doing the check.
1832 <varlistentry><term>--db <DB></term>
1834 Check the specified database.
1837 <varlistentry><term></term>
1843 It reports about the finding of the following errors:
1846 <varlistentry><term>Missing reverse mapping:</term>
1848 A record with mapping A->B where there is no B->A. Default action
1849 in repair mode is to "fix" this by adding the reverse mapping.
1853 <varlistentry><term>Invalid mapping:</term>
1855 A record with mapping A->B where B->C. Default action
1856 is to "delete" this record.
1860 <varlistentry><term>Missing or invalid HWM:</term>
1862 A high water mark is not at least equal to the largest ID in the
1863 database. Default action is to "fix" this by setting it to the
1864 largest ID found +1.
1868 <varlistentry><term>Invalid record:</term>
1870 Something we failed to parse. Default action is to "edit" it
1871 in interactive and "delete" it in automatic mode.
1880 <title>USERSHARE</title>
1882 <para>Starting with version 3.0.23, a Samba server now supports the ability for
1883 non-root users to add user defined shares to be exported using the "net usershare"
1888 To set this up, first set up your smb.conf by adding to the [global] section:
1890 usershare path = /usr/local/samba/lib/usershares
1892 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
1893 set the group owner to the UNIX group who should have the ability to create usershares,
1894 for example a group called "serverops".
1896 Set the permissions on /usr/local/samba/lib/usershares to 01770.
1898 (Owner and group all access, no access for others, plus the sticky bit,
1899 which means that a file in that directory can be renamed or deleted only
1900 by the owner of the file).
1902 Finally, tell smbd how many usershares you will allow by adding to the [global]
1903 section of smb.conf a line such as :
1905 usershare max shares = 100.
1907 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
1908 can create user defined shares on demand using the commands below.
1911 <para>The usershare commands are:
1914 <member>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</member>
1915 <member>net usershare delete sharename - to delete a user defined share.</member>
1916 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
1917 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
1923 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
1926 Add or replace a new user defined share, with name "sharename".
1930 "path" specifies the absolute pathname on the system to be exported.
1931 Restrictions may be put on this, see the global smb.conf parameters:
1932 "usershare owner only", "usershare prefix allow list", and
1933 "usershare prefix deny list".
1937 The optional "comment" parameter is the comment that will appear
1938 on the share when browsed to by a client.
1941 <para>The optional "acl" field
1942 specifies which users have read and write access to the entire share.
1943 Note that guest connections are not allowed unless the smb.conf parameter
1944 "usershare allow guests" has been set. The definition of a user
1945 defined share acl is: "user:permission", where user is a valid
1946 username on the system and permission can be "F", "R", or "D".
1947 "F" stands for "full permissions", ie. read and write permissions.
1948 "D" stands for "deny" for a user, ie. prevent this user from accessing
1950 "R" stands for "read only", ie. only allow read access to this
1951 share (no creation of new files or directories or writing to files).
1955 The default if no "acl" is given is "Everyone:R", which means any
1956 authenticated user has read-only access.
1960 The optional "guest_ok" has the same effect as the parameter of the
1961 same name in smb.conf, in that it allows guest access to this user
1962 defined share. This parameter is only allowed if the global parameter
1963 "usershare allow guests" has been set to true in the smb.conf.
1966 There is no separate command to modify an existing user defined share,
1967 just use the "net usershare add [sharename]" command using the same
1968 sharename as the one you wish to modify and specify the new options
1969 you wish. The Samba smbd daemon notices user defined share modifications
1970 at connect time so will see the change immediately, there is no need
1971 to restart smbd on adding, deleting or changing a user defined share.
1975 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
1978 Deletes the user defined share by name. The Samba smbd daemon
1979 immediately notices this change, although it will not disconnect
1980 any users currently connected to the deleted share.
1986 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1989 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1993 net usershare info on its own dumps out info on the user defined shares that were
1994 created by the current user, or restricts them to share names that match the given
1995 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1996 If the '-l' or '--long' option is also given, it prints out info on user defined
1997 shares created by other users.
2001 The information given about a share looks like:
2006 usershare_acl=Everyone:F
2009 And is a list of the current settings of the user defined share that can be
2010 modified by the "net usershare add" command.
2016 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
2019 List all the user defined shares owned by the current user matching the given pattern, or all users.
2023 net usershare list on its own list out the names of the user defined shares that were
2024 created by the current user, or restricts the list to share names that match the given
2025 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
2026 If the '-l' or '--long' option is also given, it includes the names of user defined
2027 shares created by other users.
2035 <title>[RPC] CONF</title>
2037 <para>Starting with version 3.2.0, a Samba server can be configured by data
2038 stored in registry. This configuration data can be edited with the new "net
2039 conf" commands. There is also the possibility to configure a remote Samba server
2040 by enabling the RPC conf mode and specifying the address of the remote server.
2044 The deployment of this configuration data can be activated in two levels from the
2045 <emphasis>smb.conf</emphasis> file: Share definitions from registry are
2046 activated by setting <parameter>registry shares</parameter> to
2047 <quote>yes</quote> in the [global] section and global configuration options are
2048 activated by setting <smbconfoption name="include">registry</smbconfoption> in
2049 the [global] section for a mixed configuration or by setting
2050 <smbconfoption name="config backend">registry</smbconfoption> in the [global]
2051 section for a registry-only configuration.
2052 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
2053 <manvolnum>5</manvolnum></citerefentry> manpage for details.
2056 <para>The conf commands are:
2058 <member>net [rpc] conf list - Dump the complete configuration in smb.conf like
2060 <member>net [rpc] conf import - Import configuration from file in smb.conf
2062 <member>net [rpc] conf listshares - List the registry shares.</member>
2063 <member>net [rpc] conf drop - Delete the complete configuration from
2065 <member>net [rpc] conf showshare - Show the definition of a registry share.</member>
2066 <member>net [rpc] conf addshare - Create a new registry share.</member>
2067 <member>net [rpc] conf delshare - Delete a registry share.</member>
2068 <member>net [rpc] conf setparm - Store a parameter.</member>
2069 <member>net [rpc] conf getparm - Retrieve the value of a parameter.</member>
2070 <member>net [rpc] conf delparm - Delete a parameter.</member>
2071 <member>net [rpc] conf getincludes - Show the includes of a share definition.</member>
2072 <member>net [rpc] conf setincludes - Set includes for a share.</member>
2073 <member>net [rpc] conf delincludes - Delete includes from a share definition.</member>
2078 <title>[RPC] CONF LIST</title>
2081 Print the configuration data stored in the registry in a smb.conf-like format to
2087 <title>[RPC] CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
2090 This command imports configuration from a file in smb.conf format.
2091 If a section encountered in the input file is present in registry,
2092 its contents is replaced. Sections of registry configuration that have
2093 no counterpart in the input file are not affected. If you want to delete these,
2094 you will have to use the "net conf drop" or "net conf delshare" commands.
2095 Optionally, a section may be specified to restrict the effect of the
2096 import command to that specific section. A test mode is enabled by specifying
2097 the parameter "-T" on the commandline. In test mode, no changes are made to the
2098 registry, and the resulting configuration is printed to standard output instead.
2103 <title>[RPC] CONF LISTSHARES</title>
2106 List the names of the shares defined in registry.
2111 <title>[RPC] CONF DROP</title>
2114 Delete the complete configuration data from registry.
2119 <title>[RPC] CONF SHOWSHARE <replaceable>sharename</replaceable></title>
2122 Show the definition of the share or section specified. It is valid to specify
2123 "global" as sharename to retrieve the global configuration options from
2129 <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>
2131 <para>Create a new share definition in registry.
2132 The sharename and path have to be given. The share name may
2133 <emphasis>not</emphasis> be "global". Optionally, values for the very
2134 common options "writeable", "guest ok" and a "comment" may be specified.
2135 The same result may be obtained by a sequence of "net conf setparm"
2141 <title>[RPC] CONF DELSHARE <replaceable>sharename</replaceable></title>
2144 Delete a share definition from registry.
2149 <title>[RPC] CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
2152 Store a parameter in registry. The section may be global or a sharename.
2153 The section is created if it does not exist yet.
2158 <title>[RPC] CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
2161 Show a parameter stored in registry.
2166 <title>[RPC] CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
2169 Delete a parameter stored in registry.
2174 <title>[RPC] CONF GETINCLUDES <replaceable>section</replaceable></title>
2177 Get the list of includes for the provided section (global or share).
2181 Note that due to the nature of the registry database and the nature of include directives,
2182 the includes need special treatment: Parameters are stored in registry by the parameter
2183 name as valuename, so there is only ever one instance of a parameter per share.
2184 Also, a specific order like in a text file is not guaranteed. For all real
2185 parameters, this is perfectly ok, but the include directive is rather a meta
2186 parameter, for which, in the smb.conf text file, the place where it is specified
2187 between the other parameters is very important. This can not be achieved by the
2188 simple registry smbconf data model, so there is one ordered list of includes
2189 per share, and this list is evaluated after all the parameters of the share.
2193 Further note that currently, only files can be included from registry
2194 configuration. In the future, there will be the ability to include configuration
2195 data from other registry keys.
2200 <title>[RPC] CONF SETINCLUDES <replaceable>section</replaceable> [<replaceable>filename</replaceable>]+</title>
2203 Set the list of includes for the provided section (global or share) to the given
2204 list of one or more filenames. The filenames may contain the usual smb.conf
2210 <title>[RPC] CONF DELINCLUDES <replaceable>section</replaceable></title>
2213 Delete the list of includes from the provided section (global or share).
2220 <title>REGISTRY</title>
2222 Manipulate Samba's registry.
2225 <para>The registry commands are:
2227 <member>net registry enumerate - Enumerate registry keys and values.</member>
2228 <member>net registry enumerate_recursive - Enumerate registry key and its subkeys.</member>
2229 <member>net registry createkey - Create a new registry key.</member>
2230 <member>net registry deletekey - Delete a registry key.</member>
2231 <member>net registry deletekey_recursive - Delete a registry key with subkeys.</member>
2232 <member>net registry getvalue - Print a registry value.</member>
2233 <member>net registry getvalueraw - Print a registry value (raw format).</member>
2234 <member>net registry setvalue - Set a new registry value.</member>
2235 <member>net registry increment - Increment a DWORD registry value under a lock.
2237 <member>net registry deletevalue - Delete a registry value.</member>
2238 <member>net registry getsd - Get security descriptor.</member>
2239 <member>net registry getsd_sdd1 - Get security descriptor in sddl format.
2241 <member>net registry setsd_sdd1 - Set security descriptor from sddl format
2243 <member>net registry import - Import a registration entries (.reg) file.
2245 <member>net registry export - Export a registration entries (.reg) file.
2247 <member>net registry convert - Convert a registration entries (.reg) file.
2249 <member>net registry check - Check and repair a registry database.
2255 <title>REGISTRY ENUMERATE <replaceable>key</replaceable> </title>
2256 <para>Enumerate subkeys and values of <emphasis>key</emphasis>.
2261 <title>REGISTRY ENUMERATE_RECURSIVE <replaceable>key</replaceable> </title>
2262 <para>Enumerate values of <emphasis>key</emphasis> and its subkeys.
2267 <title>REGISTRY CREATEKEY <replaceable>key</replaceable> </title>
2268 <para>Create a new <emphasis>key</emphasis> if not yet existing.
2273 <title>REGISTRY DELETEKEY <replaceable>key</replaceable> </title>
2274 <para>Delete the given <emphasis>key</emphasis> and its
2275 values from the registry, if it has no subkeys.
2280 <title>REGISTRY DELETEKEY_RECURSIVE <replaceable>key</replaceable> </title>
2281 <para>Delete the given <emphasis>key</emphasis> and all of its
2282 subkeys and values from the registry.
2287 <title>REGISTRY GETVALUE <replaceable>key</replaceable> <!--
2288 --><replaceable>name</replaceable></title>
2290 <para>Output type and actual value of the value <emphasis>name</emphasis>
2291 of the given <emphasis>key</emphasis>.
2296 <title>REGISTRY GETVALUERAW <replaceable>key</replaceable> <!--
2297 --><replaceable>name</replaceable></title>
2298 <para>Output the actual value of the value <emphasis>name</emphasis>
2299 of the given <emphasis>key</emphasis>.
2304 <title>REGISTRY SETVALUE <replaceable>key</replaceable> <!--
2305 --><replaceable>name</replaceable> <replaceable>type</replaceable> <!--
2306 --><replaceable>value</replaceable> ...<!--
2309 <para>Set the value <emphasis>name</emphasis>
2310 of an existing <emphasis>key</emphasis>.
2311 <emphasis>type</emphasis> may be one of
2312 <emphasis>sz</emphasis>, <emphasis>multi_sz</emphasis> or
2313 <emphasis>dword</emphasis>.
2314 In case of <emphasis>multi_sz</emphasis> <replaceable>value</replaceable> may
2315 be given multiple times.
2320 <title>REGISTRY INCREMENT <replaceable>key</replaceable> <!--
2321 --><replaceable>name</replaceable> <replaceable>[inc]</replaceable><!--
2324 <para>Increment the DWORD value <emphasis>name</emphasis>
2325 of <emphasis>key</emphasis> by <replaceable>inc</replaceable>
2326 while holding a g_lock.
2327 <emphasis>inc</emphasis> defaults to 1.
2332 <title>REGISTRY DELETEVALUE <replaceable>key</replaceable> <!--
2333 --><replaceable>name</replaceable></title>
2335 <para>Delete the value <emphasis>name</emphasis>
2336 of the given <emphasis>key</emphasis>.
2341 <title>REGISTRY GETSD <replaceable>key</replaceable></title>
2343 <para>Get the security descriptor of the given <emphasis>key</emphasis>.
2348 <title>REGISTRY GETSD_SDDL <replaceable>key</replaceable></title>
2350 <para>Get the security descriptor of the given <emphasis>key</emphasis> as a
2351 Security Descriptor Definition Language (SDDL) string.
2356 <title>REGISTRY SETSD_SDDL <replaceable>key</replaceable><!--
2357 --><replaceable>sd</replaceable></title>
2359 <para>Set the security descriptor of the given <emphasis>key</emphasis> from a
2360 Security Descriptor Definition Language (SDDL) string <emphasis>sd</emphasis>.
2365 <title>REGISTRY IMPORT <replaceable>file</replaceable><!--
2366 --><replaceable> [--precheck <check-file>] [opt]</replaceable></title>
2367 <para>Import a registration entries (.reg) <emphasis>file</emphasis>.</para>
2368 <para>The following options are available:</para>
2370 <varlistentry><term>--precheck <replaceable>check-file</replaceable></term>
2372 This is a mechanism to check the existence or non-existence of
2373 certain keys or values specified in a precheck file before applying
2375 The import file will only be applied if the precheck succeeds.
2378 The check-file follows the normal registry file syntax with the
2379 following semantics:
2382 <listitem><para><value name>=<value> checks whether the
2383 value exists and has the given value.</para></listitem>
2384 <listitem><para><value name>=- checks whether the value does
2385 not exist.</para></listitem>
2386 <listitem><para>[key] checks whether the key exists.</para>
2388 <listitem><para>[-key] checks whether the key does not exist.</para>
2397 <title>REGISTRY EXPORT <replaceable>key</replaceable><!--
2398 --><replaceable>file</replaceable><!--
2399 --><replaceable>[opt]</replaceable></title>
2401 <para>Export a <emphasis>key</emphasis> to a registration entries (.reg)
2402 <emphasis>file</emphasis>.
2407 <title>REGISTRY CONVERT <replaceable>in</replaceable> <!--
2408 --><replaceable>out</replaceable> <!--
2409 --><replaceable>[[inopt] outopt]</replaceable></title>
2411 <para>Convert a registration entries (.reg) file <emphasis>in</emphasis>.
2416 <title>REGISTRY CHECK [-ravTl] [-o <ODB>] [--wipe] [<DB>]</title>
2417 <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
2420 <varlistentry><term>-r|--repair</term>
2422 Interactive repair mode, ask a lot of questions.
2426 <varlistentry><term>-a|--auto</term>
2428 Noninteractive repair mode, use default answers.
2432 <varlistentry><term>-v|--verbose</term>
2434 Produce more output.
2438 <varlistentry><term>-T|--test</term>
2440 Dry run, show what changes would be made but don't touch anything.
2444 <varlistentry><term>-l|--lock</term>
2446 Lock the database while doing the check.
2450 <varlistentry><term>--reg-version={1,2,3}</term>
2452 Specify the format of the registry database. If not given it defaults to
2453 the value of the binary or, if an registry.tdb is explizitly stated at
2454 the commandline, to the value found in the INFO/version record.
2458 <varlistentry><term>[--db] <DB></term>
2460 Check the specified database.
2464 <varlistentry><term>-o|--output <ODB></term>
2466 Create a new registry database <ODB> instead of modifying the
2467 input. If <ODB> is already existing --wipe may be used to
2472 <varlistentry><term>--wipe</term>
2474 Replace the registry database instead of modifying the input or
2475 overwrite an existing output database.
2479 <varlistentry><term></term>
2490 <title>EVENTLOG</title>
2492 <para>Starting with version 3.4.0 net can read, dump, import and export native
2493 win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools.
2497 The import and export of evt files can only succeed when <parameter>eventlog list</parameter> is used in
2498 <emphasis>smb.conf</emphasis> file.
2499 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2502 <para>The eventlog commands are:
2504 <member>net eventlog dump - Dump a eventlog *.evt file on the screen.</member>
2505 <member>net eventlog import - Import a eventlog *.evt into the samba internal
2506 tdb based representation of eventlogs.</member>
2507 <member>net eventlog export - Export the samba internal tdb based representation
2508 of eventlogs into an eventlog *.evt file.</member>
2513 <title>EVENTLOG DUMP <replaceable>filename</replaceable></title>
2516 Prints a eventlog *.evt file to standard output.
2521 <title>EVENTLOG IMPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2524 Imports a eventlog *.evt file defined by <replaceable>filename</replaceable> into the
2525 samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>.
2526 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2527 defined in smb.conf.
2528 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2534 <title>EVENTLOG EXPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2537 Exports the samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>
2538 to a eventlog *.evt file defined by <replaceable>filename</replaceable>.
2539 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2540 defined in smb.conf.
2541 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2551 <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.
2553 <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.
2556 <para>The client side support for remote join is implemented in the net dom commands which are:
2558 <member>net dom join - Join a remote computer into a domain.</member>
2559 <member>net dom unjoin - Unjoin a remote computer from a domain.</member>
2560 <member>net dom renamecomputer - Renames a remote computer joined to a domain.</member>
2565 <title>DOM JOIN <replaceable>domain=DOMAIN</replaceable> <replaceable>ou=OU</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2568 Joins a computer into a domain. This command supports the following additional parameters:
2573 <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>
2575 <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>
2577 <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>
2579 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2581 <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>
2586 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.
2590 net dom join -S xp -U XP\\administrator%secret domain=MYDOM account=MYDOM\\administrator password=topsecret reboot.
2593 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.
2599 <title>DOM UNJOIN <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2602 Unjoins a computer from a domain. This command supports the following additional parameters:
2607 <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>
2609 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2611 <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>
2616 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.
2620 net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot.
2623 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.
2629 <title>DOM RENAMECOMPUTER <replaceable>newname=NEWNAME</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2632 Renames a computer that is joined to a domain. This command supports the following additional parameters:
2637 <listitem><para><replaceable>NEWNAME</replaceable> defines the new name of the machine in the domain.</para></listitem>
2639 <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>
2641 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2643 <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>
2648 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.
2652 net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot.
2655 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.
2663 <title>G_LOCK</title>
2665 <para>Manage global locks.</para>
2668 <title>G_LOCK DO <replaceable>lockname</replaceable> <replaceable>timeout</replaceable> <replaceable>command</replaceable></title>
2671 Execute a shell command under a global lock. This might be useful to define the
2672 order in which several shell commands will be executed. The locking information
2673 is stored in a file called <filename>g_lock.tdb</filename>. In setups with CTDB
2674 running, the locking information will be available on all cluster nodes.
2678 <listitem><para><replaceable>LOCKNAME</replaceable> defines the name of the global lock.</para></listitem>
2679 <listitem><para><replaceable>TIMEOUT</replaceable> defines the timeout.</para></listitem>
2680 <listitem><para><replaceable>COMMAND</replaceable> defines the shell command to execute.</para></listitem>
2685 <title>G_LOCK LOCKS</title>
2688 Print a list of all currently existing locknames.
2693 <title>G_LOCK DUMP <replaceable>lockname</replaceable></title>
2696 Dump the locking table of a certain global lock.
2703 <title>HELP [COMMAND]</title>
2705 <para>Gives usage information for the specified command.</para>
2712 <title>VERSION</title>
2714 <para>This man page is complete for version 3 of the Samba
2719 <title>AUTHOR</title>
2721 <para>The original Samba software and related utilities
2722 were created by Andrew Tridgell. Samba is now developed
2723 by the Samba Team as an Open Source project similar
2724 to the way the Linux kernel is developed.</para>
2726 <para>The net manpage was written by Jelmer Vernooij.</para>