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">3.6</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</arg>
26 <arg choice="opt">-w workgroup</arg>
27 <arg choice="opt">-W myworkgroup</arg>
28 <arg choice="opt">-U user</arg>
29 <arg choice="opt">-I ip-address</arg>
30 <arg choice="opt">-p port</arg>
31 <arg choice="opt">-n myname</arg>
32 <arg choice="opt">-s conffile</arg>
33 <arg choice="opt">-S server</arg>
34 <arg choice="opt">-l</arg>
35 <arg choice="opt">-P</arg>
36 <arg choice="opt">-d debuglevel</arg>
37 <arg choice="opt">-V</arg>
38 <arg choice="opt">--request-timeout seconds</arg>
43 <title>DESCRIPTION</title>
45 <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
46 <manvolnum>7</manvolnum></citerefentry> suite.</para>
48 <para>The Samba net utility is meant to work just like the net utility
49 available for windows and DOS. The first argument should be used
50 to specify the protocol to use when executing a certain command.
51 ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3)
52 clients and RPC can be used for NT4 and Windows 2000. If this
53 argument is omitted, net will try to determine it automatically.
54 Not all commands are available on all protocols.
60 <title>OPTIONS</title>
67 <term>-w target-workgroup</term>
69 Sets target workgroup or domain. You have to specify
70 either this option or the IP address or the name of a server.
75 <term>-W workgroup</term>
77 Sets client workgroup or domain
89 <term>-I ip-address</term>
91 IP address of target server to use. You have to
92 specify either this option or a target workgroup or
100 Port on the target server to connect to (usually 139 or 445).
101 Defaults to trying 445 first, then 139.
105 &stdarg.netbios.name;
109 <term>-S server</term>
111 Name of target server. You should specify either
112 this option or a target workgroup or a target IP address.
119 When listing data, give more information on each item.
126 Make queries to the external server using the machine account of the local server.
131 <term>--request-timeout 30</term>
133 Let client requests timeout after 30 seconds the default is 10
138 &stdarg.server.debug;
143 <title>COMMANDS</title>
146 <title>CHANGESECRETPW</title>
148 <para>This command allows the Samba machine account password to be set from an external application
149 to a machine account password that has already been stored in Active Directory. DO NOT USE this command
150 unless you know exactly what you are doing. The use of this command requires that the force flag (-f)
151 be used also. There will be NO command prompt. Whatever information is piped into stdin, either by
152 typing at the command line or otherwise, will be stored as the literal machine password. Do NOT use
153 this without care and attention as it will overwrite a legitimate machine password without warning.
154 YOU HAVE BEEN WARNED.
162 <para>The <command>NET TIME</command> command allows you to view the time on a remote server
163 or synchronise the time on the local server with the time on the remote server.</para>
168 <para>Without any options, the <command>NET TIME</command> command
169 displays the time on the remote server.
175 <title>TIME SYSTEM</title>
177 <para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.</para>
182 <title>TIME SET</title>
183 <para>Tries to set the date and time of the local server to that on
184 the remote server using <command>/bin/date</command>. </para>
189 <title>TIME ZONE</title>
191 <para>Displays the timezone in hours from GMT on the remote computer.</para>
197 <title>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [createupn=UPN] [createcomputer=OU] [options]</title>
200 Join a domain. If the account already exists on the server, and
201 [TYPE] is MEMBER, the machine will attempt to join automatically.
202 (Assuming that the machine has been created in server manager)
203 Otherwise, a password will be prompted for, and a new account may
207 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
212 [UPN] (ADS only) set the principalname attribute during the join. The default
213 format is host/netbiosname@REALM.
217 [OU] (ADS only) Precreate the computer account in a specific OU. The
218 OU string reads from top to bottom without RDNs, and is delimited by
219 a '/'. Please note that '\' is used for escape by both the shell
220 and ldap, so it may need to be doubled or quadrupled to pass through,
221 and it is not used as a delimiter.
226 <title>[RPC] OLDJOIN [options]</title>
228 <para>Join a domain. Use the OLDJOIN option to join the domain
229 using the old style of domain joining - you need to create a trust
230 account in server manager first.</para>
234 <title>[RPC|ADS] USER</title>
237 <title>[RPC|ADS] USER</title>
239 <para>List all users</para>
244 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
246 <para>Delete specified user</para>
251 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
253 <para>List the domain groups of the specified user.</para>
258 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
260 <para>Rename specified user.</para>
265 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
267 <para>Add specified user.</para>
272 <title>[RPC|ADS] GROUP</title>
275 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
276 <para>List user groups.</para>
280 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
282 <para>Delete specified group.</para>
287 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
289 <para>Create specified group.</para>
295 <title>[RAP|RPC] SHARE</title>
298 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
300 <para>Enumerates all exported resources (network shares) on target server.</para>
305 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
307 <para>Adds a share from a server (makes the export active). Maxusers
308 specifies the number of users that can be connected to the
309 share simultaneously.</para>
314 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
316 <para>Delete specified share.</para>
321 <title>[RPC|RAP] FILE</title>
324 <title>[RPC|RAP] FILE</title>
326 <para>List all open files on remote server.</para>
331 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
333 <para>Close file with specified <replaceable>fileid</replaceable> on
334 remote server.</para>
339 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
342 Print information on specified <replaceable>fileid</replaceable>.
343 Currently listed are: file-id, username, locks, path, permissions.
349 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
352 List files opened by specified <replaceable>user</replaceable>.
353 Please note that <command>net rap file user</command> does not work
354 against Samba servers.
362 <title>SESSION</title>
365 <title>RAP SESSION</title>
367 <para>Without any other options, SESSION enumerates all active SMB/CIFS
368 sessions on the target server.</para>
373 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
375 <para>Close the specified sessions.</para>
380 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
382 <para>Give a list with all the open files in specified session.</para>
389 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
391 <para>List all servers in specified domain or workgroup. Defaults
392 to local domain.</para>
397 <title>RAP DOMAIN</title>
399 <para>Lists all domains and workgroups visible on the
400 current network.</para>
405 <title>RAP PRINTQ</title>
408 <title>RAP PRINTQ INFO <replaceable>QUEUE_NAME</replaceable></title>
410 <para>Lists the specified print queue and print jobs on the server.
411 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all
412 queues are listed.</para>
417 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
419 <para>Delete job with specified id.</para>
426 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
429 Validate whether the specified user can log in to the
430 remote server. If the password is not specified on the commandline, it
439 <title>RAP GROUPMEMBER</title>
442 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
444 <para>List all members of the specified group.</para>
449 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
451 <para>Delete member from group.</para>
456 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
458 <para>Add member to group.</para>
465 <title>RAP ADMIN <replaceable>command</replaceable></title>
467 <para>Execute the specified <replaceable>command</replaceable> on
468 the remote server. Only works with OS/2 servers.
476 <title>RAP SERVICE</title>
479 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
481 <para>Start the specified service on the remote server. Not implemented yet.</para>
488 <title>RAP SERVICE STOP</title>
490 <para>Stop the specified service on the remote server.</para>
499 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
502 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
508 <title>LOOKUP</title>
511 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
514 Lookup the IP address of the given host with the specified type (netbios suffix).
515 The type defaults to 0x20 (workstation).
521 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
523 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
528 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
530 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
531 Defaults to local realm.</para>
536 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
538 <para>Give IP's of Domain Controllers for specified <replaceable>
539 DOMAIN</replaceable>. Defaults to local domain.</para>
544 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
546 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
547 or workgroup. Defaults to local domain.</para>
556 <para>Samba uses a general caching interface called 'gencache'. It
557 can be controlled using 'NET CACHE'.</para>
559 <para>All the timeout parameters support the suffixes:
562 <member>s - Seconds</member>
563 <member>m - Minutes</member>
564 <member>h - Hours</member>
565 <member>d - Days</member>
566 <member>w - Weeks</member>
572 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
574 <para>Add specified key+data to the cache with the given timeout.</para>
579 <title>CACHE DEL <replaceable>key</replaceable></title>
581 <para>Delete key from the cache.</para>
586 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
588 <para>Update data of existing cache entry.</para>
593 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
595 <para>Search for the specified pattern in the cache data.</para>
600 <title>CACHE LIST</title>
603 List all current items in the cache.
609 <title>CACHE FLUSH</title>
611 <para>Remove all the current items from the cache.</para>
618 <title>GETLOCALSID [DOMAIN]</title>
620 <para>Prints the SID of the specified domain, or if the parameter is
621 omitted, the SID of the local server.</para>
626 <title>SETLOCALSID S-1-5-21-x-y-z</title>
628 <para>Sets SID for the local server to the specified SID.</para>
633 <title>GETDOMAINSID</title>
635 <para>Prints the local machine SID and the SID of the current
641 <title>SETDOMAINSID</title>
643 <para>Sets the SID of the current domain.</para>
648 <title>GROUPMAP</title>
650 <para>Manage the mappings between Windows group SIDs and UNIX groups.
651 Common options include:</para>
654 <listitem><para>unixgroup - Name of the UNIX group</para></listitem>
655 <listitem><para>ntgroup - Name of the Windows NT group (must be
656 resolvable to a SID</para></listitem>
657 <listitem><para>rid - Unsigned 32-bit integer</para></listitem>
658 <listitem><para>sid - Full SID in the form of "S-1-..."</para></listitem>
659 <listitem><para>type - Type of the group; either 'domain', 'local',
660 or 'builtin'</para></listitem>
661 <listitem><para>comment - Freeform text description of the group</para></listitem>
665 <title>GROUPMAP ADD</title>
668 Add a new group mapping entry:
670 net groupmap add {rid=int|sid=string} unixgroup=string \
671 [type={domain|local}] [ntgroup=string] [comment=string]
678 <title>GROUPMAP DELETE</title>
680 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
682 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
687 <title>GROUPMAP MODIFY</title>
689 <para>Update en existing group entry.</para>
693 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \
694 [comment=string] [type={domain|local}]
700 <title>GROUPMAP LIST</title>
702 <para>List existing group mapping entries.</para>
704 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
712 <title>MAXRID</title>
714 <para>Prints out the highest RID currently in use on the local
715 server (by the active 'passdb backend').
721 <title>RPC INFO</title>
723 <para>Print information about the domain of the remote server,
724 such as domain name, domain sid and number of users and groups.
730 <title>[RPC|ADS] TESTJOIN</title>
732 <para>Check whether participation in a domain is still valid.</para>
737 <title>[RPC|ADS] CHANGETRUSTPW</title>
739 <para>Force change of domain trust password.</para>
744 <title>RPC TRUSTDOM</title>
747 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
749 <para>Add a interdomain trust account for <replaceable>DOMAIN</replaceable>.
750 This is in fact a Samba account named <replaceable>DOMAIN$</replaceable>
751 with the account flag <constant>'I'</constant> (interdomain trust account).
752 This is required for incoming trusts to work. It makes Samba be a
753 trusted domain of the foreign (trusting) domain.
754 Users of the Samba domain will be made available in the foreign domain.
755 If the command is used against localhost it has the same effect as
756 <command>smbpasswd -a -i DOMAIN</command>. Please note that both commands
757 expect a appropriate UNIX account.
763 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
765 <para>Remove interdomain trust account for
766 <replaceable>DOMAIN</replaceable>. If it is used against localhost
767 it has the same effect as <command>smbpasswd -x DOMAIN$</command>.
773 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
776 Establish a trust relationship to a trusted domain.
777 Interdomain account must already be created on the remote PDC.
778 This is required for outgoing trusts to work. It makes Samba be a
779 trusting domain of a foreign (trusted) domain.
780 Users of the foreign domain will be made available in our domain.
781 You'll need winbind and a working idmap config to make them
782 appear in your system.
788 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
789 <para>Abandon relationship to trusted domain</para>
794 <title>RPC TRUSTDOM LIST</title>
796 <para>List all interdomain trust relationships.</para>
800 <title>RPC TRUSTDOM LIST</title>
802 <para>List all interdomain trust relationships.</para>
808 <title>RPC TRUST</title>
811 <title>RPC TRUST CREATE</title>
813 <para>Create a trust trust object by calling lsaCreateTrustedDomainEx2.
814 The can be done on a single server or on two servers at once with the
815 possibility to use a random trust password.</para>
817 <variablelist><title>Options:</title>
819 <term>otherserver</term>
820 <listitem><para>Domain controller of the second domain</para></listitem>
824 <term>otheruser</term>
825 <listitem><para>Admin user in the second domain</para></listitem>
829 <term>otherdomainsid</term>
830 <listitem><para>SID of the second domain</para></listitem>
834 <term>other_netbios_domain</term>
835 <listitem><para>NetBIOS (short) name of the second domain</para></listitem>
839 <term>otherdomain</term>
840 <listitem><para>DNS (full) name of the second domain</para></listitem>
845 <listitem><para>Trust password</para></listitem>
849 <variablelist><title>Examples:</title>
851 <term>Create a trust object on srv1.dom1.dom for the domain dom2</term>
852 <listitem><literallayout>
853 net rpc trust create \
854 otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
855 other_netbios_domain=dom2 \
856 otherdomain=dom2.dom \
859 </literallayout></listitem>
862 <term>Create a trust relationship between dom1 and dom2</term>
863 <listitem><literallayout>
864 net rpc trust create \
865 otherserver=srv2.dom2.test \
868 </literallayout></listitem>
874 <title>RPC TRUST DELETE</title>
876 <para>Delete a trust trust object by calling lsaDeleteTrustedDomain.
877 The can be done on a single server or on two servers at once.</para>
879 <variablelist><title>Options:</title>
881 <term>otherserver</term>
882 <listitem><para>Domain controller of the second domain</para></listitem>
886 <term>otheruser</term>
887 <listitem><para>Admin user in the second domain</para></listitem>
891 <term>otherdomainsid</term>
892 <listitem><para>SID of the second domain</para></listitem>
896 <variablelist><title>Examples:</title>
898 <term>Delete a trust object on srv1.dom1.dom for the domain dom2</term>
899 <listitem><literallayout>
900 net rpc trust delete \
901 otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
903 </literallayout></listitem>
906 <term>Delete a trust relationship between dom1 and dom2</term>
907 <listitem><literallayout>
908 net rpc trust delete \
909 otherserver=srv2.dom2.test \
912 </literallayout></listitem>
921 <title>RPC RIGHTS</title>
923 <para>This subcommand is used to view and manage Samba's rights assignments (also
924 referred to as privileges). There are three options currently available:
925 <parameter>list</parameter>, <parameter>grant</parameter>, and
926 <parameter>revoke</parameter>. More details on Samba's privilege model and its use
927 can be found in the Samba-HOWTO-Collection.</para>
935 <title>RPC ABORTSHUTDOWN</title>
937 <para>Abort the shutdown of a remote server.</para>
942 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
944 <para>Shut down the remote server.</para>
950 Reboot after shutdown.
957 Force shutting down all applications.
962 <term>-t timeout</term>
964 Timeout before system will be shut down. An interactive
965 user of the system can use this time to cancel the shutdown.
970 <term>-C message</term>
971 <listitem><para>Display the specified message on the screen to
972 announce the shutdown.</para></listitem>
979 <title>RPC SAMDUMP</title>
981 <para>Print out sam database of remote server. You need
982 to run this against the PDC, from a Samba machine joined as a BDC. </para>
986 <title>RPC VAMPIRE</title>
988 <para>Export users, aliases and groups from remote server to
989 local server. You need to run this against the PDC, from a Samba machine joined as a BDC.
994 <title>RPC VAMPIRE KEYTAB</title>
996 <para>Dump remote SAM database to local Kerberos keytab file.
1001 <title>RPC VAMPIRE LDIF</title>
1003 <para>Dump remote SAM database to local LDIF file or standard output.
1008 <title>RPC GETSID</title>
1010 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename>. </para>
1015 <title>ADS LEAVE</title>
1017 <para>Make the remote host leave the domain it is part of. </para>
1022 <title>ADS STATUS</title>
1024 <para>Print out status of machine account of the local machine in ADS.
1025 Prints out quite some debug info. Aimed at developers, regular
1026 users should use <command>NET ADS TESTJOIN</command>.</para>
1031 <title>ADS PRINTER</title>
1034 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
1037 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the
1038 server name defaults to the local host.</para>
1043 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
1045 <para>Publish specified printer using ADS.</para>
1050 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
1052 <para>Remove specified printer from ADS directory.</para>
1059 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
1061 <para>Perform a raw LDAP search on a ADS server and dump the results. The
1062 expression is a standard LDAP search expression, and the
1063 attributes are a list of LDAP fields to show in the results.</para>
1065 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
1071 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
1074 Perform a raw LDAP search on a ADS server and dump the results. The
1075 DN standard LDAP DN, and the attributes are a list of LDAP fields
1076 to show in the result.
1079 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
1084 <title>ADS WORKGROUP</title>
1086 <para>Print out workgroup name for specified kerberos realm.</para>
1091 <title>SAM CREATEBUILTINGROUP <NAME></title>
1094 (Re)Create a BUILTIN group.
1095 Only a wellknown set of BUILTIN groups can be created with this command.
1096 This is the list of currently recognized group names: Administrators,
1097 Users, Guests, Power Users, Account Operators, Server Operators, Print
1098 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
1101 This command requires a running Winbindd with idmap allocation properly
1102 configured. The group gid will be allocated out of the winbindd range.
1108 <title>SAM CREATELOCALGROUP <NAME></title>
1111 Create a LOCAL group (also known as Alias).
1113 This command requires a running Winbindd with idmap allocation properly
1114 configured. The group gid will be allocated out of the winbindd range.
1120 <title>SAM DELETELOCALGROUP <NAME></title>
1123 Delete an existing LOCAL group (also known as Alias).
1130 <title>SAM MAPUNIXGROUP <NAME></title>
1133 Map an existing Unix group and make it a Domain Group, the domain group
1134 will have the same name.
1140 <title>SAM UNMAPUNIXGROUP <NAME></title>
1143 Remove an existing group mapping entry.
1149 <title>SAM ADDMEM <GROUP> <MEMBER></title>
1152 Add a member to a Local group. The group can be specified only by name,
1153 the member can be specified by name or SID.
1159 <title>SAM DELMEM <GROUP> <MEMBER></title>
1162 Remove a member from a Local group. The group and the member must be
1169 <title>SAM LISTMEM <GROUP></title>
1172 List Local group members. The group must be specified by name.
1178 <title>SAM LIST <users|groups|localgroups|builtin|workstations> [verbose]</title>
1181 List the specified set of accounts by name. If verbose is specified,
1182 the rid and description is also provided for each account.
1188 <title>SAM RIGHTS LIST</title>
1191 List all available privileges.
1197 <title>SAM RIGHTS GRANT <NAME> <PRIVILEGE></title>
1200 Grant one or more privileges to a user.
1206 <title>SAM RIGHTS REVOKE <NAME> <PRIVILEGE></title>
1209 Revoke one or more privileges from a user.
1215 <title>SAM SHOW <NAME></title>
1218 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1225 <title>SAM SET HOMEDIR <NAME> <DIRECTORY></title>
1228 Set the home directory for a user account.
1234 <title>SAM SET PROFILEPATH <NAME> <PATH></title>
1237 Set the profile path for a user account.
1243 <title>SAM SET COMMENT <NAME> <COMMENT></title>
1246 Set the comment for a user or group account.
1252 <title>SAM SET FULLNAME <NAME> <FULL NAME></title>
1255 Set the full name for a user account.
1261 <title>SAM SET LOGONSCRIPT <NAME> <SCRIPT></title>
1264 Set the logon script for a user account.
1270 <title>SAM SET HOMEDRIVE <NAME> <DRIVE></title>
1273 Set the home drive for a user account.
1279 <title>SAM SET WORKSTATIONS <NAME> <WORKSTATIONS></title>
1282 Set the workstations a user account is allowed to log in from.
1288 <title>SAM SET DISABLE <NAME></title>
1291 Set the "disabled" flag for a user account.
1297 <title>SAM SET PWNOTREQ <NAME></title>
1300 Set the "password not required" flag for a user account.
1306 <title>SAM SET AUTOLOCK <NAME></title>
1309 Set the "autolock" flag for a user account.
1315 <title>SAM SET PWNOEXP <NAME></title>
1318 Set the "password do not expire" flag for a user account.
1324 <title>SAM SET PWDMUSTCHANGENOW <NAME> [yes|no]</title>
1327 Set or unset the "password must change" flag for a user account.
1333 <title>SAM POLICY LIST</title>
1336 List the available account policies.
1342 <title>SAM POLICY SHOW <account policy></title>
1345 Show the account policy value.
1351 <title>SAM POLICY SET <account policy> <value></title>
1354 Set a value for the account policy.
1355 Valid values can be: "forever", "never", "off", or a number.
1361 <title>SAM PROVISION</title>
1364 Only available if ldapsam:editposix is set and winbindd is running.
1365 Properly populates the ldap tree with the basic accounts (Administrator)
1366 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1372 <title>IDMAP DUMP <local tdb file name></title>
1375 Dumps the mappings contained in the local tdb file specified.
1376 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1382 <title>IDMAP RESTORE [input file]</title>
1385 Restore the mappings from the specified file or stdin.
1391 <title>IDMAP SECRET <DOMAIN> <secret></title>
1394 Store a secret for the specified domain, used primarily for domains
1395 that use idmap_ldap as a backend. In this case the secret is used
1396 as the password for the user DN used to bind to the ldap server.
1403 <title>IDMAP DELETE [-f] [--db=<DB>] <ID></title>
1406 Delete a mapping sid <-> gid or sid <-> uid from the IDMAP database.
1407 The mapping is given by <ID> which may either be a sid: S-x-..., a gid: "GID number" or a uid: "UID number".
1408 Use -f to delete an invalid partial mapping <ID> -> xx
1411 Use "smbcontrol all idmap ..." to notify running smbd instances.
1412 See the <citerefentry><refentrytitle>smbcontrol</refentrytitle>
1413 <manvolnum>1</manvolnum></citerefentry> manpage for details.
1419 <title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=<DB>]</title>
1422 Check and repair the IDMAP database. If no option is given a read only check
1423 of the database is done. Among others an interactive or automatic repair mode
1424 may be chosen with one of the following options:
1427 <varlistentry><term>-r|--repair</term>
1429 Interactive repair mode, ask a lot of questions.
1433 <varlistentry><term>-a|--auto</term>
1435 Noninteractive repair mode, use default answers.
1439 <varlistentry><term>-v|--verbose</term>
1441 Produce more output.
1445 <varlistentry><term>-f|--force</term>
1447 Try to apply changes, even if they do not apply cleanly.
1451 <varlistentry><term>-T|--test</term>
1453 Dry run, show what changes would be made but don't touch anything.
1457 <varlistentry><term>-l|--lock</term>
1459 Lock the database while doing the check.
1463 <varlistentry><term>--db <DB></term>
1465 Check the specified database.
1468 <varlistentry><term></term>
1474 It reports about the finding of the following errors:
1477 <varlistentry><term>Missing reverse mapping:</term>
1479 A record with mapping A->B where there is no B->A. Default action
1480 in repair mode is to "fix" this by adding the reverse mapping.
1484 <varlistentry><term>Invalid mapping:</term>
1486 A record with mapping A->B where B->C. Default action
1487 is to "delete" this record.
1491 <varlistentry><term>Missing or invalid HWM:</term>
1493 A high water mark is not at least equal to the largest ID in the
1494 database. Default action is to "fix" this by setting it to the
1495 largest ID found +1.
1499 <varlistentry><term>Invalid record:</term>
1501 Something we failed to parse. Default action is to "edit" it
1502 in interactive and "delete" it in automatic mode.
1511 <title>USERSHARE</title>
1513 <para>Starting with version 3.0.23, a Samba server now supports the ability for
1514 non-root users to add user defined shares to be exported using the "net usershare"
1519 To set this up, first set up your smb.conf by adding to the [global] section:
1521 usershare path = /usr/local/samba/lib/usershares
1523 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
1524 set the group owner to the UNIX group who should have the ability to create usershares,
1525 for example a group called "serverops".
1527 Set the permissions on /usr/local/samba/lib/usershares to 01770.
1529 (Owner and group all access, no access for others, plus the sticky bit,
1530 which means that a file in that directory can be renamed or deleted only
1531 by the owner of the file).
1533 Finally, tell smbd how many usershares you will allow by adding to the [global]
1534 section of smb.conf a line such as :
1536 usershare max shares = 100.
1538 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
1539 can create user defined shares on demand using the commands below.
1542 <para>The usershare commands are:
1545 <member>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</member>
1546 <member>net usershare delete sharename - to delete a user defined share.</member>
1547 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
1548 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
1554 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
1557 Add or replace a new user defined share, with name "sharename".
1561 "path" specifies the absolute pathname on the system to be exported.
1562 Restrictions may be put on this, see the global smb.conf parameters:
1563 "usershare owner only", "usershare prefix allow list", and
1564 "usershare prefix deny list".
1568 The optional "comment" parameter is the comment that will appear
1569 on the share when browsed to by a client.
1572 <para>The optional "acl" field
1573 specifies which users have read and write access to the entire share.
1574 Note that guest connections are not allowed unless the smb.conf parameter
1575 "usershare allow guests" has been set. The definition of a user
1576 defined share acl is: "user:permission", where user is a valid
1577 username on the system and permission can be "F", "R", or "D".
1578 "F" stands for "full permissions", ie. read and write permissions.
1579 "D" stands for "deny" for a user, ie. prevent this user from accessing
1581 "R" stands for "read only", ie. only allow read access to this
1582 share (no creation of new files or directories or writing to files).
1586 The default if no "acl" is given is "Everyone:R", which means any
1587 authenticated user has read-only access.
1591 The optional "guest_ok" has the same effect as the parameter of the
1592 same name in smb.conf, in that it allows guest access to this user
1593 defined share. This parameter is only allowed if the global parameter
1594 "usershare allow guests" has been set to true in the smb.conf.
1597 There is no separate command to modify an existing user defined share,
1598 just use the "net usershare add [sharename]" command using the same
1599 sharename as the one you wish to modify and specify the new options
1600 you wish. The Samba smbd daemon notices user defined share modifications
1601 at connect time so will see the change immediately, there is no need
1602 to restart smbd on adding, deleting or changing a user defined share.
1606 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
1609 Deletes the user defined share by name. The Samba smbd daemon
1610 immediately notices this change, although it will not disconnect
1611 any users currently connected to the deleted share.
1617 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1620 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1624 net usershare info on its own dumps out info on the user defined shares that were
1625 created by the current user, or restricts them to share names that match the given
1626 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1627 If the '-l' or '--long' option is also given, it prints out info on user defined
1628 shares created by other users.
1632 The information given about a share looks like:
1637 usershare_acl=Everyone:F
1640 And is a list of the current settings of the user defined share that can be
1641 modified by the "net usershare add" command.
1647 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
1650 List all the user defined shares owned by the current user matching the given pattern, or all users.
1654 net usershare list on its own list out the names of the user defined shares that were
1655 created by the current user, or restricts the list to share names that match the given
1656 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1657 If the '-l' or '--long' option is also given, it includes the names of user defined
1658 shares created by other users.
1668 <para>Starting with version 3.2.0, a Samba server can be configured by data
1669 stored in registry. This configuration data can be edited with the new "net
1674 The deployment of this configuration data can be activated in two levels from the
1675 <emphasis>smb.conf</emphasis> file: Share definitions from registry are
1676 activated by setting <parameter>registry shares</parameter> to
1677 <quote>yes</quote> in the [global] section and global configuration options are
1678 activated by setting <smbconfoption name="include">registry</smbconfoption> in
1679 the [global] section for a mixed configuration or by setting
1680 <smbconfoption name="config backend">registry</smbconfoption> in the [global]
1681 section for a registry-only configuration.
1682 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
1683 <manvolnum>5</manvolnum></citerefentry> manpage for details.
1686 <para>The conf commands are:
1688 <member>net conf list - Dump the complete configuration in smb.conf like
1690 <member>net conf import - Import configuration from file in smb.conf
1692 <member>net conf listshares - List the registry shares.</member>
1693 <member>net conf drop - Delete the complete configuration from
1695 <member>net conf showshare - Show the definition of a registry share.</member>
1696 <member>net conf addshare - Create a new registry share.</member>
1697 <member>net conf delshare - Delete a registry share.</member>
1698 <member>net conf setparm - Store a parameter.</member>
1699 <member>net conf getparm - Retrieve the value of a parameter.</member>
1700 <member>net conf delparm - Delete a parameter.</member>
1701 <member>net conf getincludes - Show the includes of a share definition.</member>
1702 <member>net conf setincludes - Set includes for a share.</member>
1703 <member>net conf delincludes - Delete includes from a share definition.</member>
1708 <title>CONF LIST</title>
1711 Print the configuration data stored in the registry in a smb.conf-like format to
1717 <title>CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
1720 This command imports configuration from a file in smb.conf format.
1721 If a section encountered in the input file is present in registry,
1722 its contents is replaced. Sections of registry configuration that have
1723 no counterpart in the input file are not affected. If you want to delete these,
1724 you will have to use the "net conf drop" or "net conf delshare" commands.
1725 Optionally, a section may be specified to restrict the effect of the
1726 import command to that specific section. A test mode is enabled by specifying
1727 the parameter "-T" on the commandline. In test mode, no changes are made to the
1728 registry, and the resulting configuration is printed to standard output instead.
1733 <title>CONF LISTSHARES</title>
1736 List the names of the shares defined in registry.
1741 <title>CONF DROP</title>
1744 Delete the complete configuration data from registry.
1749 <title>CONF SHOWSHARE <replaceable>sharename</replaceable></title>
1752 Show the definition of the share or section specified. It is valid to specify
1753 "global" as sharename to retrieve the global configuration options from
1759 <title>CONF ADDSHARE <replaceable>sharename</replaceable> <replaceable>path</replaceable> [<replaceable>writeable={y|N}</replaceable> [<replaceable>guest_ok={y|N}</replaceable> [<replaceable>comment</replaceable>]]] </title>
1761 <para>Create a new share definition in registry.
1762 The sharename and path have to be given. The share name may
1763 <emphasis>not</emphasis> be "global". Optionally, values for the very
1764 common options "writeable", "guest ok" and a "comment" may be specified.
1765 The same result may be obtained by a sequence of "net conf setparm"
1771 <title>CONF DELSHARE <replaceable>sharename</replaceable></title>
1774 Delete a share definition from registry.
1779 <title>CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
1782 Store a parameter in registry. The section may be global or a sharename.
1783 The section is created if it does not exist yet.
1788 <title>CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1791 Show a parameter stored in registry.
1796 <title>CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1799 Delete a parameter stored in registry.
1804 <title>CONF GETINCLUDES <replaceable>section</replaceable></title>
1807 Get the list of includes for the provided section (global or share).
1811 Note that due to the nature of the registry database and the nature of include directives,
1812 the includes need special treatment: Parameters are stored in registry by the parameter
1813 name as valuename, so there is only ever one instance of a parameter per share.
1814 Also, a specific order like in a text file is not guaranteed. For all real
1815 parameters, this is perfectly ok, but the include directive is rather a meta
1816 parameter, for which, in the smb.conf text file, the place where it is specified
1817 between the other parameters is very important. This can not be achieved by the
1818 simple registry smbconf data model, so there is one ordered list of includes
1819 per share, and this list is evaluated after all the parameters of the share.
1823 Further note that currently, only files can be included from registry
1824 configuration. In the future, there will be the ability to include configuration
1825 data from other registry keys.
1830 <title>CONF SETINCLUDES <replaceable>section</replaceable> [<replaceable>filename</replaceable>]+</title>
1833 Set the list of includes for the provided section (global or share) to the given
1834 list of one or more filenames. The filenames may contain the usual smb.conf
1840 <title>CONF DELINCLUDES <replaceable>section</replaceable></title>
1843 Delete the list of includes from the provided section (global or share).
1850 <title>REGISTRY</title>
1852 Manipulate Samba's registry.
1855 <para>The registry commands are:
1857 <member>net registry enumerate - Enumerate registry keys and values.</member>
1858 <member>net registry enumerate_recursive - Enumerate registry key and its subkeys.</member>
1859 <member>net registry createkey - Create a new registry key.</member>
1860 <member>net registry deletekey - Delete a registry key.</member>
1861 <member>net registry deletekey_recursive - Delete a registry key with subkeys.</member>
1862 <member>net registry getvalue - Print a registry value.</member>
1863 <member>net registry getvalueraw - Print a registry value (raw format).</member>
1864 <member>net registry setvalue - Set a new registry value.</member>
1865 <member>net registry increment - Increment a DWORD registry value under a lock.
1867 <member>net registry deletevalue - Delete a registry value.</member>
1868 <member>net registry getsd - Get security descriptor.</member>
1869 <member>net registry getsd_sdd1 - Get security descriptor in sddl format.
1871 <member>net registry setsd_sdd1 - Set security descriptor from sddl format
1873 <member>net registry import - Import a registration entries (.reg) file.
1875 <member>net registry export - Export a registration entries (.reg) file.
1877 <member>net registry convert - Convert a registration entries (.reg) file.
1883 <title>REGISTRY ENUMERATE <replaceable>key</replaceable> </title>
1884 <para>Enumerate subkeys and values of <emphasis>key</emphasis>.
1889 <title>REGISTRY ENUMERATE_RECURSIVE <replaceable>key</replaceable> </title>
1890 <para>Enumerate values of <emphasis>key</emphasis> and its subkeys.
1895 <title>REGISTRY CREATEKEY <replaceable>key</replaceable> </title>
1896 <para>Create a new <emphasis>key</emphasis> if not yet existing.
1901 <title>REGISTRY DELETEKEY <replaceable>key</replaceable> </title>
1902 <para>Delete the given <emphasis>key</emphasis> and its
1903 values from the registry, if it has no subkeys.
1908 <title>REGISTRY DELETEKEY_RECURSIVE <replaceable>key</replaceable> </title>
1909 <para>Delete the given <emphasis>key</emphasis> and all of its
1910 subkeys and values from the registry.
1915 <title>REGISTRY GETVALUE <replaceable>key</replaceable> <!--
1916 --><replaceable>name</replaceable></title>
1918 <para>Output type and actual value of the value <emphasis>name</emphasis>
1919 of the given <emphasis>key</emphasis>.
1924 <title>REGISTRY GETVALUERAW <replaceable>key</replaceable> <!--
1925 --><replaceable>name</replaceable></title>
1926 <para>Output the actual value of the value <emphasis>name</emphasis>
1927 of the given <emphasis>key</emphasis>.
1932 <title>REGISTRY SETVALUE <replaceable>key</replaceable> <!--
1933 --><replaceable>name</replaceable> <replaceable>type</replaceable> <!--
1934 --><replaceable>value</replaceable> ...<!--
1937 <para>Set the value <emphasis>name</emphasis>
1938 of an existing <emphasis>key</emphasis>.
1939 <emphasis>type</emphasis> may be one of
1940 <emphasis>sz</emphasis>, <emphasis>multi_sz</emphasis> or
1941 <emphasis>dword</emphasis>.
1942 In case of <emphasis>multi_sz</emphasis> <replaceable>value</replaceable> may
1943 be given multiple times.
1948 <title>REGISTRY INCREMENT <replaceable>key</replaceable> <!--
1949 --><replaceable>name</replaceable> <replaceable>[inc]</replaceable><!--
1952 <para>Increment the DWORD value <emphasis>name</emphasis>
1953 of <emphasis>key</emphasis> by <replaceable>inc</replaceable>
1954 while holding a g_lock.
1955 <emphasis>inc</emphasis> defaults to 1.
1960 <title>REGISTRY DELETEVALUE <replaceable>key</replaceable> <!--
1961 --><replaceable>name</replaceable></title>
1963 <para>Delete the value <emphasis>name</emphasis>
1964 of the given <emphasis>key</emphasis>.
1969 <title>REGISTRY GETSD <replaceable>key</replaceable></title>
1971 <para>Get the security descriptor of the given <emphasis>key</emphasis>.
1976 <title>REGISTRY GETSD_SDDL <replaceable>key</replaceable></title>
1978 <para>Get the security descriptor of the given <emphasis>key</emphasis> as a
1979 Security Descriptor Definition Language (SDDL) string.
1984 <title>REGISTRY SETSD_SDDL <replaceable>key</replaceable><!--
1985 --><replaceable>sd</replaceable></title>
1987 <para>Set the security descriptor of the given <emphasis>key</emphasis> from a
1988 Security Descriptor Definition Language (SDDL) string <emphasis>sd</emphasis>.
1993 <title>REGISTRY IMPORT <replaceable>file</replaceable><!--
1994 --><replaceable>[opt]</replaceable></title>
1996 <para>Import a registration entries (.reg) <emphasis>file</emphasis>.
2001 <title>REGISTRY EXPORT <replaceable>key</replaceable><!--
2002 --><replaceable>file</replaceable><!--
2003 --><replaceable>[opt]</replaceable></title>
2005 <para>Export a <emphasis>key</emphasis> to a registration entries (.reg)
2006 <emphasis>file</emphasis>.
2011 <title>REGISTRY CONVERT <replaceable>in</replaceable> <!--
2012 --><replaceable>out</replaceable> <!--
2013 --><replaceable>[[inopt] outopt]</replaceable></title>
2015 <para>Convert a registration entries (.reg) file <emphasis>in</emphasis>.
2023 <title>EVENTLOG</title>
2025 <para>Starting with version 3.4.0 net can read, dump, import and export native
2026 win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools.
2030 The import and export of evt files can only succeed when <parameter>eventlog list</parameter> is used in
2031 <emphasis>smb.conf</emphasis> file.
2032 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2035 <para>The eventlog commands are:
2037 <member>net eventlog dump - Dump a eventlog *.evt file on the screen.</member>
2038 <member>net eventlog import - Import a eventlog *.evt into the samba internal
2039 tdb based representation of eventlogs.</member>
2040 <member>net eventlog export - Export the samba internal tdb based representation
2041 of eventlogs into an eventlog *.evt file.</member>
2046 <title>EVENTLOG DUMP <replaceable>filename</replaceable></title>
2049 Prints a eventlog *.evt file to standard output.
2054 <title>EVENTLOG IMPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2057 Imports a eventlog *.evt file defined by <replaceable>filename</replaceable> into the
2058 samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>.
2059 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2060 defined in smb.conf.
2061 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2067 <title>EVENTLOG EXPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2070 Exports the samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>
2071 to a eventlog *.evt file defined by <replaceable>filename</replaceable>.
2072 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2073 defined in smb.conf.
2074 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2084 <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.
2086 <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.
2089 <para>The client side support for remote join is implemented in the net dom commands which are:
2091 <member>net dom join - Join a remote computer into a domain.</member>
2092 <member>net dom unjoin - Unjoin a remote computer from a domain.</member>
2093 <member>net dom renamecomputer - Renames a remote computer joined to a domain.</member>
2098 <title>DOM JOIN <replaceable>domain=DOMAIN</replaceable> <replaceable>ou=OU</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2101 Joins a computer into a domain. This command supports the following additional parameters:
2106 <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>
2108 <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>
2110 <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>
2112 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2114 <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>
2119 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.
2123 net dom join -S xp -U XP\\administrator%secret domain=MYDOM account=MYDOM\\administrator password=topsecret reboot.
2126 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.
2132 <title>DOM UNJOIN <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2135 Unjoins a computer from a domain. This command supports the following additional parameters:
2140 <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>
2142 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2144 <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>
2149 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.
2153 net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot.
2156 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.
2162 <title>DOM RENAMECOMPUTER <replaceable>newname=NEWNAME</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2165 Renames a computer that is joined to a domain. This command supports the following additional parameters:
2170 <listitem><para><replaceable>NEWNAME</replaceable> defines the new name of the machine in the domain.</para></listitem>
2172 <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>
2174 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2176 <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>
2181 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.
2185 net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot.
2188 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.
2196 <title>G_LOCK</title>
2198 <para>Manage global locks.</para>
2201 <title>G_LOCK DO <replaceable>lockname</replaceable> <replaceable>timeout</replaceable> <replaceable>command</replaceable></title>
2204 Execute a shell command under a global lock. This might be useful to define the
2205 order in which several shell commands will be executed. The locking information
2206 is stored in a file called <filename>g_lock.tdb</filename>. In setups with CTDB
2207 running, the locking information will be available on all cluster nodes.
2211 <listitem><para><replaceable>LOCKNAME</replaceable> defines the name of the global lock.</para></listitem>
2212 <listitem><para><replaceable>TIMEOUT</replaceable> defines the timeout.</para></listitem>
2213 <listitem><para><replaceable>COMMAND</replaceable> defines the shell command to execute.</para></listitem>
2218 <title>G_LOCK LOCKS</title>
2221 Print a list of all currently existing locknames.
2226 <title>G_LOCK DUMP <replaceable>lockname</replaceable></title>
2229 Dump the locking table of a certain global lock.
2236 <title>HELP [COMMAND]</title>
2238 <para>Gives usage information for the specified command.</para>
2245 <title>VERSION</title>
2247 <para>This man page is complete for version 3 of the Samba
2252 <title>AUTHOR</title>
2254 <para>The original Samba software and related utilities
2255 were created by Andrew Tridgell. Samba is now developed
2256 by the Samba Team as an Open Source project similar
2257 to the way the Linux kernel is developed.</para>
2259 <para>The net manpage was written by Jelmer Vernooij.</para>