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.0</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 an 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>
802 <title>RPC TRUST</title>
805 <title>RPC TRUST CREATE</title>
807 <para>Create a trust object by calling lsaCreateTrustedDomainEx2.
808 The can be done on a single server or on two servers at once with the
809 possibility to use a random trust password.</para>
811 <variablelist><title>Options:</title>
813 <term>otherserver</term>
814 <listitem><para>Domain controller of the second domain</para></listitem>
818 <term>otheruser</term>
819 <listitem><para>Admin user in the second domain</para></listitem>
823 <term>otherdomainsid</term>
824 <listitem><para>SID of the second domain</para></listitem>
828 <term>other_netbios_domain</term>
829 <listitem><para>NetBIOS (short) name of the second domain</para></listitem>
833 <term>otherdomain</term>
834 <listitem><para>DNS (full) name of the second domain</para></listitem>
839 <listitem><para>Trust password</para></listitem>
843 <variablelist><title>Examples:</title>
845 <term>Create a trust object on srv1.dom1.dom for the domain dom2</term>
846 <listitem><literallayout>
847 net rpc trust create \
848 otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
849 other_netbios_domain=dom2 \
850 otherdomain=dom2.dom \
853 </literallayout></listitem>
856 <term>Create a trust relationship between dom1 and dom2</term>
857 <listitem><literallayout>
858 net rpc trust create \
859 otherserver=srv2.dom2.test \
862 </literallayout></listitem>
868 <title>RPC TRUST DELETE</title>
870 <para>Delete a trust trust object by calling lsaDeleteTrustedDomain.
871 The can be done on a single server or on two servers at once.</para>
873 <variablelist><title>Options:</title>
875 <term>otherserver</term>
876 <listitem><para>Domain controller of the second domain</para></listitem>
880 <term>otheruser</term>
881 <listitem><para>Admin user in the second domain</para></listitem>
885 <term>otherdomainsid</term>
886 <listitem><para>SID of the second domain</para></listitem>
890 <variablelist><title>Examples:</title>
892 <term>Delete a trust object on srv1.dom1.dom for the domain dom2</term>
893 <listitem><literallayout>
894 net rpc trust delete \
895 otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
897 </literallayout></listitem>
900 <term>Delete a trust relationship between dom1 and dom2</term>
901 <listitem><literallayout>
902 net rpc trust delete \
903 otherserver=srv2.dom2.test \
906 </literallayout></listitem>
915 <title>RPC RIGHTS</title>
917 <para>This subcommand is used to view and manage Samba's rights assignments (also
918 referred to as privileges). There are three options currently available:
919 <parameter>list</parameter>, <parameter>grant</parameter>, and
920 <parameter>revoke</parameter>. More details on Samba's privilege model and its use
921 can be found in the Samba-HOWTO-Collection.</para>
929 <title>RPC ABORTSHUTDOWN</title>
931 <para>Abort the shutdown of a remote server.</para>
936 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
938 <para>Shut down the remote server.</para>
944 Reboot after shutdown.
951 Force shutting down all applications.
956 <term>-t timeout</term>
958 Timeout before system will be shut down. An interactive
959 user of the system can use this time to cancel the shutdown.
964 <term>-C message</term>
965 <listitem><para>Display the specified message on the screen to
966 announce the shutdown.</para></listitem>
973 <title>RPC SAMDUMP</title>
975 <para>Print out sam database of remote server. You need
976 to run this against the PDC, from a Samba machine joined as a BDC. </para>
980 <title>RPC VAMPIRE</title>
982 <para>Export users, aliases and groups from remote server to
983 local server. You need to run this against the PDC, from a Samba machine joined as a BDC.
988 <title>RPC VAMPIRE KEYTAB</title>
990 <para>Dump remote SAM database to local Kerberos keytab file.
995 <title>RPC VAMPIRE LDIF</title>
997 <para>Dump remote SAM database to local LDIF file or standard output.
1002 <title>RPC GETSID</title>
1004 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename>. </para>
1009 <title>ADS LEAVE</title>
1011 <para>Make the remote host leave the domain it is part of. </para>
1016 <title>ADS STATUS</title>
1018 <para>Print out status of machine account of the local machine in ADS.
1019 Prints out quite some debug info. Aimed at developers, regular
1020 users should use <command>NET ADS TESTJOIN</command>.</para>
1025 <title>ADS PRINTER</title>
1028 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
1031 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the
1032 server name defaults to the local host.</para>
1037 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
1039 <para>Publish specified printer using ADS.</para>
1044 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
1046 <para>Remove specified printer from ADS directory.</para>
1053 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
1055 <para>Perform a raw LDAP search on a ADS server and dump the results. The
1056 expression is a standard LDAP search expression, and the
1057 attributes are a list of LDAP fields to show in the results.</para>
1059 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
1065 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
1068 Perform a raw LDAP search on a ADS server and dump the results. The
1069 DN standard LDAP DN, and the attributes are a list of LDAP fields
1070 to show in the result.
1073 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
1078 <title>ADS WORKGROUP</title>
1080 <para>Print out workgroup name for specified kerberos realm.</para>
1085 <title>SAM CREATEBUILTINGROUP <NAME></title>
1088 (Re)Create a BUILTIN group.
1089 Only a wellknown set of BUILTIN groups can be created with this command.
1090 This is the list of currently recognized group names: Administrators,
1091 Users, Guests, Power Users, Account Operators, Server Operators, Print
1092 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
1095 This command requires a running Winbindd with idmap allocation properly
1096 configured. The group gid will be allocated out of the winbindd range.
1102 <title>SAM CREATELOCALGROUP <NAME></title>
1105 Create a LOCAL group (also known as Alias).
1107 This command requires a running Winbindd with idmap allocation properly
1108 configured. The group gid will be allocated out of the winbindd range.
1114 <title>SAM DELETELOCALGROUP <NAME></title>
1117 Delete an existing LOCAL group (also known as Alias).
1124 <title>SAM MAPUNIXGROUP <NAME></title>
1127 Map an existing Unix group and make it a Domain Group, the domain group
1128 will have the same name.
1134 <title>SAM UNMAPUNIXGROUP <NAME></title>
1137 Remove an existing group mapping entry.
1143 <title>SAM ADDMEM <GROUP> <MEMBER></title>
1146 Add a member to a Local group. The group can be specified only by name,
1147 the member can be specified by name or SID.
1153 <title>SAM DELMEM <GROUP> <MEMBER></title>
1156 Remove a member from a Local group. The group and the member must be
1163 <title>SAM LISTMEM <GROUP></title>
1166 List Local group members. The group must be specified by name.
1172 <title>SAM LIST <users|groups|localgroups|builtin|workstations> [verbose]</title>
1175 List the specified set of accounts by name. If verbose is specified,
1176 the rid and description is also provided for each account.
1182 <title>SAM RIGHTS LIST</title>
1185 List all available privileges.
1191 <title>SAM RIGHTS GRANT <NAME> <PRIVILEGE></title>
1194 Grant one or more privileges to a user.
1200 <title>SAM RIGHTS REVOKE <NAME> <PRIVILEGE></title>
1203 Revoke one or more privileges from a user.
1209 <title>SAM SHOW <NAME></title>
1212 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1219 <title>SAM SET HOMEDIR <NAME> <DIRECTORY></title>
1222 Set the home directory for a user account.
1228 <title>SAM SET PROFILEPATH <NAME> <PATH></title>
1231 Set the profile path for a user account.
1237 <title>SAM SET COMMENT <NAME> <COMMENT></title>
1240 Set the comment for a user or group account.
1246 <title>SAM SET FULLNAME <NAME> <FULL NAME></title>
1249 Set the full name for a user account.
1255 <title>SAM SET LOGONSCRIPT <NAME> <SCRIPT></title>
1258 Set the logon script for a user account.
1264 <title>SAM SET HOMEDRIVE <NAME> <DRIVE></title>
1267 Set the home drive for a user account.
1273 <title>SAM SET WORKSTATIONS <NAME> <WORKSTATIONS></title>
1276 Set the workstations a user account is allowed to log in from.
1282 <title>SAM SET DISABLE <NAME></title>
1285 Set the "disabled" flag for a user account.
1291 <title>SAM SET PWNOTREQ <NAME></title>
1294 Set the "password not required" flag for a user account.
1300 <title>SAM SET AUTOLOCK <NAME></title>
1303 Set the "autolock" flag for a user account.
1309 <title>SAM SET PWNOEXP <NAME></title>
1312 Set the "password do not expire" flag for a user account.
1318 <title>SAM SET PWDMUSTCHANGENOW <NAME> [yes|no]</title>
1321 Set or unset the "password must change" flag for a user account.
1327 <title>SAM POLICY LIST</title>
1330 List the available account policies.
1336 <title>SAM POLICY SHOW <account policy></title>
1339 Show the account policy value.
1345 <title>SAM POLICY SET <account policy> <value></title>
1348 Set a value for the account policy.
1349 Valid values can be: "forever", "never", "off", or a number.
1355 <title>SAM PROVISION</title>
1358 Only available if ldapsam:editposix is set and winbindd is running.
1359 Properly populates the ldap tree with the basic accounts (Administrator)
1360 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1366 <title>IDMAP DUMP <local tdb file name></title>
1369 Dumps the mappings contained in the local tdb file specified.
1370 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1376 <title>IDMAP RESTORE [input file]</title>
1379 Restore the mappings from the specified file or stdin.
1385 <title>IDMAP SECRET <DOMAIN> <secret></title>
1388 Store a secret for the specified domain, used primarily for domains
1389 that use idmap_ldap as a backend. In this case the secret is used
1390 as the password for the user DN used to bind to the ldap server.
1397 <title>IDMAP DELETE [-f] [--db=<DB>] <ID></title>
1400 Delete a mapping sid <-> gid or sid <-> uid from the IDMAP database.
1401 The mapping is given by <ID> which may either be a sid: S-x-..., a gid: "GID number" or a uid: "UID number".
1402 Use -f to delete an invalid partial mapping <ID> -> xx
1405 Use "smbcontrol all idmap ..." to notify running smbd instances.
1406 See the <citerefentry><refentrytitle>smbcontrol</refentrytitle>
1407 <manvolnum>1</manvolnum></citerefentry> manpage for details.
1413 <title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=<DB>]</title>
1416 Check and repair the IDMAP database. If no option is given a read only check
1417 of the database is done. Among others an interactive or automatic repair mode
1418 may be chosen with one of the following options:
1421 <varlistentry><term>-r|--repair</term>
1423 Interactive repair mode, ask a lot of questions.
1427 <varlistentry><term>-a|--auto</term>
1429 Noninteractive repair mode, use default answers.
1433 <varlistentry><term>-v|--verbose</term>
1435 Produce more output.
1439 <varlistentry><term>-f|--force</term>
1441 Try to apply changes, even if they do not apply cleanly.
1445 <varlistentry><term>-T|--test</term>
1447 Dry run, show what changes would be made but don't touch anything.
1451 <varlistentry><term>-l|--lock</term>
1453 Lock the database while doing the check.
1457 <varlistentry><term>--db <DB></term>
1459 Check the specified database.
1462 <varlistentry><term></term>
1468 It reports about the finding of the following errors:
1471 <varlistentry><term>Missing reverse mapping:</term>
1473 A record with mapping A->B where there is no B->A. Default action
1474 in repair mode is to "fix" this by adding the reverse mapping.
1478 <varlistentry><term>Invalid mapping:</term>
1480 A record with mapping A->B where B->C. Default action
1481 is to "delete" this record.
1485 <varlistentry><term>Missing or invalid HWM:</term>
1487 A high water mark is not at least equal to the largest ID in the
1488 database. Default action is to "fix" this by setting it to the
1489 largest ID found +1.
1493 <varlistentry><term>Invalid record:</term>
1495 Something we failed to parse. Default action is to "edit" it
1496 in interactive and "delete" it in automatic mode.
1505 <title>USERSHARE</title>
1507 <para>Starting with version 3.0.23, a Samba server now supports the ability for
1508 non-root users to add user defined shares to be exported using the "net usershare"
1513 To set this up, first set up your smb.conf by adding to the [global] section:
1515 usershare path = /usr/local/samba/lib/usershares
1517 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
1518 set the group owner to the UNIX group who should have the ability to create usershares,
1519 for example a group called "serverops".
1521 Set the permissions on /usr/local/samba/lib/usershares to 01770.
1523 (Owner and group all access, no access for others, plus the sticky bit,
1524 which means that a file in that directory can be renamed or deleted only
1525 by the owner of the file).
1527 Finally, tell smbd how many usershares you will allow by adding to the [global]
1528 section of smb.conf a line such as :
1530 usershare max shares = 100.
1532 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
1533 can create user defined shares on demand using the commands below.
1536 <para>The usershare commands are:
1539 <member>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</member>
1540 <member>net usershare delete sharename - to delete a user defined share.</member>
1541 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
1542 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
1548 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
1551 Add or replace a new user defined share, with name "sharename".
1555 "path" specifies the absolute pathname on the system to be exported.
1556 Restrictions may be put on this, see the global smb.conf parameters:
1557 "usershare owner only", "usershare prefix allow list", and
1558 "usershare prefix deny list".
1562 The optional "comment" parameter is the comment that will appear
1563 on the share when browsed to by a client.
1566 <para>The optional "acl" field
1567 specifies which users have read and write access to the entire share.
1568 Note that guest connections are not allowed unless the smb.conf parameter
1569 "usershare allow guests" has been set. The definition of a user
1570 defined share acl is: "user:permission", where user is a valid
1571 username on the system and permission can be "F", "R", or "D".
1572 "F" stands for "full permissions", ie. read and write permissions.
1573 "D" stands for "deny" for a user, ie. prevent this user from accessing
1575 "R" stands for "read only", ie. only allow read access to this
1576 share (no creation of new files or directories or writing to files).
1580 The default if no "acl" is given is "Everyone:R", which means any
1581 authenticated user has read-only access.
1585 The optional "guest_ok" has the same effect as the parameter of the
1586 same name in smb.conf, in that it allows guest access to this user
1587 defined share. This parameter is only allowed if the global parameter
1588 "usershare allow guests" has been set to true in the smb.conf.
1591 There is no separate command to modify an existing user defined share,
1592 just use the "net usershare add [sharename]" command using the same
1593 sharename as the one you wish to modify and specify the new options
1594 you wish. The Samba smbd daemon notices user defined share modifications
1595 at connect time so will see the change immediately, there is no need
1596 to restart smbd on adding, deleting or changing a user defined share.
1600 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
1603 Deletes the user defined share by name. The Samba smbd daemon
1604 immediately notices this change, although it will not disconnect
1605 any users currently connected to the deleted share.
1611 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1614 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1618 net usershare info on its own dumps out info on the user defined shares that were
1619 created by the current user, or restricts them to share names that match the given
1620 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1621 If the '-l' or '--long' option is also given, it prints out info on user defined
1622 shares created by other users.
1626 The information given about a share looks like:
1631 usershare_acl=Everyone:F
1634 And is a list of the current settings of the user defined share that can be
1635 modified by the "net usershare add" command.
1641 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
1644 List all the user defined shares owned by the current user matching the given pattern, or all users.
1648 net usershare list on its own list out the names of the user defined shares that were
1649 created by the current user, or restricts the list to share names that match the given
1650 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1651 If the '-l' or '--long' option is also given, it includes the names of user defined
1652 shares created by other users.
1660 <title>[RPC] CONF</title>
1662 <para>Starting with version 3.2.0, a Samba server can be configured by data
1663 stored in registry. This configuration data can be edited with the new "net
1664 conf" commands. There is also the possiblity to configure a remote Samba server
1665 by enabling the RPC conf mode and specifying the the address of the remote server.
1669 The deployment of this configuration data can be activated in two levels from the
1670 <emphasis>smb.conf</emphasis> file: Share definitions from registry are
1671 activated by setting <parameter>registry shares</parameter> to
1672 <quote>yes</quote> in the [global] section and global configuration options are
1673 activated by setting <smbconfoption name="include">registry</smbconfoption> in
1674 the [global] section for a mixed configuration or by setting
1675 <smbconfoption name="config backend">registry</smbconfoption> in the [global]
1676 section for a registry-only configuration.
1677 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
1678 <manvolnum>5</manvolnum></citerefentry> manpage for details.
1681 <para>The conf commands are:
1683 <member>net [rpc] conf list - Dump the complete configuration in smb.conf like
1685 <member>net [rpc] conf import - Import configuration from file in smb.conf
1687 <member>net [rpc] conf listshares - List the registry shares.</member>
1688 <member>net [rpc] conf drop - Delete the complete configuration from
1690 <member>net [rpc] conf showshare - Show the definition of a registry share.</member>
1691 <member>net [rpc] conf addshare - Create a new registry share.</member>
1692 <member>net [rpc] conf delshare - Delete a registry share.</member>
1693 <member>net [rpc] conf setparm - Store a parameter.</member>
1694 <member>net [rpc] conf getparm - Retrieve the value of a parameter.</member>
1695 <member>net [rpc] conf delparm - Delete a parameter.</member>
1696 <member>net [rpc] conf getincludes - Show the includes of a share definition.</member>
1697 <member>net [rpc] conf setincludes - Set includes for a share.</member>
1698 <member>net [rpc] conf delincludes - Delete includes from a share definition.</member>
1703 <title>[RPC] CONF LIST</title>
1706 Print the configuration data stored in the registry in a smb.conf-like format to
1712 <title>[RPC] CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
1715 This command imports configuration from a file in smb.conf format.
1716 If a section encountered in the input file is present in registry,
1717 its contents is replaced. Sections of registry configuration that have
1718 no counterpart in the input file are not affected. If you want to delete these,
1719 you will have to use the "net conf drop" or "net conf delshare" commands.
1720 Optionally, a section may be specified to restrict the effect of the
1721 import command to that specific section. A test mode is enabled by specifying
1722 the parameter "-T" on the commandline. In test mode, no changes are made to the
1723 registry, and the resulting configuration is printed to standard output instead.
1728 <title>[RPC] CONF LISTSHARES</title>
1731 List the names of the shares defined in registry.
1736 <title>[RPC] CONF DROP</title>
1739 Delete the complete configuration data from registry.
1744 <title>[RPC] CONF SHOWSHARE <replaceable>sharename</replaceable></title>
1747 Show the definition of the share or section specified. It is valid to specify
1748 "global" as sharename to retrieve the global configuration options from
1754 <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>
1756 <para>Create a new share definition in registry.
1757 The sharename and path have to be given. The share name may
1758 <emphasis>not</emphasis> be "global". Optionally, values for the very
1759 common options "writeable", "guest ok" and a "comment" may be specified.
1760 The same result may be obtained by a sequence of "net conf setparm"
1766 <title>[RPC] CONF DELSHARE <replaceable>sharename</replaceable></title>
1769 Delete a share definition from registry.
1774 <title>[RPC] CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
1777 Store a parameter in registry. The section may be global or a sharename.
1778 The section is created if it does not exist yet.
1783 <title>[RPC] CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1786 Show a parameter stored in registry.
1791 <title>[RPC] CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1794 Delete a parameter stored in registry.
1799 <title>[RPC] CONF GETINCLUDES <replaceable>section</replaceable></title>
1802 Get the list of includes for the provided section (global or share).
1806 Note that due to the nature of the registry database and the nature of include directives,
1807 the includes need special treatment: Parameters are stored in registry by the parameter
1808 name as valuename, so there is only ever one instance of a parameter per share.
1809 Also, a specific order like in a text file is not guaranteed. For all real
1810 parameters, this is perfectly ok, but the include directive is rather a meta
1811 parameter, for which, in the smb.conf text file, the place where it is specified
1812 between the other parameters is very important. This can not be achieved by the
1813 simple registry smbconf data model, so there is one ordered list of includes
1814 per share, and this list is evaluated after all the parameters of the share.
1818 Further note that currently, only files can be included from registry
1819 configuration. In the future, there will be the ability to include configuration
1820 data from other registry keys.
1825 <title>[RPC] CONF SETINCLUDES <replaceable>section</replaceable> [<replaceable>filename</replaceable>]+</title>
1828 Set the list of includes for the provided section (global or share) to the given
1829 list of one or more filenames. The filenames may contain the usual smb.conf
1835 <title>[RPC] CONF DELINCLUDES <replaceable>section</replaceable></title>
1838 Delete the list of includes from the provided section (global or share).
1845 <title>REGISTRY</title>
1847 Manipulate Samba's registry.
1850 <para>The registry commands are:
1852 <member>net registry enumerate - Enumerate registry keys and values.</member>
1853 <member>net registry enumerate_recursive - Enumerate registry key and its subkeys.</member>
1854 <member>net registry createkey - Create a new registry key.</member>
1855 <member>net registry deletekey - Delete a registry key.</member>
1856 <member>net registry deletekey_recursive - Delete a registry key with subkeys.</member>
1857 <member>net registry getvalue - Print a registry value.</member>
1858 <member>net registry getvalueraw - Print a registry value (raw format).</member>
1859 <member>net registry setvalue - Set a new registry value.</member>
1860 <member>net registry increment - Increment a DWORD registry value under a lock.
1862 <member>net registry deletevalue - Delete a registry value.</member>
1863 <member>net registry getsd - Get security descriptor.</member>
1864 <member>net registry getsd_sdd1 - Get security descriptor in sddl format.
1866 <member>net registry setsd_sdd1 - Set security descriptor from sddl format
1868 <member>net registry import - Import a registration entries (.reg) file.
1870 <member>net registry export - Export a registration entries (.reg) file.
1872 <member>net registry convert - Convert a registration entries (.reg) file.
1874 <member>net registry check - Check and reapair a registry database.
1880 <title>REGISTRY ENUMERATE <replaceable>key</replaceable> </title>
1881 <para>Enumerate subkeys and values of <emphasis>key</emphasis>.
1886 <title>REGISTRY ENUMERATE_RECURSIVE <replaceable>key</replaceable> </title>
1887 <para>Enumerate values of <emphasis>key</emphasis> and its subkeys.
1892 <title>REGISTRY CREATEKEY <replaceable>key</replaceable> </title>
1893 <para>Create a new <emphasis>key</emphasis> if not yet existing.
1898 <title>REGISTRY DELETEKEY <replaceable>key</replaceable> </title>
1899 <para>Delete the given <emphasis>key</emphasis> and its
1900 values from the registry, if it has no subkeys.
1905 <title>REGISTRY DELETEKEY_RECURSIVE <replaceable>key</replaceable> </title>
1906 <para>Delete the given <emphasis>key</emphasis> and all of its
1907 subkeys and values from the registry.
1912 <title>REGISTRY GETVALUE <replaceable>key</replaceable> <!--
1913 --><replaceable>name</replaceable></title>
1915 <para>Output type and actual value of the value <emphasis>name</emphasis>
1916 of the given <emphasis>key</emphasis>.
1921 <title>REGISTRY GETVALUERAW <replaceable>key</replaceable> <!--
1922 --><replaceable>name</replaceable></title>
1923 <para>Output the actual value of the value <emphasis>name</emphasis>
1924 of the given <emphasis>key</emphasis>.
1929 <title>REGISTRY SETVALUE <replaceable>key</replaceable> <!--
1930 --><replaceable>name</replaceable> <replaceable>type</replaceable> <!--
1931 --><replaceable>value</replaceable> ...<!--
1934 <para>Set the value <emphasis>name</emphasis>
1935 of an existing <emphasis>key</emphasis>.
1936 <emphasis>type</emphasis> may be one of
1937 <emphasis>sz</emphasis>, <emphasis>multi_sz</emphasis> or
1938 <emphasis>dword</emphasis>.
1939 In case of <emphasis>multi_sz</emphasis> <replaceable>value</replaceable> may
1940 be given multiple times.
1945 <title>REGISTRY INCREMENT <replaceable>key</replaceable> <!--
1946 --><replaceable>name</replaceable> <replaceable>[inc]</replaceable><!--
1949 <para>Increment the DWORD value <emphasis>name</emphasis>
1950 of <emphasis>key</emphasis> by <replaceable>inc</replaceable>
1951 while holding a g_lock.
1952 <emphasis>inc</emphasis> defaults to 1.
1957 <title>REGISTRY DELETEVALUE <replaceable>key</replaceable> <!--
1958 --><replaceable>name</replaceable></title>
1960 <para>Delete the value <emphasis>name</emphasis>
1961 of the given <emphasis>key</emphasis>.
1966 <title>REGISTRY GETSD <replaceable>key</replaceable></title>
1968 <para>Get the security descriptor of the given <emphasis>key</emphasis>.
1973 <title>REGISTRY GETSD_SDDL <replaceable>key</replaceable></title>
1975 <para>Get the security descriptor of the given <emphasis>key</emphasis> as a
1976 Security Descriptor Definition Language (SDDL) string.
1981 <title>REGISTRY SETSD_SDDL <replaceable>key</replaceable><!--
1982 --><replaceable>sd</replaceable></title>
1984 <para>Set the security descriptor of the given <emphasis>key</emphasis> from a
1985 Security Descriptor Definition Language (SDDL) string <emphasis>sd</emphasis>.
1990 <title>REGISTRY IMPORT <replaceable>file</replaceable><!--
1991 --><replaceable> [--precheck <check-file>] [opt]</replaceable></title>
1992 <para>Import a registration entries (.reg) <emphasis>file</emphasis>.</para>
1993 <para>The following options are available:</para>
1995 <varlistentry><term>--precheck <replaceable>check-file</replaceable></term>
1997 This is a mechanism to check the existence or non-existence of
1998 certain keys or values specified in a precheck file before applying
2000 The import file will only be applied if the precheck succeeds.
2003 The check-file follows the normal registry file syntax with the
2004 following semantics:
2007 <listitem><para><value name>=<value> checks whether the
2008 value exists and has the given value.</para></listitem>
2009 <listitem><para><value name>=- checks whether the value does
2010 not exist.</para></listitem>
2011 <listitem><para>[key] checks whether the key exists.</para>
2013 <listitem><para>[-key] checks whether the key does not exist.</para>
2022 <title>REGISTRY EXPORT <replaceable>key</replaceable><!--
2023 --><replaceable>file</replaceable><!--
2024 --><replaceable>[opt]</replaceable></title>
2026 <para>Export a <emphasis>key</emphasis> to a registration entries (.reg)
2027 <emphasis>file</emphasis>.
2032 <title>REGISTRY CONVERT <replaceable>in</replaceable> <!--
2033 --><replaceable>out</replaceable> <!--
2034 --><replaceable>[[inopt] outopt]</replaceable></title>
2036 <para>Convert a registration entries (.reg) file <emphasis>in</emphasis>.
2041 <title>REGISTRY CHECK [-ravTl] [-o <ODB>] [--wipe] [<DB>]</title>
2042 <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
2045 <varlistentry><term>-r|--repair</term>
2047 Interactive repair mode, ask a lot of questions.
2051 <varlistentry><term>-a|--auto</term>
2053 Noninteractive repair mode, use default answers.
2057 <varlistentry><term>-v|--verbose</term>
2059 Produce more output.
2063 <varlistentry><term>-T|--test</term>
2065 Dry run, show what changes would be made but don't touch anything.
2069 <varlistentry><term>-l|--lock</term>
2071 Lock the database while doing the check.
2075 <varlistentry><term>--reg-version={1,2,3}</term>
2077 Specify the format of the registry database. If not given it defaults to
2078 the value of the binary or, if an registry.tdb is explizitly stated at
2079 the commandline, to the value found in the INFO/version record.
2083 <varlistentry><term>[--db] <DB></term>
2085 Check the specified database.
2089 <varlistentry><term>-o|--output <ODB></term>
2091 Create a new registry database <ODB> instead of modifying the
2092 input. If <ODB> is already existing --wipe may be used to
2097 <varlistentry><term>--wipe</term>
2099 Replace the registry database instead of modifying the input or
2100 overwrite an existing output database.
2104 <varlistentry><term></term>
2115 <title>EVENTLOG</title>
2117 <para>Starting with version 3.4.0 net can read, dump, import and export native
2118 win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools.
2122 The import and export of evt files can only succeed when <parameter>eventlog list</parameter> is used in
2123 <emphasis>smb.conf</emphasis> file.
2124 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2127 <para>The eventlog commands are:
2129 <member>net eventlog dump - Dump a eventlog *.evt file on the screen.</member>
2130 <member>net eventlog import - Import a eventlog *.evt into the samba internal
2131 tdb based representation of eventlogs.</member>
2132 <member>net eventlog export - Export the samba internal tdb based representation
2133 of eventlogs into an eventlog *.evt file.</member>
2138 <title>EVENTLOG DUMP <replaceable>filename</replaceable></title>
2141 Prints a eventlog *.evt file to standard output.
2146 <title>EVENTLOG IMPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2149 Imports a eventlog *.evt file defined by <replaceable>filename</replaceable> into the
2150 samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>.
2151 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2152 defined in smb.conf.
2153 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2159 <title>EVENTLOG EXPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2162 Exports the samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>
2163 to a eventlog *.evt file defined by <replaceable>filename</replaceable>.
2164 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2165 defined in smb.conf.
2166 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2176 <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.
2178 <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.
2181 <para>The client side support for remote join is implemented in the net dom commands which are:
2183 <member>net dom join - Join a remote computer into a domain.</member>
2184 <member>net dom unjoin - Unjoin a remote computer from a domain.</member>
2185 <member>net dom renamecomputer - Renames a remote computer joined to a domain.</member>
2190 <title>DOM JOIN <replaceable>domain=DOMAIN</replaceable> <replaceable>ou=OU</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2193 Joins a computer into a domain. This command supports the following additional parameters:
2198 <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>
2200 <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>
2202 <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>
2204 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2206 <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>
2211 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.
2215 net dom join -S xp -U XP\\administrator%secret domain=MYDOM account=MYDOM\\administrator password=topsecret reboot.
2218 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.
2224 <title>DOM UNJOIN <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2227 Unjoins a computer from a domain. This command supports the following additional parameters:
2232 <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>
2234 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2236 <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>
2241 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.
2245 net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot.
2248 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.
2254 <title>DOM RENAMECOMPUTER <replaceable>newname=NEWNAME</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2257 Renames a computer that is joined to a domain. This command supports the following additional parameters:
2262 <listitem><para><replaceable>NEWNAME</replaceable> defines the new name of the machine in the domain.</para></listitem>
2264 <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>
2266 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2268 <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>
2273 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.
2277 net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot.
2280 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.
2288 <title>G_LOCK</title>
2290 <para>Manage global locks.</para>
2293 <title>G_LOCK DO <replaceable>lockname</replaceable> <replaceable>timeout</replaceable> <replaceable>command</replaceable></title>
2296 Execute a shell command under a global lock. This might be useful to define the
2297 order in which several shell commands will be executed. The locking information
2298 is stored in a file called <filename>g_lock.tdb</filename>. In setups with CTDB
2299 running, the locking information will be available on all cluster nodes.
2303 <listitem><para><replaceable>LOCKNAME</replaceable> defines the name of the global lock.</para></listitem>
2304 <listitem><para><replaceable>TIMEOUT</replaceable> defines the timeout.</para></listitem>
2305 <listitem><para><replaceable>COMMAND</replaceable> defines the shell command to execute.</para></listitem>
2310 <title>G_LOCK LOCKS</title>
2313 Print a list of all currently existing locknames.
2318 <title>G_LOCK DUMP <replaceable>lockname</replaceable></title>
2321 Dump the locking table of a certain global lock.
2328 <title>HELP [COMMAND]</title>
2330 <para>Gives usage information for the specified command.</para>
2337 <title>VERSION</title>
2339 <para>This man page is complete for version 3 of the Samba
2344 <title>AUTHOR</title>
2346 <para>The original Samba software and related utilities
2347 were created by Andrew Tridgell. Samba is now developed
2348 by the Samba Team as an Open Source project similar
2349 to the way the Linux kernel is developed.</para>
2351 <para>The net manpage was written by Jelmer Vernooij.</para>