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.1</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
186 <!-- Options for net rpc vampire -->
189 <term>--force-full-repl</term>
191 When calling "net rpc vampire keytab" this option
192 enforces a full re-creation of the generated keytab file.
197 <term>--single-obj-repl</term>
199 When calling "net rpc vampire keytab" this option
200 allows to replicate just a single object to the generated keytab file.
205 <term>--clean-old-entries</term>
207 When calling "net rpc vampire keytab" this option
208 allows to cleanup old entries from the generated keytab file.
213 &popt.common.samba.client;
219 <title>COMMANDS</title>
222 <title>CHANGESECRETPW</title>
224 <para>This command allows the Samba machine account password to be set from an external application
225 to a machine account password that has already been stored in Active Directory. DO NOT USE this command
226 unless you know exactly what you are doing. The use of this command requires that the force flag (-f)
227 be used also. There will be NO command prompt. Whatever information is piped into stdin, either by
228 typing at the command line or otherwise, will be stored as the literal machine password. Do NOT use
229 this without care and attention as it will overwrite a legitimate machine password without warning.
230 YOU HAVE BEEN WARNED.
238 <para>The <command>NET TIME</command> command allows you to view the time on a remote server
239 or synchronise the time on the local server with the time on the remote server.</para>
244 <para>Without any options, the <command>NET TIME</command> command
245 displays the time on the remote server.
251 <title>TIME SYSTEM</title>
253 <para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.</para>
258 <title>TIME SET</title>
259 <para>Tries to set the date and time of the local server to that on
260 the remote server using <command>/bin/date</command>. </para>
265 <title>TIME ZONE</title>
267 <para>Displays the timezone in hours from GMT on the remote computer.</para>
273 <title>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [createupn=UPN]
274 [createcomputer=OU] [machinepass=PASS] [osName=string osVer=string] [options]</title>
277 Join a domain. If the account already exists on the server, and
278 [TYPE] is MEMBER, the machine will attempt to join automatically.
279 (Assuming that the machine has been created in server manager)
280 Otherwise, a password will be prompted for, and a new account may
284 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
289 [UPN] (ADS only) set the principalname attribute during the join. The default
290 format is host/netbiosname@REALM.
294 [OU] (ADS only) Precreate the computer account in a specific OU. The
295 OU string reads from top to bottom without RDNs, and is delimited by
296 a '/'. Please note that '\' is used for escape by both the shell
297 and ldap, so it may need to be doubled or quadrupled to pass through,
298 and it is not used as a delimiter.
301 [PASS] (ADS only) Set a specific password on the computer account
302 being created by the join.
305 [osName=string osVer=String] (ADS only) Set the operatingSystem and
306 operatingSystemVersion attribute during the join. Both parameters
307 must be specified for either to take effect.
312 <title>[RPC] OLDJOIN [options]</title>
314 <para>Join a domain. Use the OLDJOIN option to join the domain
315 using the old style of domain joining - you need to create a trust
316 account in server manager first.</para>
320 <title>[RPC|ADS] USER</title>
323 <title>[RPC|ADS] USER</title>
325 <para>List all users</para>
330 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
332 <para>Delete specified user</para>
337 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
339 <para>List the domain groups of the specified user.</para>
344 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
346 <para>Rename specified user.</para>
351 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
353 <para>Add specified user.</para>
358 <title>[RPC|ADS] GROUP</title>
361 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
362 <para>List user groups.</para>
366 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
368 <para>Delete specified group.</para>
373 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
375 <para>Create specified group.</para>
381 <title>[RAP|RPC] SHARE</title>
384 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
386 <para>Enumerates all exported resources (network shares) on target server.</para>
391 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
393 <para>Adds a share from a server (makes the export active). Maxusers
394 specifies the number of users that can be connected to the
395 share simultaneously.</para>
400 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
402 <para>Delete specified share.</para>
407 <title>[RPC|RAP] FILE</title>
410 <title>[RPC|RAP] FILE</title>
412 <para>List all open files on remote server.</para>
417 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
419 <para>Close file with specified <replaceable>fileid</replaceable> on
420 remote server.</para>
425 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
428 Print information on specified <replaceable>fileid</replaceable>.
429 Currently listed are: file-id, username, locks, path, permissions.
435 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
438 List files opened by specified <replaceable>user</replaceable>.
439 Please note that <command>net rap file user</command> does not work
440 against Samba servers.
448 <title>SESSION</title>
451 <title>RAP SESSION</title>
453 <para>Without any other options, SESSION enumerates all active SMB/CIFS
454 sessions on the target server.</para>
459 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
461 <para>Close the specified sessions.</para>
466 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
468 <para>Give a list with all the open files in specified session.</para>
475 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
477 <para>List all servers in specified domain or workgroup. Defaults
478 to local domain.</para>
483 <title>RAP DOMAIN</title>
485 <para>Lists all domains and workgroups visible on the
486 current network.</para>
491 <title>RAP PRINTQ</title>
494 <title>RAP PRINTQ INFO <replaceable>QUEUE_NAME</replaceable></title>
496 <para>Lists the specified print queue and print jobs on the server.
497 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all
498 queues are listed.</para>
503 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
505 <para>Delete job with specified id.</para>
512 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
515 Validate whether the specified user can log in to the
516 remote server. If the password is not specified on the commandline, it
525 <title>RAP GROUPMEMBER</title>
528 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
530 <para>List all members of the specified group.</para>
535 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
537 <para>Delete member from group.</para>
542 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
544 <para>Add member to group.</para>
551 <title>RAP ADMIN <replaceable>command</replaceable></title>
553 <para>Execute the specified <replaceable>command</replaceable> on
554 the remote server. Only works with OS/2 servers.
562 <title>RAP SERVICE</title>
565 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
567 <para>Start the specified service on the remote server. Not implemented yet.</para>
574 <title>RAP SERVICE STOP</title>
576 <para>Stop the specified service on the remote server.</para>
585 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
588 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
594 <title>LOOKUP</title>
597 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
600 Lookup the IP address of the given host with the specified type (netbios suffix).
601 The type defaults to 0x20 (workstation).
607 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
609 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
614 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
616 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
617 Defaults to local realm.</para>
622 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
624 <para>Give IP's of Domain Controllers for specified <replaceable>
625 DOMAIN</replaceable>. Defaults to local domain.</para>
630 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
632 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
633 or workgroup. Defaults to local domain.</para>
642 <para>Samba uses a general caching interface called 'gencache'. It
643 can be controlled using 'NET CACHE'.</para>
645 <para>All the timeout parameters support the suffixes:
648 <member>s - Seconds</member>
649 <member>m - Minutes</member>
650 <member>h - Hours</member>
651 <member>d - Days</member>
652 <member>w - Weeks</member>
658 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
660 <para>Add specified key+data to the cache with the given timeout.</para>
665 <title>CACHE DEL <replaceable>key</replaceable></title>
667 <para>Delete key from the cache.</para>
672 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
674 <para>Update data of existing cache entry.</para>
679 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
681 <para>Search for the specified pattern in the cache data.</para>
686 <title>CACHE LIST</title>
689 List all current items in the cache.
695 <title>CACHE FLUSH</title>
697 <para>Remove all the current items from the cache.</para>
704 <title>GETLOCALSID [DOMAIN]</title>
706 <para>Prints the SID of the specified domain, or if the parameter is
707 omitted, the SID of the local server.</para>
712 <title>SETLOCALSID S-1-5-21-x-y-z</title>
714 <para>Sets SID for the local server to the specified SID.</para>
719 <title>GETDOMAINSID</title>
721 <para>Prints the local machine SID and the SID of the current
727 <title>SETDOMAINSID</title>
729 <para>Sets the SID of the current domain.</para>
734 <title>GROUPMAP</title>
736 <para>Manage the mappings between Windows group SIDs and UNIX groups.
737 Common options include:</para>
740 <listitem><para>unixgroup - Name of the UNIX group</para></listitem>
741 <listitem><para>ntgroup - Name of the Windows NT group (must be
742 resolvable to a SID</para></listitem>
743 <listitem><para>rid - Unsigned 32-bit integer</para></listitem>
744 <listitem><para>sid - Full SID in the form of "S-1-..."</para></listitem>
745 <listitem><para>type - Type of the group; either 'domain', 'local',
746 or 'builtin'</para></listitem>
747 <listitem><para>comment - Freeform text description of the group</para></listitem>
751 <title>GROUPMAP ADD</title>
754 Add a new group mapping entry:
756 net groupmap add {rid=int|sid=string} unixgroup=string \
757 [type={domain|local}] [ntgroup=string] [comment=string]
764 <title>GROUPMAP DELETE</title>
766 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
768 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
773 <title>GROUPMAP MODIFY</title>
775 <para>Update an existing group entry.</para>
779 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \
780 [comment=string] [type={domain|local}]
786 <title>GROUPMAP LIST</title>
788 <para>List existing group mapping entries.</para>
790 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
798 <title>MAXRID</title>
800 <para>Prints out the highest RID currently in use on the local
801 server (by the active 'passdb backend').
807 <title>RPC INFO</title>
809 <para>Print information about the domain of the remote server,
810 such as domain name, domain sid and number of users and groups.
816 <title>[RPC|ADS] TESTJOIN</title>
818 <para>Check whether participation in a domain is still valid.</para>
823 <title>[RPC|ADS] CHANGETRUSTPW</title>
825 <para>Force change of domain trust password.</para>
830 <title>RPC TRUSTDOM</title>
833 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
835 <para>Add a interdomain trust account for <replaceable>DOMAIN</replaceable>.
836 This is in fact a Samba account named <replaceable>DOMAIN$</replaceable>
837 with the account flag <constant>'I'</constant> (interdomain trust account).
838 This is required for incoming trusts to work. It makes Samba be a
839 trusted domain of the foreign (trusting) domain.
840 Users of the Samba domain will be made available in the foreign domain.
841 If the command is used against localhost it has the same effect as
842 <command>smbpasswd -a -i DOMAIN</command>. Please note that both commands
843 expect a appropriate UNIX account.
849 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
851 <para>Remove interdomain trust account for
852 <replaceable>DOMAIN</replaceable>. If it is used against localhost
853 it has the same effect as <command>smbpasswd -x DOMAIN$</command>.
859 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
862 Establish a trust relationship to a trusted domain.
863 Interdomain account must already be created on the remote PDC.
864 This is required for outgoing trusts to work. It makes Samba be a
865 trusting domain of a foreign (trusted) domain.
866 Users of the foreign domain will be made available in our domain.
867 You'll need winbind and a working idmap config to make them
868 appear in your system.
874 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
875 <para>Abandon relationship to trusted domain</para>
880 <title>RPC TRUSTDOM LIST</title>
882 <para>List all interdomain trust relationships.</para>
888 <title>RPC TRUST</title>
891 <title>RPC TRUST CREATE</title>
893 <para>Create a trust object by calling lsaCreateTrustedDomainEx2.
894 The can be done on a single server or on two servers at once with the
895 possibility to use a random trust password.</para>
897 <variablelist><title>Options:</title>
899 <term>otherserver</term>
900 <listitem><para>Domain controller of the second domain</para></listitem>
904 <term>otheruser</term>
905 <listitem><para>Admin user in the second domain</para></listitem>
909 <term>otherdomainsid</term>
910 <listitem><para>SID of the second domain</para></listitem>
914 <term>other_netbios_domain</term>
915 <listitem><para>NetBIOS (short) name of the second domain</para></listitem>
919 <term>otherdomain</term>
920 <listitem><para>DNS (full) name of the second domain</para></listitem>
925 <listitem><para>Trust password</para></listitem>
929 <variablelist><title>Examples:</title>
931 <term>Create a trust object on srv1.dom1.dom for the domain dom2</term>
932 <listitem><literallayout>
933 net rpc trust create \
934 otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
935 other_netbios_domain=dom2 \
936 otherdomain=dom2.dom \
939 </literallayout></listitem>
942 <term>Create a trust relationship between dom1 and dom2</term>
943 <listitem><literallayout>
944 net rpc trust create \
945 otherserver=srv2.dom2.test \
948 </literallayout></listitem>
954 <title>RPC TRUST DELETE</title>
956 <para>Delete a trust object by calling lsaDeleteTrustedDomain.
957 The can be done on a single server or on two servers at once.</para>
959 <variablelist><title>Options:</title>
961 <term>otherserver</term>
962 <listitem><para>Domain controller of the second domain</para></listitem>
966 <term>otheruser</term>
967 <listitem><para>Admin user in the second domain</para></listitem>
971 <term>otherdomainsid</term>
972 <listitem><para>SID of the second domain</para></listitem>
976 <variablelist><title>Examples:</title>
978 <term>Delete a trust object on srv1.dom1.dom for the domain dom2</term>
979 <listitem><literallayout>
980 net rpc trust delete \
981 otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
983 </literallayout></listitem>
986 <term>Delete a trust relationship between dom1 and dom2</term>
987 <listitem><literallayout>
988 net rpc trust delete \
989 otherserver=srv2.dom2.test \
992 </literallayout></listitem>
1001 <title>RPC RIGHTS</title>
1003 <para>This subcommand is used to view and manage Samba's rights assignments (also
1004 referred to as privileges). There are three options currently available:
1005 <parameter>list</parameter>, <parameter>grant</parameter>, and
1006 <parameter>revoke</parameter>. More details on Samba's privilege model and its use
1007 can be found in the Samba-HOWTO-Collection.</para>
1015 <title>RPC ABORTSHUTDOWN</title>
1017 <para>Abort the shutdown of a remote server.</para>
1022 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
1024 <para>Shut down the remote server.</para>
1030 Reboot after shutdown.
1037 Force shutting down all applications.
1042 <term>-t timeout</term>
1044 Timeout before system will be shut down. An interactive
1045 user of the system can use this time to cancel the shutdown.
1050 <term>-C message</term>
1051 <listitem><para>Display the specified message on the screen to
1052 announce the shutdown.</para></listitem>
1059 <title>RPC SAMDUMP</title>
1061 <para>Print out sam database of remote server. You need
1062 to run this against the PDC, from a Samba machine joined as a BDC. </para>
1066 <title>RPC VAMPIRE</title>
1068 <para>Export users, aliases and groups from remote server to
1069 local server. You need to run this against the PDC, from a Samba machine joined as a BDC.
1074 <title>RPC VAMPIRE KEYTAB</title>
1076 <para>Dump remote SAM database to local Kerberos keytab file.
1081 <title>RPC VAMPIRE LDIF</title>
1083 <para>Dump remote SAM database to local LDIF file or standard output.
1088 <title>RPC GETSID</title>
1090 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename> (or <filename>secrets.ntdb</filename>). </para>
1095 <title>ADS LEAVE</title>
1097 <para>Make the remote host leave the domain it is part of. </para>
1102 <title>ADS STATUS</title>
1104 <para>Print out status of machine account of the local machine in ADS.
1105 Prints out quite some debug info. Aimed at developers, regular
1106 users should use <command>NET ADS TESTJOIN</command>.</para>
1111 <title>ADS PRINTER</title>
1114 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
1117 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the
1118 server name defaults to the local host.</para>
1123 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
1125 <para>Publish specified printer using ADS.</para>
1130 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
1132 <para>Remove specified printer from ADS directory.</para>
1139 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
1141 <para>Perform a raw LDAP search on a ADS server and dump the results. The
1142 expression is a standard LDAP search expression, and the
1143 attributes are a list of LDAP fields to show in the results.</para>
1145 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
1151 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
1154 Perform a raw LDAP search on a ADS server and dump the results. The
1155 DN standard LDAP DN, and the attributes are a list of LDAP fields
1156 to show in the result.
1159 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
1164 <title>ADS WORKGROUP</title>
1166 <para>Print out workgroup name for specified kerberos realm.</para>
1171 <title>SAM CREATEBUILTINGROUP <NAME></title>
1174 (Re)Create a BUILTIN group.
1175 Only a wellknown set of BUILTIN groups can be created with this command.
1176 This is the list of currently recognized group names: Administrators,
1177 Users, Guests, Power Users, Account Operators, Server Operators, Print
1178 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
1181 This command requires a running Winbindd with idmap allocation properly
1182 configured. The group gid will be allocated out of the winbindd range.
1188 <title>SAM CREATELOCALGROUP <NAME></title>
1191 Create a LOCAL group (also known as Alias).
1193 This command requires a running Winbindd with idmap allocation properly
1194 configured. The group gid will be allocated out of the winbindd range.
1200 <title>SAM DELETELOCALGROUP <NAME></title>
1203 Delete an existing LOCAL group (also known as Alias).
1210 <title>SAM MAPUNIXGROUP <NAME></title>
1213 Map an existing Unix group and make it a Domain Group, the domain group
1214 will have the same name.
1220 <title>SAM UNMAPUNIXGROUP <NAME></title>
1223 Remove an existing group mapping entry.
1229 <title>SAM ADDMEM <GROUP> <MEMBER></title>
1232 Add a member to a Local group. The group can be specified only by name,
1233 the member can be specified by name or SID.
1239 <title>SAM DELMEM <GROUP> <MEMBER></title>
1242 Remove a member from a Local group. The group and the member must be
1249 <title>SAM LISTMEM <GROUP></title>
1252 List Local group members. The group must be specified by name.
1258 <title>SAM LIST <users|groups|localgroups|builtin|workstations> [verbose]</title>
1261 List the specified set of accounts by name. If verbose is specified,
1262 the rid and description is also provided for each account.
1268 <title>SAM RIGHTS LIST</title>
1271 List all available privileges.
1277 <title>SAM RIGHTS GRANT <NAME> <PRIVILEGE></title>
1280 Grant one or more privileges to a user.
1286 <title>SAM RIGHTS REVOKE <NAME> <PRIVILEGE></title>
1289 Revoke one or more privileges from a user.
1295 <title>SAM SHOW <NAME></title>
1298 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1305 <title>SAM SET HOMEDIR <NAME> <DIRECTORY></title>
1308 Set the home directory for a user account.
1314 <title>SAM SET PROFILEPATH <NAME> <PATH></title>
1317 Set the profile path for a user account.
1323 <title>SAM SET COMMENT <NAME> <COMMENT></title>
1326 Set the comment for a user or group account.
1332 <title>SAM SET FULLNAME <NAME> <FULL NAME></title>
1335 Set the full name for a user account.
1341 <title>SAM SET LOGONSCRIPT <NAME> <SCRIPT></title>
1344 Set the logon script for a user account.
1350 <title>SAM SET HOMEDRIVE <NAME> <DRIVE></title>
1353 Set the home drive for a user account.
1359 <title>SAM SET WORKSTATIONS <NAME> <WORKSTATIONS></title>
1362 Set the workstations a user account is allowed to log in from.
1368 <title>SAM SET DISABLE <NAME></title>
1371 Set the "disabled" flag for a user account.
1377 <title>SAM SET PWNOTREQ <NAME></title>
1380 Set the "password not required" flag for a user account.
1386 <title>SAM SET AUTOLOCK <NAME></title>
1389 Set the "autolock" flag for a user account.
1395 <title>SAM SET PWNOEXP <NAME></title>
1398 Set the "password do not expire" flag for a user account.
1404 <title>SAM SET PWDMUSTCHANGENOW <NAME> [yes|no]</title>
1407 Set or unset the "password must change" flag for a user account.
1413 <title>SAM POLICY LIST</title>
1416 List the available account policies.
1422 <title>SAM POLICY SHOW <account policy></title>
1425 Show the account policy value.
1431 <title>SAM POLICY SET <account policy> <value></title>
1434 Set a value for the account policy.
1435 Valid values can be: "forever", "never", "off", or a number.
1441 <title>SAM PROVISION</title>
1444 Only available if ldapsam:editposix is set and winbindd is running.
1445 Properly populates the ldap tree with the basic accounts (Administrator)
1446 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1452 <title>IDMAP DUMP <local tdb file name></title>
1455 Dumps the mappings contained in the local tdb file specified.
1456 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1462 <title>IDMAP RESTORE [input file]</title>
1465 Restore the mappings from the specified file or stdin.
1471 <title>IDMAP SET SECRET <DOMAIN> <secret></title>
1474 Store a secret for the specified domain, used primarily for domains
1475 that use idmap_ldap as a backend. In this case the secret is used
1476 as the password for the user DN used to bind to the ldap server.
1482 <title>IDMAP SET RANGE <RANGE> <SID> [index] [--db=<DB>]</title>
1485 Store a domain-range mapping for a given domain (and index) in autorid database.
1491 <title>IDMAP SET CONFIG <config> [--db=<DB>]</title>
1494 Update CONFIG entry in autorid database.
1500 <title>IDMAP GET RANGE <SID> [index] [--db=<DB>]</title>
1503 Get the range for a given domain and index from autorid database.
1509 <title>IDMAP GET RANGES [<SID>] [--db=<DB>]</title>
1512 Get ranges for all domains or for one identified by given SID.
1518 <title>IDMAP GET CONFIG [--db=<DB>]</title>
1521 Get CONFIG entry from autorid database.
1528 <title>IDMAP DELETE MAPPING [-f] [--db=<DB>] <ID></title>
1531 Delete a mapping sid <-> gid or sid <-> uid from the IDMAP database.
1532 The mapping is given by <ID> which may either be a sid: S-x-..., a gid: "GID number" or a uid: "UID number".
1533 Use -f to delete an invalid partial mapping <ID> -> xx
1536 Use "smbcontrol all idmap ..." to notify running smbd instances.
1537 See the <citerefentry><refentrytitle>smbcontrol</refentrytitle>
1538 <manvolnum>1</manvolnum></citerefentry> manpage for details.
1543 <title>IDMAP DELETE RANGE [-f] [--db=<TDB>] <RANGE>|(<SID> [<INDEX>])</title>
1546 Delete a domain range mapping identified by 'RANGE' or "domain SID and INDEX" from autorid database.
1547 Use -f to delete invalid mappings.
1553 <title>IDMAP DELETE RANGES [-f] [--db=<TDB>] <SID></title>
1556 Delete all domain range mappings for a domain identified by SID.
1557 Use -f to delete invalid mappings.
1564 <title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=<DB>]</title>
1567 Check and repair the IDMAP database. If no option is given a read only check
1568 of the database is done. Among others an interactive or automatic repair mode
1569 may be chosen with one of the following options:
1572 <varlistentry><term>-r|--repair</term>
1574 Interactive repair mode, ask a lot of questions.
1578 <varlistentry><term>-a|--auto</term>
1580 Noninteractive repair mode, use default answers.
1584 <varlistentry><term>-v|--verbose</term>
1586 Produce more output.
1590 <varlistentry><term>-f|--force</term>
1592 Try to apply changes, even if they do not apply cleanly.
1596 <varlistentry><term>-T|--test</term>
1598 Dry run, show what changes would be made but don't touch anything.
1602 <varlistentry><term>-l|--lock</term>
1604 Lock the database while doing the check.
1608 <varlistentry><term>--db <DB></term>
1610 Check the specified database.
1613 <varlistentry><term></term>
1619 It reports about the finding of the following errors:
1622 <varlistentry><term>Missing reverse mapping:</term>
1624 A record with mapping A->B where there is no B->A. Default action
1625 in repair mode is to "fix" this by adding the reverse mapping.
1629 <varlistentry><term>Invalid mapping:</term>
1631 A record with mapping A->B where B->C. Default action
1632 is to "delete" this record.
1636 <varlistentry><term>Missing or invalid HWM:</term>
1638 A high water mark is not at least equal to the largest ID in the
1639 database. Default action is to "fix" this by setting it to the
1640 largest ID found +1.
1644 <varlistentry><term>Invalid record:</term>
1646 Something we failed to parse. Default action is to "edit" it
1647 in interactive and "delete" it in automatic mode.
1656 <title>USERSHARE</title>
1658 <para>Starting with version 3.0.23, a Samba server now supports the ability for
1659 non-root users to add user defined shares to be exported using the "net usershare"
1664 To set this up, first set up your smb.conf by adding to the [global] section:
1666 usershare path = /usr/local/samba/lib/usershares
1668 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
1669 set the group owner to the UNIX group who should have the ability to create usershares,
1670 for example a group called "serverops".
1672 Set the permissions on /usr/local/samba/lib/usershares to 01770.
1674 (Owner and group all access, no access for others, plus the sticky bit,
1675 which means that a file in that directory can be renamed or deleted only
1676 by the owner of the file).
1678 Finally, tell smbd how many usershares you will allow by adding to the [global]
1679 section of smb.conf a line such as :
1681 usershare max shares = 100.
1683 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
1684 can create user defined shares on demand using the commands below.
1687 <para>The usershare commands are:
1690 <member>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</member>
1691 <member>net usershare delete sharename - to delete a user defined share.</member>
1692 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
1693 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
1699 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
1702 Add or replace a new user defined share, with name "sharename".
1706 "path" specifies the absolute pathname on the system to be exported.
1707 Restrictions may be put on this, see the global smb.conf parameters:
1708 "usershare owner only", "usershare prefix allow list", and
1709 "usershare prefix deny list".
1713 The optional "comment" parameter is the comment that will appear
1714 on the share when browsed to by a client.
1717 <para>The optional "acl" field
1718 specifies which users have read and write access to the entire share.
1719 Note that guest connections are not allowed unless the smb.conf parameter
1720 "usershare allow guests" has been set. The definition of a user
1721 defined share acl is: "user:permission", where user is a valid
1722 username on the system and permission can be "F", "R", or "D".
1723 "F" stands for "full permissions", ie. read and write permissions.
1724 "D" stands for "deny" for a user, ie. prevent this user from accessing
1726 "R" stands for "read only", ie. only allow read access to this
1727 share (no creation of new files or directories or writing to files).
1731 The default if no "acl" is given is "Everyone:R", which means any
1732 authenticated user has read-only access.
1736 The optional "guest_ok" has the same effect as the parameter of the
1737 same name in smb.conf, in that it allows guest access to this user
1738 defined share. This parameter is only allowed if the global parameter
1739 "usershare allow guests" has been set to true in the smb.conf.
1742 There is no separate command to modify an existing user defined share,
1743 just use the "net usershare add [sharename]" command using the same
1744 sharename as the one you wish to modify and specify the new options
1745 you wish. The Samba smbd daemon notices user defined share modifications
1746 at connect time so will see the change immediately, there is no need
1747 to restart smbd on adding, deleting or changing a user defined share.
1751 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
1754 Deletes the user defined share by name. The Samba smbd daemon
1755 immediately notices this change, although it will not disconnect
1756 any users currently connected to the deleted share.
1762 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1765 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1769 net usershare info on its own dumps out info on the user defined shares that were
1770 created by the current user, or restricts them to share names that match the given
1771 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1772 If the '-l' or '--long' option is also given, it prints out info on user defined
1773 shares created by other users.
1777 The information given about a share looks like:
1782 usershare_acl=Everyone:F
1785 And is a list of the current settings of the user defined share that can be
1786 modified by the "net usershare add" command.
1792 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
1795 List all the user defined shares owned by the current user matching the given pattern, or all users.
1799 net usershare list on its own list out the names of the user defined shares that were
1800 created by the current user, or restricts the list to share names that match the given
1801 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1802 If the '-l' or '--long' option is also given, it includes the names of user defined
1803 shares created by other users.
1811 <title>[RPC] CONF</title>
1813 <para>Starting with version 3.2.0, a Samba server can be configured by data
1814 stored in registry. This configuration data can be edited with the new "net
1815 conf" commands. There is also the possibility to configure a remote Samba server
1816 by enabling the RPC conf mode and specifying the address of the remote server.
1820 The deployment of this configuration data can be activated in two levels from the
1821 <emphasis>smb.conf</emphasis> file: Share definitions from registry are
1822 activated by setting <parameter>registry shares</parameter> to
1823 <quote>yes</quote> in the [global] section and global configuration options are
1824 activated by setting <smbconfoption name="include">registry</smbconfoption> in
1825 the [global] section for a mixed configuration or by setting
1826 <smbconfoption name="config backend">registry</smbconfoption> in the [global]
1827 section for a registry-only configuration.
1828 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
1829 <manvolnum>5</manvolnum></citerefentry> manpage for details.
1832 <para>The conf commands are:
1834 <member>net [rpc] conf list - Dump the complete configuration in smb.conf like
1836 <member>net [rpc] conf import - Import configuration from file in smb.conf
1838 <member>net [rpc] conf listshares - List the registry shares.</member>
1839 <member>net [rpc] conf drop - Delete the complete configuration from
1841 <member>net [rpc] conf showshare - Show the definition of a registry share.</member>
1842 <member>net [rpc] conf addshare - Create a new registry share.</member>
1843 <member>net [rpc] conf delshare - Delete a registry share.</member>
1844 <member>net [rpc] conf setparm - Store a parameter.</member>
1845 <member>net [rpc] conf getparm - Retrieve the value of a parameter.</member>
1846 <member>net [rpc] conf delparm - Delete a parameter.</member>
1847 <member>net [rpc] conf getincludes - Show the includes of a share definition.</member>
1848 <member>net [rpc] conf setincludes - Set includes for a share.</member>
1849 <member>net [rpc] conf delincludes - Delete includes from a share definition.</member>
1854 <title>[RPC] CONF LIST</title>
1857 Print the configuration data stored in the registry in a smb.conf-like format to
1863 <title>[RPC] CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
1866 This command imports configuration from a file in smb.conf format.
1867 If a section encountered in the input file is present in registry,
1868 its contents is replaced. Sections of registry configuration that have
1869 no counterpart in the input file are not affected. If you want to delete these,
1870 you will have to use the "net conf drop" or "net conf delshare" commands.
1871 Optionally, a section may be specified to restrict the effect of the
1872 import command to that specific section. A test mode is enabled by specifying
1873 the parameter "-T" on the commandline. In test mode, no changes are made to the
1874 registry, and the resulting configuration is printed to standard output instead.
1879 <title>[RPC] CONF LISTSHARES</title>
1882 List the names of the shares defined in registry.
1887 <title>[RPC] CONF DROP</title>
1890 Delete the complete configuration data from registry.
1895 <title>[RPC] CONF SHOWSHARE <replaceable>sharename</replaceable></title>
1898 Show the definition of the share or section specified. It is valid to specify
1899 "global" as sharename to retrieve the global configuration options from
1905 <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>
1907 <para>Create a new share definition in registry.
1908 The sharename and path have to be given. The share name may
1909 <emphasis>not</emphasis> be "global". Optionally, values for the very
1910 common options "writeable", "guest ok" and a "comment" may be specified.
1911 The same result may be obtained by a sequence of "net conf setparm"
1917 <title>[RPC] CONF DELSHARE <replaceable>sharename</replaceable></title>
1920 Delete a share definition from registry.
1925 <title>[RPC] CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
1928 Store a parameter in registry. The section may be global or a sharename.
1929 The section is created if it does not exist yet.
1934 <title>[RPC] CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1937 Show a parameter stored in registry.
1942 <title>[RPC] CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1945 Delete a parameter stored in registry.
1950 <title>[RPC] CONF GETINCLUDES <replaceable>section</replaceable></title>
1953 Get the list of includes for the provided section (global or share).
1957 Note that due to the nature of the registry database and the nature of include directives,
1958 the includes need special treatment: Parameters are stored in registry by the parameter
1959 name as valuename, so there is only ever one instance of a parameter per share.
1960 Also, a specific order like in a text file is not guaranteed. For all real
1961 parameters, this is perfectly ok, but the include directive is rather a meta
1962 parameter, for which, in the smb.conf text file, the place where it is specified
1963 between the other parameters is very important. This can not be achieved by the
1964 simple registry smbconf data model, so there is one ordered list of includes
1965 per share, and this list is evaluated after all the parameters of the share.
1969 Further note that currently, only files can be included from registry
1970 configuration. In the future, there will be the ability to include configuration
1971 data from other registry keys.
1976 <title>[RPC] CONF SETINCLUDES <replaceable>section</replaceable> [<replaceable>filename</replaceable>]+</title>
1979 Set the list of includes for the provided section (global or share) to the given
1980 list of one or more filenames. The filenames may contain the usual smb.conf
1986 <title>[RPC] CONF DELINCLUDES <replaceable>section</replaceable></title>
1989 Delete the list of includes from the provided section (global or share).
1996 <title>REGISTRY</title>
1998 Manipulate Samba's registry.
2001 <para>The registry commands are:
2003 <member>net registry enumerate - Enumerate registry keys and values.</member>
2004 <member>net registry enumerate_recursive - Enumerate registry key and its subkeys.</member>
2005 <member>net registry createkey - Create a new registry key.</member>
2006 <member>net registry deletekey - Delete a registry key.</member>
2007 <member>net registry deletekey_recursive - Delete a registry key with subkeys.</member>
2008 <member>net registry getvalue - Print a registry value.</member>
2009 <member>net registry getvalueraw - Print a registry value (raw format).</member>
2010 <member>net registry setvalue - Set a new registry value.</member>
2011 <member>net registry increment - Increment a DWORD registry value under a lock.
2013 <member>net registry deletevalue - Delete a registry value.</member>
2014 <member>net registry getsd - Get security descriptor.</member>
2015 <member>net registry getsd_sdd1 - Get security descriptor in sddl format.
2017 <member>net registry setsd_sdd1 - Set security descriptor from sddl format
2019 <member>net registry import - Import a registration entries (.reg) file.
2021 <member>net registry export - Export a registration entries (.reg) file.
2023 <member>net registry convert - Convert a registration entries (.reg) file.
2025 <member>net registry check - Check and repair a registry database.
2031 <title>REGISTRY ENUMERATE <replaceable>key</replaceable> </title>
2032 <para>Enumerate subkeys and values of <emphasis>key</emphasis>.
2037 <title>REGISTRY ENUMERATE_RECURSIVE <replaceable>key</replaceable> </title>
2038 <para>Enumerate values of <emphasis>key</emphasis> and its subkeys.
2043 <title>REGISTRY CREATEKEY <replaceable>key</replaceable> </title>
2044 <para>Create a new <emphasis>key</emphasis> if not yet existing.
2049 <title>REGISTRY DELETEKEY <replaceable>key</replaceable> </title>
2050 <para>Delete the given <emphasis>key</emphasis> and its
2051 values from the registry, if it has no subkeys.
2056 <title>REGISTRY DELETEKEY_RECURSIVE <replaceable>key</replaceable> </title>
2057 <para>Delete the given <emphasis>key</emphasis> and all of its
2058 subkeys and values from the registry.
2063 <title>REGISTRY GETVALUE <replaceable>key</replaceable> <!--
2064 --><replaceable>name</replaceable></title>
2066 <para>Output type and actual value of the value <emphasis>name</emphasis>
2067 of the given <emphasis>key</emphasis>.
2072 <title>REGISTRY GETVALUERAW <replaceable>key</replaceable> <!--
2073 --><replaceable>name</replaceable></title>
2074 <para>Output the actual value of the value <emphasis>name</emphasis>
2075 of the given <emphasis>key</emphasis>.
2080 <title>REGISTRY SETVALUE <replaceable>key</replaceable> <!--
2081 --><replaceable>name</replaceable> <replaceable>type</replaceable> <!--
2082 --><replaceable>value</replaceable> ...<!--
2085 <para>Set the value <emphasis>name</emphasis>
2086 of an existing <emphasis>key</emphasis>.
2087 <emphasis>type</emphasis> may be one of
2088 <emphasis>sz</emphasis>, <emphasis>multi_sz</emphasis> or
2089 <emphasis>dword</emphasis>.
2090 In case of <emphasis>multi_sz</emphasis> <replaceable>value</replaceable> may
2091 be given multiple times.
2096 <title>REGISTRY INCREMENT <replaceable>key</replaceable> <!--
2097 --><replaceable>name</replaceable> <replaceable>[inc]</replaceable><!--
2100 <para>Increment the DWORD value <emphasis>name</emphasis>
2101 of <emphasis>key</emphasis> by <replaceable>inc</replaceable>
2102 while holding a g_lock.
2103 <emphasis>inc</emphasis> defaults to 1.
2108 <title>REGISTRY DELETEVALUE <replaceable>key</replaceable> <!--
2109 --><replaceable>name</replaceable></title>
2111 <para>Delete the value <emphasis>name</emphasis>
2112 of the given <emphasis>key</emphasis>.
2117 <title>REGISTRY GETSD <replaceable>key</replaceable></title>
2119 <para>Get the security descriptor of the given <emphasis>key</emphasis>.
2124 <title>REGISTRY GETSD_SDDL <replaceable>key</replaceable></title>
2126 <para>Get the security descriptor of the given <emphasis>key</emphasis> as a
2127 Security Descriptor Definition Language (SDDL) string.
2132 <title>REGISTRY SETSD_SDDL <replaceable>key</replaceable><!--
2133 --><replaceable>sd</replaceable></title>
2135 <para>Set the security descriptor of the given <emphasis>key</emphasis> from a
2136 Security Descriptor Definition Language (SDDL) string <emphasis>sd</emphasis>.
2141 <title>REGISTRY IMPORT <replaceable>file</replaceable><!--
2142 --><replaceable> [--precheck <check-file>] [opt]</replaceable></title>
2143 <para>Import a registration entries (.reg) <emphasis>file</emphasis>.</para>
2144 <para>The following options are available:</para>
2146 <varlistentry><term>--precheck <replaceable>check-file</replaceable></term>
2148 This is a mechanism to check the existence or non-existence of
2149 certain keys or values specified in a precheck file before applying
2151 The import file will only be applied if the precheck succeeds.
2154 The check-file follows the normal registry file syntax with the
2155 following semantics:
2158 <listitem><para><value name>=<value> checks whether the
2159 value exists and has the given value.</para></listitem>
2160 <listitem><para><value name>=- checks whether the value does
2161 not exist.</para></listitem>
2162 <listitem><para>[key] checks whether the key exists.</para>
2164 <listitem><para>[-key] checks whether the key does not exist.</para>
2173 <title>REGISTRY EXPORT <replaceable>key</replaceable><!--
2174 --><replaceable>file</replaceable><!--
2175 --><replaceable>[opt]</replaceable></title>
2177 <para>Export a <emphasis>key</emphasis> to a registration entries (.reg)
2178 <emphasis>file</emphasis>.
2183 <title>REGISTRY CONVERT <replaceable>in</replaceable> <!--
2184 --><replaceable>out</replaceable> <!--
2185 --><replaceable>[[inopt] outopt]</replaceable></title>
2187 <para>Convert a registration entries (.reg) file <emphasis>in</emphasis>.
2192 <title>REGISTRY CHECK [-ravTl] [-o <ODB>] [--wipe] [<DB>]</title>
2193 <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
2196 <varlistentry><term>-r|--repair</term>
2198 Interactive repair mode, ask a lot of questions.
2202 <varlistentry><term>-a|--auto</term>
2204 Noninteractive repair mode, use default answers.
2208 <varlistentry><term>-v|--verbose</term>
2210 Produce more output.
2214 <varlistentry><term>-T|--test</term>
2216 Dry run, show what changes would be made but don't touch anything.
2220 <varlistentry><term>-l|--lock</term>
2222 Lock the database while doing the check.
2226 <varlistentry><term>--reg-version={1,2,3}</term>
2228 Specify the format of the registry database. If not given it defaults to
2229 the value of the binary or, if an registry.tdb is explizitly stated at
2230 the commandline, to the value found in the INFO/version record.
2234 <varlistentry><term>[--db] <DB></term>
2236 Check the specified database.
2240 <varlistentry><term>-o|--output <ODB></term>
2242 Create a new registry database <ODB> instead of modifying the
2243 input. If <ODB> is already existing --wipe may be used to
2248 <varlistentry><term>--wipe</term>
2250 Replace the registry database instead of modifying the input or
2251 overwrite an existing output database.
2255 <varlistentry><term></term>
2266 <title>EVENTLOG</title>
2268 <para>Starting with version 3.4.0 net can read, dump, import and export native
2269 win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools.
2273 The import and export of evt files can only succeed when <parameter>eventlog list</parameter> is used in
2274 <emphasis>smb.conf</emphasis> file.
2275 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2278 <para>The eventlog commands are:
2280 <member>net eventlog dump - Dump a eventlog *.evt file on the screen.</member>
2281 <member>net eventlog import - Import a eventlog *.evt into the samba internal
2282 tdb based representation of eventlogs.</member>
2283 <member>net eventlog export - Export the samba internal tdb based representation
2284 of eventlogs into an eventlog *.evt file.</member>
2289 <title>EVENTLOG DUMP <replaceable>filename</replaceable></title>
2292 Prints a eventlog *.evt file to standard output.
2297 <title>EVENTLOG IMPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2300 Imports a eventlog *.evt file defined by <replaceable>filename</replaceable> into the
2301 samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>.
2302 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2303 defined in smb.conf.
2304 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2310 <title>EVENTLOG EXPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2313 Exports the samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>
2314 to a eventlog *.evt file defined by <replaceable>filename</replaceable>.
2315 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2316 defined in smb.conf.
2317 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2327 <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.
2329 <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.
2332 <para>The client side support for remote join is implemented in the net dom commands which are:
2334 <member>net dom join - Join a remote computer into a domain.</member>
2335 <member>net dom unjoin - Unjoin a remote computer from a domain.</member>
2336 <member>net dom renamecomputer - Renames a remote computer joined to a domain.</member>
2341 <title>DOM JOIN <replaceable>domain=DOMAIN</replaceable> <replaceable>ou=OU</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2344 Joins a computer into a domain. This command supports the following additional parameters:
2349 <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>
2351 <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>
2353 <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>
2355 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2357 <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>
2362 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.
2366 net dom join -S xp -U XP\\administrator%secret domain=MYDOM account=MYDOM\\administrator password=topsecret reboot.
2369 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.
2375 <title>DOM UNJOIN <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2378 Unjoins a computer from a domain. This command supports the following additional parameters:
2383 <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>
2385 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2387 <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>
2392 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.
2396 net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot.
2399 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.
2405 <title>DOM RENAMECOMPUTER <replaceable>newname=NEWNAME</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2408 Renames a computer that is joined to a domain. This command supports the following additional parameters:
2413 <listitem><para><replaceable>NEWNAME</replaceable> defines the new name of the machine in the domain.</para></listitem>
2415 <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>
2417 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2419 <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>
2424 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.
2428 net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot.
2431 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.
2439 <title>G_LOCK</title>
2441 <para>Manage global locks.</para>
2444 <title>G_LOCK DO <replaceable>lockname</replaceable> <replaceable>timeout</replaceable> <replaceable>command</replaceable></title>
2447 Execute a shell command under a global lock. This might be useful to define the
2448 order in which several shell commands will be executed. The locking information
2449 is stored in a file called <filename>g_lock.tdb</filename>. In setups with CTDB
2450 running, the locking information will be available on all cluster nodes.
2454 <listitem><para><replaceable>LOCKNAME</replaceable> defines the name of the global lock.</para></listitem>
2455 <listitem><para><replaceable>TIMEOUT</replaceable> defines the timeout.</para></listitem>
2456 <listitem><para><replaceable>COMMAND</replaceable> defines the shell command to execute.</para></listitem>
2461 <title>G_LOCK LOCKS</title>
2464 Print a list of all currently existing locknames.
2469 <title>G_LOCK DUMP <replaceable>lockname</replaceable></title>
2472 Dump the locking table of a certain global lock.
2479 <title>HELP [COMMAND]</title>
2481 <para>Gives usage information for the specified command.</para>
2488 <title>VERSION</title>
2490 <para>This man page is complete for version 3 of the Samba
2495 <title>AUTHOR</title>
2497 <para>The original Samba software and related utilities
2498 were created by Andrew Tridgell. Samba is now developed
2499 by the Samba Team as an Open Source project similar
2500 to the way the Linux kernel is developed.</para>
2502 <para>The net manpage was written by Jelmer Vernooij.</para>