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.
212 <!-- Options for net idmap -->
216 <listitem><para>Define dbfile for "net idmap" commands.
222 <listitem><para>Activates locking of the dbfile for "net idmap check" command.
227 <term>-a|--auto</term>
228 <listitem><para>Activates noninteractive mode in "net idmap check".
233 <term>--repair</term>
234 <listitem><para>Activates repair mode in "net idmap check".
238 <!-- Options for net rpc share migrate -->
242 <listitem><para>Includes ACLs to be copied in "net rpc share migrate".
248 <listitem><para>Includes file attributes to be copied in "net rpc share migrate".
253 <term>--timestamps</term>
254 <listitem><para>Includes timestamps to be copied in "net rpc share migrate".
259 <term>-X|--exclude DIRECTORY</term>
260 <listitem><para>Allows to exclude directories when copying with "net rpc share migrate".
265 <term>--destination SERVERNAME</term>
266 <listitem><para>Defines the target servername of migration process (defaults to localhost).
271 &popt.common.samba.client;
277 <title>COMMANDS</title>
280 <title>CHANGESECRETPW</title>
282 <para>This command allows the Samba machine account password to be set from an external application
283 to a machine account password that has already been stored in Active Directory. DO NOT USE this command
284 unless you know exactly what you are doing. The use of this command requires that the force flag (-f)
285 be used also. There will be NO command prompt. Whatever information is piped into stdin, either by
286 typing at the command line or otherwise, will be stored as the literal machine password. Do NOT use
287 this without care and attention as it will overwrite a legitimate machine password without warning.
288 YOU HAVE BEEN WARNED.
296 <para>The <command>NET TIME</command> command allows you to view the time on a remote server
297 or synchronise the time on the local server with the time on the remote server.</para>
302 <para>Without any options, the <command>NET TIME</command> command
303 displays the time on the remote server.
309 <title>TIME SYSTEM</title>
311 <para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.</para>
316 <title>TIME SET</title>
317 <para>Tries to set the date and time of the local server to that on
318 the remote server using <command>/bin/date</command>. </para>
323 <title>TIME ZONE</title>
325 <para>Displays the timezone in hours from GMT on the remote computer.</para>
331 <title>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [createupn=UPN]
332 [createcomputer=OU] [machinepass=PASS] [osName=string osVer=string] [options]</title>
335 Join a domain. If the account already exists on the server, and
336 [TYPE] is MEMBER, the machine will attempt to join automatically.
337 (Assuming that the machine has been created in server manager)
338 Otherwise, a password will be prompted for, and a new account may
342 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
347 [UPN] (ADS only) set the principalname attribute during the join. The default
348 format is host/netbiosname@REALM.
352 [OU] (ADS only) Precreate the computer account in a specific OU. The
353 OU string reads from top to bottom without RDNs, and is delimited by
354 a '/'. Please note that '\' is used for escape by both the shell
355 and ldap, so it may need to be doubled or quadrupled to pass through,
356 and it is not used as a delimiter.
359 [PASS] (ADS only) Set a specific password on the computer account
360 being created by the join.
363 [osName=string osVer=String] (ADS only) Set the operatingSystem and
364 operatingSystemVersion attribute during the join. Both parameters
365 must be specified for either to take effect.
370 <title>[RPC] OLDJOIN [options]</title>
372 <para>Join a domain. Use the OLDJOIN option to join the domain
373 using the old style of domain joining - you need to create a trust
374 account in server manager first.</para>
378 <title>[RPC|ADS] USER</title>
381 <title>[RPC|ADS] USER</title>
383 <para>List all users</para>
388 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
390 <para>Delete specified user</para>
395 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
397 <para>List the domain groups of the specified user.</para>
402 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
404 <para>Rename specified user.</para>
409 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
411 <para>Add specified user.</para>
416 <title>[RPC|ADS] GROUP</title>
419 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
420 <para>List user groups.</para>
424 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
426 <para>Delete specified group.</para>
431 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
433 <para>Create specified group.</para>
439 <title>[RAP|RPC] SHARE</title>
442 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
444 <para>Enumerates all exported resources (network shares) on target server.</para>
449 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
451 <para>Adds a share from a server (makes the export active). Maxusers
452 specifies the number of users that can be connected to the
453 share simultaneously.</para>
458 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
460 <para>Delete specified share.</para>
465 <title>[RPC|RAP] FILE</title>
468 <title>[RPC|RAP] FILE</title>
470 <para>List all open files on remote server.</para>
475 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
477 <para>Close file with specified <replaceable>fileid</replaceable> on
478 remote server.</para>
483 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
486 Print information on specified <replaceable>fileid</replaceable>.
487 Currently listed are: file-id, username, locks, path, permissions.
493 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
496 List files opened by specified <replaceable>user</replaceable>.
497 Please note that <command>net rap file user</command> does not work
498 against Samba servers.
506 <title>SESSION</title>
509 <title>RAP SESSION</title>
511 <para>Without any other options, SESSION enumerates all active SMB/CIFS
512 sessions on the target server.</para>
517 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
519 <para>Close the specified sessions.</para>
524 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
526 <para>Give a list with all the open files in specified session.</para>
533 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
535 <para>List all servers in specified domain or workgroup. Defaults
536 to local domain.</para>
541 <title>RAP DOMAIN</title>
543 <para>Lists all domains and workgroups visible on the
544 current network.</para>
549 <title>RAP PRINTQ</title>
552 <title>RAP PRINTQ INFO <replaceable>QUEUE_NAME</replaceable></title>
554 <para>Lists the specified print queue and print jobs on the server.
555 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all
556 queues are listed.</para>
561 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
563 <para>Delete job with specified id.</para>
570 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
573 Validate whether the specified user can log in to the
574 remote server. If the password is not specified on the commandline, it
583 <title>RAP GROUPMEMBER</title>
586 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
588 <para>List all members of the specified group.</para>
593 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
595 <para>Delete member from group.</para>
600 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
602 <para>Add member to group.</para>
609 <title>RAP ADMIN <replaceable>command</replaceable></title>
611 <para>Execute the specified <replaceable>command</replaceable> on
612 the remote server. Only works with OS/2 servers.
620 <title>RAP SERVICE</title>
623 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
625 <para>Start the specified service on the remote server. Not implemented yet.</para>
632 <title>RAP SERVICE STOP</title>
634 <para>Stop the specified service on the remote server.</para>
643 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
646 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
652 <title>LOOKUP</title>
655 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
658 Lookup the IP address of the given host with the specified type (netbios suffix).
659 The type defaults to 0x20 (workstation).
665 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
667 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
672 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
674 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
675 Defaults to local realm.</para>
680 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
682 <para>Give IP's of Domain Controllers for specified <replaceable>
683 DOMAIN</replaceable>. Defaults to local domain.</para>
688 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
690 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
691 or workgroup. Defaults to local domain.</para>
700 <para>Samba uses a general caching interface called 'gencache'. It
701 can be controlled using 'NET CACHE'.</para>
703 <para>All the timeout parameters support the suffixes:
706 <member>s - Seconds</member>
707 <member>m - Minutes</member>
708 <member>h - Hours</member>
709 <member>d - Days</member>
710 <member>w - Weeks</member>
716 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
718 <para>Add specified key+data to the cache with the given timeout.</para>
723 <title>CACHE DEL <replaceable>key</replaceable></title>
725 <para>Delete key from the cache.</para>
730 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
732 <para>Update data of existing cache entry.</para>
737 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
739 <para>Search for the specified pattern in the cache data.</para>
744 <title>CACHE LIST</title>
747 List all current items in the cache.
753 <title>CACHE FLUSH</title>
755 <para>Remove all the current items from the cache.</para>
762 <title>GETLOCALSID [DOMAIN]</title>
764 <para>Prints the SID of the specified domain, or if the parameter is
765 omitted, the SID of the local server.</para>
770 <title>SETLOCALSID S-1-5-21-x-y-z</title>
772 <para>Sets SID for the local server to the specified SID.</para>
777 <title>GETDOMAINSID</title>
779 <para>Prints the local machine SID and the SID of the current
785 <title>SETDOMAINSID</title>
787 <para>Sets the SID of the current domain.</para>
792 <title>GROUPMAP</title>
794 <para>Manage the mappings between Windows group SIDs and UNIX groups.
795 Common options include:</para>
798 <listitem><para>unixgroup - Name of the UNIX group</para></listitem>
799 <listitem><para>ntgroup - Name of the Windows NT group (must be
800 resolvable to a SID</para></listitem>
801 <listitem><para>rid - Unsigned 32-bit integer</para></listitem>
802 <listitem><para>sid - Full SID in the form of "S-1-..."</para></listitem>
803 <listitem><para>type - Type of the group; either 'domain', 'local',
804 or 'builtin'</para></listitem>
805 <listitem><para>comment - Freeform text description of the group</para></listitem>
809 <title>GROUPMAP ADD</title>
812 Add a new group mapping entry:
814 net groupmap add {rid=int|sid=string} unixgroup=string \
815 [type={domain|local}] [ntgroup=string] [comment=string]
822 <title>GROUPMAP DELETE</title>
824 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
826 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
831 <title>GROUPMAP MODIFY</title>
833 <para>Update an existing group entry.</para>
837 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \
838 [comment=string] [type={domain|local}]
844 <title>GROUPMAP LIST</title>
846 <para>List existing group mapping entries.</para>
848 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
856 <title>MAXRID</title>
858 <para>Prints out the highest RID currently in use on the local
859 server (by the active 'passdb backend').
865 <title>RPC INFO</title>
867 <para>Print information about the domain of the remote server,
868 such as domain name, domain sid and number of users and groups.
874 <title>[RPC|ADS] TESTJOIN</title>
876 <para>Check whether participation in a domain is still valid.</para>
881 <title>[RPC|ADS] CHANGETRUSTPW</title>
883 <para>Force change of domain trust password.</para>
888 <title>RPC TRUSTDOM</title>
891 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
893 <para>Add a interdomain trust account for <replaceable>DOMAIN</replaceable>.
894 This is in fact a Samba account named <replaceable>DOMAIN$</replaceable>
895 with the account flag <constant>'I'</constant> (interdomain trust account).
896 This is required for incoming trusts to work. It makes Samba be a
897 trusted domain of the foreign (trusting) domain.
898 Users of the Samba domain will be made available in the foreign domain.
899 If the command is used against localhost it has the same effect as
900 <command>smbpasswd -a -i DOMAIN</command>. Please note that both commands
901 expect a appropriate UNIX account.
907 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
909 <para>Remove interdomain trust account for
910 <replaceable>DOMAIN</replaceable>. If it is used against localhost
911 it has the same effect as <command>smbpasswd -x DOMAIN$</command>.
917 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
920 Establish a trust relationship to a trusted domain.
921 Interdomain account must already be created on the remote PDC.
922 This is required for outgoing trusts to work. It makes Samba be a
923 trusting domain of a foreign (trusted) domain.
924 Users of the foreign domain will be made available in our domain.
925 You'll need winbind and a working idmap config to make them
926 appear in your system.
932 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
933 <para>Abandon relationship to trusted domain</para>
938 <title>RPC TRUSTDOM LIST</title>
940 <para>List all interdomain trust relationships.</para>
946 <title>RPC TRUST</title>
949 <title>RPC TRUST CREATE</title>
951 <para>Create a trust object by calling lsaCreateTrustedDomainEx2.
952 The can be done on a single server or on two servers at once with the
953 possibility to use a random trust password.</para>
955 <variablelist><title>Options:</title>
957 <term>otherserver</term>
958 <listitem><para>Domain controller of the second domain</para></listitem>
962 <term>otheruser</term>
963 <listitem><para>Admin user in the second domain</para></listitem>
967 <term>otherdomainsid</term>
968 <listitem><para>SID of the second domain</para></listitem>
972 <term>other_netbios_domain</term>
973 <listitem><para>NetBIOS (short) name of the second domain</para></listitem>
977 <term>otherdomain</term>
978 <listitem><para>DNS (full) name of the second domain</para></listitem>
983 <listitem><para>Trust password</para></listitem>
987 <variablelist><title>Examples:</title>
989 <term>Create a trust object on srv1.dom1.dom for the domain dom2</term>
990 <listitem><literallayout>
991 net rpc trust create \
992 otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
993 other_netbios_domain=dom2 \
994 otherdomain=dom2.dom \
997 </literallayout></listitem>
1000 <term>Create a trust relationship between dom1 and dom2</term>
1001 <listitem><literallayout>
1002 net rpc trust create \
1003 otherserver=srv2.dom2.test \
1006 </literallayout></listitem>
1012 <title>RPC TRUST DELETE</title>
1014 <para>Delete a trust object by calling lsaDeleteTrustedDomain.
1015 The can be done on a single server or on two servers at once.</para>
1017 <variablelist><title>Options:</title>
1019 <term>otherserver</term>
1020 <listitem><para>Domain controller of the second domain</para></listitem>
1024 <term>otheruser</term>
1025 <listitem><para>Admin user in the second domain</para></listitem>
1029 <term>otherdomainsid</term>
1030 <listitem><para>SID of the second domain</para></listitem>
1034 <variablelist><title>Examples:</title>
1036 <term>Delete a trust object on srv1.dom1.dom for the domain dom2</term>
1037 <listitem><literallayout>
1038 net rpc trust delete \
1039 otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
1041 </literallayout></listitem>
1044 <term>Delete a trust relationship between dom1 and dom2</term>
1045 <listitem><literallayout>
1046 net rpc trust delete \
1047 otherserver=srv2.dom2.test \
1050 </literallayout></listitem>
1059 <title>RPC RIGHTS</title>
1061 <para>This subcommand is used to view and manage Samba's rights assignments (also
1062 referred to as privileges). There are three options currently available:
1063 <parameter>list</parameter>, <parameter>grant</parameter>, and
1064 <parameter>revoke</parameter>. More details on Samba's privilege model and its use
1065 can be found in the Samba-HOWTO-Collection.</para>
1073 <title>RPC ABORTSHUTDOWN</title>
1075 <para>Abort the shutdown of a remote server.</para>
1080 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
1082 <para>Shut down the remote server.</para>
1088 Reboot after shutdown.
1095 Force shutting down all applications.
1100 <term>-t timeout</term>
1102 Timeout before system will be shut down. An interactive
1103 user of the system can use this time to cancel the shutdown.
1108 <term>-C message</term>
1109 <listitem><para>Display the specified message on the screen to
1110 announce the shutdown.</para></listitem>
1117 <title>RPC SAMDUMP</title>
1119 <para>Print out sam database of remote server. You need
1120 to run this against the PDC, from a Samba machine joined as a BDC. </para>
1124 <title>RPC VAMPIRE</title>
1126 <para>Export users, aliases and groups from remote server to
1127 local server. You need to run this against the PDC, from a Samba machine joined as a BDC.
1132 <title>RPC VAMPIRE KEYTAB</title>
1134 <para>Dump remote SAM database to local Kerberos keytab file.
1139 <title>RPC VAMPIRE LDIF</title>
1141 <para>Dump remote SAM database to local LDIF file or standard output.
1146 <title>RPC GETSID</title>
1148 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename> (or <filename>secrets.ntdb</filename>). </para>
1153 <title>ADS LEAVE</title>
1155 <para>Make the remote host leave the domain it is part of. </para>
1160 <title>ADS STATUS</title>
1162 <para>Print out status of machine account of the local machine in ADS.
1163 Prints out quite some debug info. Aimed at developers, regular
1164 users should use <command>NET ADS TESTJOIN</command>.</para>
1169 <title>ADS PRINTER</title>
1172 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
1175 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the
1176 server name defaults to the local host.</para>
1181 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
1183 <para>Publish specified printer using ADS.</para>
1188 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
1190 <para>Remove specified printer from ADS directory.</para>
1197 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
1199 <para>Perform a raw LDAP search on a ADS server and dump the results. The
1200 expression is a standard LDAP search expression, and the
1201 attributes are a list of LDAP fields to show in the results.</para>
1203 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
1209 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
1212 Perform a raw LDAP search on a ADS server and dump the results. The
1213 DN standard LDAP DN, and the attributes are a list of LDAP fields
1214 to show in the result.
1217 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
1222 <title>ADS WORKGROUP</title>
1224 <para>Print out workgroup name for specified kerberos realm.</para>
1229 <title>SAM CREATEBUILTINGROUP <NAME></title>
1232 (Re)Create a BUILTIN group.
1233 Only a wellknown set of BUILTIN groups can be created with this command.
1234 This is the list of currently recognized group names: Administrators,
1235 Users, Guests, Power Users, Account Operators, Server Operators, Print
1236 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
1239 This command requires a running Winbindd with idmap allocation properly
1240 configured. The group gid will be allocated out of the winbindd range.
1246 <title>SAM CREATELOCALGROUP <NAME></title>
1249 Create a LOCAL group (also known as Alias).
1251 This command requires a running Winbindd with idmap allocation properly
1252 configured. The group gid will be allocated out of the winbindd range.
1258 <title>SAM DELETELOCALGROUP <NAME></title>
1261 Delete an existing LOCAL group (also known as Alias).
1268 <title>SAM MAPUNIXGROUP <NAME></title>
1271 Map an existing Unix group and make it a Domain Group, the domain group
1272 will have the same name.
1278 <title>SAM UNMAPUNIXGROUP <NAME></title>
1281 Remove an existing group mapping entry.
1287 <title>SAM ADDMEM <GROUP> <MEMBER></title>
1290 Add a member to a Local group. The group can be specified only by name,
1291 the member can be specified by name or SID.
1297 <title>SAM DELMEM <GROUP> <MEMBER></title>
1300 Remove a member from a Local group. The group and the member must be
1307 <title>SAM LISTMEM <GROUP></title>
1310 List Local group members. The group must be specified by name.
1316 <title>SAM LIST <users|groups|localgroups|builtin|workstations> [verbose]</title>
1319 List the specified set of accounts by name. If verbose is specified,
1320 the rid and description is also provided for each account.
1326 <title>SAM RIGHTS LIST</title>
1329 List all available privileges.
1335 <title>SAM RIGHTS GRANT <NAME> <PRIVILEGE></title>
1338 Grant one or more privileges to a user.
1344 <title>SAM RIGHTS REVOKE <NAME> <PRIVILEGE></title>
1347 Revoke one or more privileges from a user.
1353 <title>SAM SHOW <NAME></title>
1356 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1363 <title>SAM SET HOMEDIR <NAME> <DIRECTORY></title>
1366 Set the home directory for a user account.
1372 <title>SAM SET PROFILEPATH <NAME> <PATH></title>
1375 Set the profile path for a user account.
1381 <title>SAM SET COMMENT <NAME> <COMMENT></title>
1384 Set the comment for a user or group account.
1390 <title>SAM SET FULLNAME <NAME> <FULL NAME></title>
1393 Set the full name for a user account.
1399 <title>SAM SET LOGONSCRIPT <NAME> <SCRIPT></title>
1402 Set the logon script for a user account.
1408 <title>SAM SET HOMEDRIVE <NAME> <DRIVE></title>
1411 Set the home drive for a user account.
1417 <title>SAM SET WORKSTATIONS <NAME> <WORKSTATIONS></title>
1420 Set the workstations a user account is allowed to log in from.
1426 <title>SAM SET DISABLE <NAME></title>
1429 Set the "disabled" flag for a user account.
1435 <title>SAM SET PWNOTREQ <NAME></title>
1438 Set the "password not required" flag for a user account.
1444 <title>SAM SET AUTOLOCK <NAME></title>
1447 Set the "autolock" flag for a user account.
1453 <title>SAM SET PWNOEXP <NAME></title>
1456 Set the "password do not expire" flag for a user account.
1462 <title>SAM SET PWDMUSTCHANGENOW <NAME> [yes|no]</title>
1465 Set or unset the "password must change" flag for a user account.
1471 <title>SAM POLICY LIST</title>
1474 List the available account policies.
1480 <title>SAM POLICY SHOW <account policy></title>
1483 Show the account policy value.
1489 <title>SAM POLICY SET <account policy> <value></title>
1492 Set a value for the account policy.
1493 Valid values can be: "forever", "never", "off", or a number.
1499 <title>SAM PROVISION</title>
1502 Only available if ldapsam:editposix is set and winbindd is running.
1503 Properly populates the ldap tree with the basic accounts (Administrator)
1504 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1510 <title>IDMAP DUMP <local tdb file name></title>
1513 Dumps the mappings contained in the local tdb file specified.
1514 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1520 <title>IDMAP RESTORE [input file]</title>
1523 Restore the mappings from the specified file or stdin.
1529 <title>IDMAP SET SECRET <DOMAIN> <secret></title>
1532 Store a secret for the specified domain, used primarily for domains
1533 that use idmap_ldap as a backend. In this case the secret is used
1534 as the password for the user DN used to bind to the ldap server.
1540 <title>IDMAP SET RANGE <RANGE> <SID> [index] [--db=<DB>]</title>
1543 Store a domain-range mapping for a given domain (and index) in autorid database.
1549 <title>IDMAP SET CONFIG <config> [--db=<DB>]</title>
1552 Update CONFIG entry in autorid database.
1558 <title>IDMAP GET RANGE <SID> [index] [--db=<DB>]</title>
1561 Get the range for a given domain and index from autorid database.
1567 <title>IDMAP GET RANGES [<SID>] [--db=<DB>]</title>
1570 Get ranges for all domains or for one identified by given SID.
1576 <title>IDMAP GET CONFIG [--db=<DB>]</title>
1579 Get CONFIG entry from autorid database.
1586 <title>IDMAP DELETE MAPPING [-f] [--db=<DB>] <ID></title>
1589 Delete a mapping sid <-> gid or sid <-> uid from the IDMAP database.
1590 The mapping is given by <ID> which may either be a sid: S-x-..., a gid: "GID number" or a uid: "UID number".
1591 Use -f to delete an invalid partial mapping <ID> -> xx
1594 Use "smbcontrol all idmap ..." to notify running smbd instances.
1595 See the <citerefentry><refentrytitle>smbcontrol</refentrytitle>
1596 <manvolnum>1</manvolnum></citerefentry> manpage for details.
1601 <title>IDMAP DELETE RANGE [-f] [--db=<TDB>] <RANGE>|(<SID> [<INDEX>])</title>
1604 Delete a domain range mapping identified by 'RANGE' or "domain SID and INDEX" from autorid database.
1605 Use -f to delete invalid mappings.
1611 <title>IDMAP DELETE RANGES [-f] [--db=<TDB>] <SID></title>
1614 Delete all domain range mappings for a domain identified by SID.
1615 Use -f to delete invalid mappings.
1622 <title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=<DB>]</title>
1625 Check and repair the IDMAP database. If no option is given a read only check
1626 of the database is done. Among others an interactive or automatic repair mode
1627 may be chosen with one of the following options:
1630 <varlistentry><term>-r|--repair</term>
1632 Interactive repair mode, ask a lot of questions.
1636 <varlistentry><term>-a|--auto</term>
1638 Noninteractive repair mode, use default answers.
1642 <varlistentry><term>-v|--verbose</term>
1644 Produce more output.
1648 <varlistentry><term>-f|--force</term>
1650 Try to apply changes, even if they do not apply cleanly.
1654 <varlistentry><term>-T|--test</term>
1656 Dry run, show what changes would be made but don't touch anything.
1660 <varlistentry><term>-l|--lock</term>
1662 Lock the database while doing the check.
1666 <varlistentry><term>--db <DB></term>
1668 Check the specified database.
1671 <varlistentry><term></term>
1677 It reports about the finding of the following errors:
1680 <varlistentry><term>Missing reverse mapping:</term>
1682 A record with mapping A->B where there is no B->A. Default action
1683 in repair mode is to "fix" this by adding the reverse mapping.
1687 <varlistentry><term>Invalid mapping:</term>
1689 A record with mapping A->B where B->C. Default action
1690 is to "delete" this record.
1694 <varlistentry><term>Missing or invalid HWM:</term>
1696 A high water mark is not at least equal to the largest ID in the
1697 database. Default action is to "fix" this by setting it to the
1698 largest ID found +1.
1702 <varlistentry><term>Invalid record:</term>
1704 Something we failed to parse. Default action is to "edit" it
1705 in interactive and "delete" it in automatic mode.
1714 <title>USERSHARE</title>
1716 <para>Starting with version 3.0.23, a Samba server now supports the ability for
1717 non-root users to add user defined shares to be exported using the "net usershare"
1722 To set this up, first set up your smb.conf by adding to the [global] section:
1724 usershare path = /usr/local/samba/lib/usershares
1726 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
1727 set the group owner to the UNIX group who should have the ability to create usershares,
1728 for example a group called "serverops".
1730 Set the permissions on /usr/local/samba/lib/usershares to 01770.
1732 (Owner and group all access, no access for others, plus the sticky bit,
1733 which means that a file in that directory can be renamed or deleted only
1734 by the owner of the file).
1736 Finally, tell smbd how many usershares you will allow by adding to the [global]
1737 section of smb.conf a line such as :
1739 usershare max shares = 100.
1741 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
1742 can create user defined shares on demand using the commands below.
1745 <para>The usershare commands are:
1748 <member>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</member>
1749 <member>net usershare delete sharename - to delete a user defined share.</member>
1750 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
1751 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
1757 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
1760 Add or replace a new user defined share, with name "sharename".
1764 "path" specifies the absolute pathname on the system to be exported.
1765 Restrictions may be put on this, see the global smb.conf parameters:
1766 "usershare owner only", "usershare prefix allow list", and
1767 "usershare prefix deny list".
1771 The optional "comment" parameter is the comment that will appear
1772 on the share when browsed to by a client.
1775 <para>The optional "acl" field
1776 specifies which users have read and write access to the entire share.
1777 Note that guest connections are not allowed unless the smb.conf parameter
1778 "usershare allow guests" has been set. The definition of a user
1779 defined share acl is: "user:permission", where user is a valid
1780 username on the system and permission can be "F", "R", or "D".
1781 "F" stands for "full permissions", ie. read and write permissions.
1782 "D" stands for "deny" for a user, ie. prevent this user from accessing
1784 "R" stands for "read only", ie. only allow read access to this
1785 share (no creation of new files or directories or writing to files).
1789 The default if no "acl" is given is "Everyone:R", which means any
1790 authenticated user has read-only access.
1794 The optional "guest_ok" has the same effect as the parameter of the
1795 same name in smb.conf, in that it allows guest access to this user
1796 defined share. This parameter is only allowed if the global parameter
1797 "usershare allow guests" has been set to true in the smb.conf.
1800 There is no separate command to modify an existing user defined share,
1801 just use the "net usershare add [sharename]" command using the same
1802 sharename as the one you wish to modify and specify the new options
1803 you wish. The Samba smbd daemon notices user defined share modifications
1804 at connect time so will see the change immediately, there is no need
1805 to restart smbd on adding, deleting or changing a user defined share.
1809 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
1812 Deletes the user defined share by name. The Samba smbd daemon
1813 immediately notices this change, although it will not disconnect
1814 any users currently connected to the deleted share.
1820 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1823 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1827 net usershare info on its own dumps out info on the user defined shares that were
1828 created by the current user, or restricts them to share names that match the given
1829 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1830 If the '-l' or '--long' option is also given, it prints out info on user defined
1831 shares created by other users.
1835 The information given about a share looks like:
1840 usershare_acl=Everyone:F
1843 And is a list of the current settings of the user defined share that can be
1844 modified by the "net usershare add" command.
1850 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
1853 List all the user defined shares owned by the current user matching the given pattern, or all users.
1857 net usershare list on its own list out the names of the user defined shares that were
1858 created by the current user, or restricts the list to share names that match the given
1859 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1860 If the '-l' or '--long' option is also given, it includes the names of user defined
1861 shares created by other users.
1869 <title>[RPC] CONF</title>
1871 <para>Starting with version 3.2.0, a Samba server can be configured by data
1872 stored in registry. This configuration data can be edited with the new "net
1873 conf" commands. There is also the possibility to configure a remote Samba server
1874 by enabling the RPC conf mode and specifying the address of the remote server.
1878 The deployment of this configuration data can be activated in two levels from the
1879 <emphasis>smb.conf</emphasis> file: Share definitions from registry are
1880 activated by setting <parameter>registry shares</parameter> to
1881 <quote>yes</quote> in the [global] section and global configuration options are
1882 activated by setting <smbconfoption name="include">registry</smbconfoption> in
1883 the [global] section for a mixed configuration or by setting
1884 <smbconfoption name="config backend">registry</smbconfoption> in the [global]
1885 section for a registry-only configuration.
1886 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
1887 <manvolnum>5</manvolnum></citerefentry> manpage for details.
1890 <para>The conf commands are:
1892 <member>net [rpc] conf list - Dump the complete configuration in smb.conf like
1894 <member>net [rpc] conf import - Import configuration from file in smb.conf
1896 <member>net [rpc] conf listshares - List the registry shares.</member>
1897 <member>net [rpc] conf drop - Delete the complete configuration from
1899 <member>net [rpc] conf showshare - Show the definition of a registry share.</member>
1900 <member>net [rpc] conf addshare - Create a new registry share.</member>
1901 <member>net [rpc] conf delshare - Delete a registry share.</member>
1902 <member>net [rpc] conf setparm - Store a parameter.</member>
1903 <member>net [rpc] conf getparm - Retrieve the value of a parameter.</member>
1904 <member>net [rpc] conf delparm - Delete a parameter.</member>
1905 <member>net [rpc] conf getincludes - Show the includes of a share definition.</member>
1906 <member>net [rpc] conf setincludes - Set includes for a share.</member>
1907 <member>net [rpc] conf delincludes - Delete includes from a share definition.</member>
1912 <title>[RPC] CONF LIST</title>
1915 Print the configuration data stored in the registry in a smb.conf-like format to
1921 <title>[RPC] CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
1924 This command imports configuration from a file in smb.conf format.
1925 If a section encountered in the input file is present in registry,
1926 its contents is replaced. Sections of registry configuration that have
1927 no counterpart in the input file are not affected. If you want to delete these,
1928 you will have to use the "net conf drop" or "net conf delshare" commands.
1929 Optionally, a section may be specified to restrict the effect of the
1930 import command to that specific section. A test mode is enabled by specifying
1931 the parameter "-T" on the commandline. In test mode, no changes are made to the
1932 registry, and the resulting configuration is printed to standard output instead.
1937 <title>[RPC] CONF LISTSHARES</title>
1940 List the names of the shares defined in registry.
1945 <title>[RPC] CONF DROP</title>
1948 Delete the complete configuration data from registry.
1953 <title>[RPC] CONF SHOWSHARE <replaceable>sharename</replaceable></title>
1956 Show the definition of the share or section specified. It is valid to specify
1957 "global" as sharename to retrieve the global configuration options from
1963 <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>
1965 <para>Create a new share definition in registry.
1966 The sharename and path have to be given. The share name may
1967 <emphasis>not</emphasis> be "global". Optionally, values for the very
1968 common options "writeable", "guest ok" and a "comment" may be specified.
1969 The same result may be obtained by a sequence of "net conf setparm"
1975 <title>[RPC] CONF DELSHARE <replaceable>sharename</replaceable></title>
1978 Delete a share definition from registry.
1983 <title>[RPC] CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
1986 Store a parameter in registry. The section may be global or a sharename.
1987 The section is created if it does not exist yet.
1992 <title>[RPC] CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1995 Show a parameter stored in registry.
2000 <title>[RPC] CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
2003 Delete a parameter stored in registry.
2008 <title>[RPC] CONF GETINCLUDES <replaceable>section</replaceable></title>
2011 Get the list of includes for the provided section (global or share).
2015 Note that due to the nature of the registry database and the nature of include directives,
2016 the includes need special treatment: Parameters are stored in registry by the parameter
2017 name as valuename, so there is only ever one instance of a parameter per share.
2018 Also, a specific order like in a text file is not guaranteed. For all real
2019 parameters, this is perfectly ok, but the include directive is rather a meta
2020 parameter, for which, in the smb.conf text file, the place where it is specified
2021 between the other parameters is very important. This can not be achieved by the
2022 simple registry smbconf data model, so there is one ordered list of includes
2023 per share, and this list is evaluated after all the parameters of the share.
2027 Further note that currently, only files can be included from registry
2028 configuration. In the future, there will be the ability to include configuration
2029 data from other registry keys.
2034 <title>[RPC] CONF SETINCLUDES <replaceable>section</replaceable> [<replaceable>filename</replaceable>]+</title>
2037 Set the list of includes for the provided section (global or share) to the given
2038 list of one or more filenames. The filenames may contain the usual smb.conf
2044 <title>[RPC] CONF DELINCLUDES <replaceable>section</replaceable></title>
2047 Delete the list of includes from the provided section (global or share).
2054 <title>REGISTRY</title>
2056 Manipulate Samba's registry.
2059 <para>The registry commands are:
2061 <member>net registry enumerate - Enumerate registry keys and values.</member>
2062 <member>net registry enumerate_recursive - Enumerate registry key and its subkeys.</member>
2063 <member>net registry createkey - Create a new registry key.</member>
2064 <member>net registry deletekey - Delete a registry key.</member>
2065 <member>net registry deletekey_recursive - Delete a registry key with subkeys.</member>
2066 <member>net registry getvalue - Print a registry value.</member>
2067 <member>net registry getvalueraw - Print a registry value (raw format).</member>
2068 <member>net registry setvalue - Set a new registry value.</member>
2069 <member>net registry increment - Increment a DWORD registry value under a lock.
2071 <member>net registry deletevalue - Delete a registry value.</member>
2072 <member>net registry getsd - Get security descriptor.</member>
2073 <member>net registry getsd_sdd1 - Get security descriptor in sddl format.
2075 <member>net registry setsd_sdd1 - Set security descriptor from sddl format
2077 <member>net registry import - Import a registration entries (.reg) file.
2079 <member>net registry export - Export a registration entries (.reg) file.
2081 <member>net registry convert - Convert a registration entries (.reg) file.
2083 <member>net registry check - Check and repair a registry database.
2089 <title>REGISTRY ENUMERATE <replaceable>key</replaceable> </title>
2090 <para>Enumerate subkeys and values of <emphasis>key</emphasis>.
2095 <title>REGISTRY ENUMERATE_RECURSIVE <replaceable>key</replaceable> </title>
2096 <para>Enumerate values of <emphasis>key</emphasis> and its subkeys.
2101 <title>REGISTRY CREATEKEY <replaceable>key</replaceable> </title>
2102 <para>Create a new <emphasis>key</emphasis> if not yet existing.
2107 <title>REGISTRY DELETEKEY <replaceable>key</replaceable> </title>
2108 <para>Delete the given <emphasis>key</emphasis> and its
2109 values from the registry, if it has no subkeys.
2114 <title>REGISTRY DELETEKEY_RECURSIVE <replaceable>key</replaceable> </title>
2115 <para>Delete the given <emphasis>key</emphasis> and all of its
2116 subkeys and values from the registry.
2121 <title>REGISTRY GETVALUE <replaceable>key</replaceable> <!--
2122 --><replaceable>name</replaceable></title>
2124 <para>Output type and actual value of the value <emphasis>name</emphasis>
2125 of the given <emphasis>key</emphasis>.
2130 <title>REGISTRY GETVALUERAW <replaceable>key</replaceable> <!--
2131 --><replaceable>name</replaceable></title>
2132 <para>Output the actual value of the value <emphasis>name</emphasis>
2133 of the given <emphasis>key</emphasis>.
2138 <title>REGISTRY SETVALUE <replaceable>key</replaceable> <!--
2139 --><replaceable>name</replaceable> <replaceable>type</replaceable> <!--
2140 --><replaceable>value</replaceable> ...<!--
2143 <para>Set the value <emphasis>name</emphasis>
2144 of an existing <emphasis>key</emphasis>.
2145 <emphasis>type</emphasis> may be one of
2146 <emphasis>sz</emphasis>, <emphasis>multi_sz</emphasis> or
2147 <emphasis>dword</emphasis>.
2148 In case of <emphasis>multi_sz</emphasis> <replaceable>value</replaceable> may
2149 be given multiple times.
2154 <title>REGISTRY INCREMENT <replaceable>key</replaceable> <!--
2155 --><replaceable>name</replaceable> <replaceable>[inc]</replaceable><!--
2158 <para>Increment the DWORD value <emphasis>name</emphasis>
2159 of <emphasis>key</emphasis> by <replaceable>inc</replaceable>
2160 while holding a g_lock.
2161 <emphasis>inc</emphasis> defaults to 1.
2166 <title>REGISTRY DELETEVALUE <replaceable>key</replaceable> <!--
2167 --><replaceable>name</replaceable></title>
2169 <para>Delete the value <emphasis>name</emphasis>
2170 of the given <emphasis>key</emphasis>.
2175 <title>REGISTRY GETSD <replaceable>key</replaceable></title>
2177 <para>Get the security descriptor of the given <emphasis>key</emphasis>.
2182 <title>REGISTRY GETSD_SDDL <replaceable>key</replaceable></title>
2184 <para>Get the security descriptor of the given <emphasis>key</emphasis> as a
2185 Security Descriptor Definition Language (SDDL) string.
2190 <title>REGISTRY SETSD_SDDL <replaceable>key</replaceable><!--
2191 --><replaceable>sd</replaceable></title>
2193 <para>Set the security descriptor of the given <emphasis>key</emphasis> from a
2194 Security Descriptor Definition Language (SDDL) string <emphasis>sd</emphasis>.
2199 <title>REGISTRY IMPORT <replaceable>file</replaceable><!--
2200 --><replaceable> [--precheck <check-file>] [opt]</replaceable></title>
2201 <para>Import a registration entries (.reg) <emphasis>file</emphasis>.</para>
2202 <para>The following options are available:</para>
2204 <varlistentry><term>--precheck <replaceable>check-file</replaceable></term>
2206 This is a mechanism to check the existence or non-existence of
2207 certain keys or values specified in a precheck file before applying
2209 The import file will only be applied if the precheck succeeds.
2212 The check-file follows the normal registry file syntax with the
2213 following semantics:
2216 <listitem><para><value name>=<value> checks whether the
2217 value exists and has the given value.</para></listitem>
2218 <listitem><para><value name>=- checks whether the value does
2219 not exist.</para></listitem>
2220 <listitem><para>[key] checks whether the key exists.</para>
2222 <listitem><para>[-key] checks whether the key does not exist.</para>
2231 <title>REGISTRY EXPORT <replaceable>key</replaceable><!--
2232 --><replaceable>file</replaceable><!--
2233 --><replaceable>[opt]</replaceable></title>
2235 <para>Export a <emphasis>key</emphasis> to a registration entries (.reg)
2236 <emphasis>file</emphasis>.
2241 <title>REGISTRY CONVERT <replaceable>in</replaceable> <!--
2242 --><replaceable>out</replaceable> <!--
2243 --><replaceable>[[inopt] outopt]</replaceable></title>
2245 <para>Convert a registration entries (.reg) file <emphasis>in</emphasis>.
2250 <title>REGISTRY CHECK [-ravTl] [-o <ODB>] [--wipe] [<DB>]</title>
2251 <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
2254 <varlistentry><term>-r|--repair</term>
2256 Interactive repair mode, ask a lot of questions.
2260 <varlistentry><term>-a|--auto</term>
2262 Noninteractive repair mode, use default answers.
2266 <varlistentry><term>-v|--verbose</term>
2268 Produce more output.
2272 <varlistentry><term>-T|--test</term>
2274 Dry run, show what changes would be made but don't touch anything.
2278 <varlistentry><term>-l|--lock</term>
2280 Lock the database while doing the check.
2284 <varlistentry><term>--reg-version={1,2,3}</term>
2286 Specify the format of the registry database. If not given it defaults to
2287 the value of the binary or, if an registry.tdb is explizitly stated at
2288 the commandline, to the value found in the INFO/version record.
2292 <varlistentry><term>[--db] <DB></term>
2294 Check the specified database.
2298 <varlistentry><term>-o|--output <ODB></term>
2300 Create a new registry database <ODB> instead of modifying the
2301 input. If <ODB> is already existing --wipe may be used to
2306 <varlistentry><term>--wipe</term>
2308 Replace the registry database instead of modifying the input or
2309 overwrite an existing output database.
2313 <varlistentry><term></term>
2324 <title>EVENTLOG</title>
2326 <para>Starting with version 3.4.0 net can read, dump, import and export native
2327 win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools.
2331 The import and export of evt files can only succeed when <parameter>eventlog list</parameter> is used in
2332 <emphasis>smb.conf</emphasis> file.
2333 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2336 <para>The eventlog commands are:
2338 <member>net eventlog dump - Dump a eventlog *.evt file on the screen.</member>
2339 <member>net eventlog import - Import a eventlog *.evt into the samba internal
2340 tdb based representation of eventlogs.</member>
2341 <member>net eventlog export - Export the samba internal tdb based representation
2342 of eventlogs into an eventlog *.evt file.</member>
2347 <title>EVENTLOG DUMP <replaceable>filename</replaceable></title>
2350 Prints a eventlog *.evt file to standard output.
2355 <title>EVENTLOG IMPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2358 Imports a eventlog *.evt file defined by <replaceable>filename</replaceable> into the
2359 samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>.
2360 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2361 defined in smb.conf.
2362 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2368 <title>EVENTLOG EXPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2371 Exports the samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>
2372 to a eventlog *.evt file defined by <replaceable>filename</replaceable>.
2373 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2374 defined in smb.conf.
2375 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2385 <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.
2387 <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.
2390 <para>The client side support for remote join is implemented in the net dom commands which are:
2392 <member>net dom join - Join a remote computer into a domain.</member>
2393 <member>net dom unjoin - Unjoin a remote computer from a domain.</member>
2394 <member>net dom renamecomputer - Renames a remote computer joined to a domain.</member>
2399 <title>DOM JOIN <replaceable>domain=DOMAIN</replaceable> <replaceable>ou=OU</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2402 Joins a computer into a domain. This command supports the following additional parameters:
2407 <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>
2409 <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>
2411 <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>
2413 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2415 <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>
2420 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.
2424 net dom join -S xp -U XP\\administrator%secret domain=MYDOM account=MYDOM\\administrator password=topsecret reboot.
2427 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.
2433 <title>DOM UNJOIN <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2436 Unjoins a computer from a domain. This command supports the following additional parameters:
2441 <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>
2443 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2445 <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>
2450 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.
2454 net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot.
2457 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.
2463 <title>DOM RENAMECOMPUTER <replaceable>newname=NEWNAME</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2466 Renames a computer that is joined to a domain. This command supports the following additional parameters:
2471 <listitem><para><replaceable>NEWNAME</replaceable> defines the new name of the machine in the domain.</para></listitem>
2473 <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>
2475 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2477 <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>
2482 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.
2486 net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot.
2489 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.
2497 <title>G_LOCK</title>
2499 <para>Manage global locks.</para>
2502 <title>G_LOCK DO <replaceable>lockname</replaceable> <replaceable>timeout</replaceable> <replaceable>command</replaceable></title>
2505 Execute a shell command under a global lock. This might be useful to define the
2506 order in which several shell commands will be executed. The locking information
2507 is stored in a file called <filename>g_lock.tdb</filename>. In setups with CTDB
2508 running, the locking information will be available on all cluster nodes.
2512 <listitem><para><replaceable>LOCKNAME</replaceable> defines the name of the global lock.</para></listitem>
2513 <listitem><para><replaceable>TIMEOUT</replaceable> defines the timeout.</para></listitem>
2514 <listitem><para><replaceable>COMMAND</replaceable> defines the shell command to execute.</para></listitem>
2519 <title>G_LOCK LOCKS</title>
2522 Print a list of all currently existing locknames.
2527 <title>G_LOCK DUMP <replaceable>lockname</replaceable></title>
2530 Dump the locking table of a certain global lock.
2537 <title>HELP [COMMAND]</title>
2539 <para>Gives usage information for the specified command.</para>
2546 <title>VERSION</title>
2548 <para>This man page is complete for version 3 of the Samba
2553 <title>AUTHOR</title>
2555 <para>The original Samba software and related utilities
2556 were created by Andrew Tridgell. Samba is now developed
2557 by the Samba Team as an Open Source project similar
2558 to the way the Linux kernel is developed.</para>
2560 <para>The net manpage was written by Jelmer Vernooij.</para>