1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>net</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="net.8"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>net — Tool for administration of Samba and remote 2 CIFS servers. 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="literal">net</code> {<ads|rap|rpc>} [-h] [-w workgroup] [-W myworkgroup] [-U user] [-I ip-address] [-p port] [-n myname] [-s conffile] [-S server] [-l] [-P] [-d debuglevel] [-V] [--request-timeout seconds]</p></div></div><div class="refsect1" lang="en"><a name="id2483514"></a><h2>DESCRIPTION</h2><p>This tool is part of the <a class="citerefentry" href="samba.7.html"><span class="citerefentry"><span class="refentrytitle">samba</span>(7)</span></a> suite.</p><p>The Samba net utility is meant to work just like the net utility 4 available for windows and DOS. The first argument should be used 5 to specify the protocol to use when executing a certain command. 6 ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3) 7 clients and RPC can be used for NT4 and Windows 2000. If this 8 argument is omitted, net will try to determine it automatically. 9 Not all commands are available on all protocols. 10 </p></div><div class="refsect1" lang="en"><a name="id2483543"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">-h|--help</span></dt><dd><p>Print a summary of command line options. 11</p></dd><dt><span class="term">-w target-workgroup</span></dt><dd><p> 12 Sets target workgroup or domain. You have to specify 13 either this option or the IP address or the name of a server. 14 </p></dd><dt><span class="term">-W workgroup</span></dt><dd><p> 15 Sets client workgroup or domain 16 </p></dd><dt><span class="term">-U user</span></dt><dd><p> 17 User name to use 18 </p></dd><dt><span class="term">-I ip-address</span></dt><dd><p> 19 IP address of target server to use. You have to 20 specify either this option or a target workgroup or 21 a target server. 22 </p></dd><dt><span class="term">-p port</span></dt><dd><p> 23 Port on the target server to connect to (usually 139 or 445). 24 Defaults to trying 445 first, then 139. 25 </p></dd><dt><span class="term">-n|--netbiosname <primary NetBIOS name></span></dt><dd><p>This option allows you to override 26the NetBIOS name that Samba uses for itself. This is identical 27to setting the <a class="link" href="smb.conf.5.html#" target="_top"></a> parameter in the <code class="filename">smb.conf</code> file. 28However, a command 29line setting will take precedence over settings in 30<code class="filename">smb.conf</code>.</p></dd><dt><span class="term">-s|--configfile <configuration file></span></dt><dd><p>The file specified contains the 31configuration details required by the server. The 32information in this file includes server-specific 33information such as what printcap file to use, as well 34as descriptions of all the services that the server is 35to provide. See <code class="filename">smb.conf</code> for more information. 36The default configuration file name is determined at 37compile time.</p></dd><dt><span class="term">-S server</span></dt><dd><p> 38 Name of target server. You should specify either 39 this option or a target workgroup or a target IP address. 40 </p></dd><dt><span class="term">-l</span></dt><dd><p> 41 When listing data, give more information on each item. 42 </p></dd><dt><span class="term">-P</span></dt><dd><p> 43 Make queries to the external server using the machine account of the local server. 44 </p></dd><dt><span class="term">--request-timeout 30</span></dt><dd><p> 45 Let client requests timeout after 30 seconds the default is 10 46 seconds. 47 </p></dd><dt><span class="term">-d|--debuglevel=level</span></dt><dd><p><em class="replaceable"><code>level</code></em> is an integer 48from 0 to 10. The default value if this parameter is 49not specified is 0.</p><p>The higher this value, the more detail will be 50logged to the log files about the activities of the 51server. At level 0, only critical errors and serious 52warnings will be logged. Level 1 is a reasonable level for 53day-to-day running - it generates a small amount of 54information about operations carried out.</p><p>Levels above 1 will generate considerable 55amounts of log data, and should only be used when 56investigating a problem. Levels above 3 are designed for 57use only by developers and generate HUGE amounts of log 58data, most of which is extremely cryptic.</p><p>Note that specifying this parameter here will 59override the <a class="link" href="smb.conf.5.html#" target="_top"></a> parameter 60in the <code class="filename">smb.conf</code> file.</p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2481559"></a><h2>COMMANDS</h2><div class="refsect2" lang="en"><a name="id2481565"></a><h3>CHANGESECRETPW</h3><p>This command allows the Samba machine account password to be set from an external application 61to a machine account password that has already been stored in Active Directory. DO NOT USE this command 62unless you know exactly what you are doing. The use of this command requires that the force flag (-f) 63be used also. There will be NO command prompt. Whatever information is piped into stdin, either by 64typing at the command line or otherwise, will be stored as the literal machine password. Do NOT use 65this without care and attention as it will overwrite a legitimate machine password without warning. 66YOU HAVE BEEN WARNED. 67</p></div><div class="refsect2" lang="en"><a name="id2481586"></a><h3>TIME</h3><p>The <code class="literal">NET TIME</code> command allows you to view the time on a remote server 68 or synchronise the time on the local server with the time on the remote server.</p><div class="refsect3" lang="en"><a name="id2481603"></a><h4>TIME</h4><p>Without any options, the <code class="literal">NET TIME</code> command 69displays the time on the remote server. 70</p></div><div class="refsect3" lang="en"><a name="id2481619"></a><h4>TIME SYSTEM</h4><p>Displays the time on the remote server in a format ready for <code class="literal">/bin/date</code>.</p></div><div class="refsect3" lang="en"><a name="id2481636"></a><h4>TIME SET</h4><p>Tries to set the date and time of the local server to that on 71the remote server using <code class="literal">/bin/date</code>. </p></div><div class="refsect3" lang="en"><a name="id2481654"></a><h4>TIME ZONE</h4><p>Displays the timezone in hours from GMT on the remote computer.</p></div></div><div class="refsect2" lang="en"><a name="id2481666"></a><h3>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [createupn=UPN] [createcomputer=OU] [options]</h3><p> 72Join a domain. If the account already exists on the server, and 73[TYPE] is MEMBER, the machine will attempt to join automatically. 74(Assuming that the machine has been created in server manager) 75Otherwise, a password will be prompted for, and a new account may 76be created.</p><p> 77[TYPE] may be PDC, BDC or MEMBER to specify the type of server 78joining the domain. 79</p><p> 80[UPN] (ADS only) set the principalname attribute during the join. The default 81format is host/netbiosname@REALM. 82</p><p> 83[OU] (ADS only) Precreate the computer account in a specific OU. The 84OU string reads from top to bottom without RDNs, and is delimited by 85a '/'. Please note that '\' is used for escape by both the shell 86and ldap, so it may need to be doubled or quadrupled to pass through, 87and it is not used as a delimiter. 88</p></div><div class="refsect2" lang="en"><a name="id2481700"></a><h3>[RPC] OLDJOIN [options]</h3><p>Join a domain. Use the OLDJOIN option to join the domain 89using the old style of domain joining - you need to create a trust 90account in server manager first.</p></div><div class="refsect2" lang="en"><a name="id2481713"></a><h3>[RPC|ADS] USER</h3><div class="refsect3" lang="en"><a name="id2481718"></a><h4>[RPC|ADS] USER</h4><p>List all users</p></div><div class="refsect3" lang="en"><a name="id2481729"></a><h4>[RPC|ADS] USER DELETE <em class="replaceable"><code>target</code></em></h4><p>Delete specified user</p></div><div class="refsect3" lang="en"><a name="id2481741"></a><h4>[RPC|ADS] USER INFO <em class="replaceable"><code>target</code></em></h4><p>List the domain groups of the specified user.</p></div><div class="refsect3" lang="en"><a name="id2481754"></a><h4>[RPC|ADS] USER RENAME <em class="replaceable"><code>oldname</code></em> <em class="replaceable"><code>newname</code></em></h4><p>Rename specified user.</p></div><div class="refsect3" lang="en"><a name="id2481769"></a><h4>[RPC|ADS] USER ADD <em class="replaceable"><code>name</code></em> [password] [-F user flags] [-C comment]</h4><p>Add specified user.</p></div></div><div class="refsect2" lang="en"><a name="id2481784"></a><h3>[RPC|ADS] GROUP</h3><div class="refsect3" lang="en"><a name="id2481790"></a><h4>[RPC|ADS] GROUP [misc options] [targets]</h4><p>List user groups.</p></div><div class="refsect3" lang="en"><a name="id2481801"></a><h4>[RPC|ADS] GROUP DELETE <em class="replaceable"><code>name</code></em> [misc. options]</h4><p>Delete specified group.</p></div><div class="refsect3" lang="en"><a name="id2481814"></a><h4>[RPC|ADS] GROUP ADD <em class="replaceable"><code>name</code></em> [-C comment]</h4><p>Create specified group.</p></div></div><div class="refsect2" lang="en"><a name="id2481829"></a><h3>[RAP|RPC] SHARE</h3><div class="refsect3" lang="en"><a name="id2481834"></a><h4>[RAP|RPC] SHARE [misc. options] [targets]</h4><p>Enumerates all exported resources (network shares) on target server.</p></div><div class="refsect3" lang="en"><a name="id2481846"></a><h4>[RAP|RPC] SHARE ADD <em class="replaceable"><code>name=serverpath</code></em> [-C comment] [-M maxusers] [targets]</h4><p>Adds a share from a server (makes the export active). Maxusers 91specifies the number of users that can be connected to the 92share simultaneously.</p></div><div class="refsect3" lang="en"><a name="id2481863"></a><h4>SHARE DELETE <em class="replaceable"><code>sharename</code></em></h4><p>Delete specified share.</p></div></div><div class="refsect2" lang="en"><a name="id2481876"></a><h3>[RPC|RAP] FILE</h3><div class="refsect3" lang="en"><a name="id2481882"></a><h4>[RPC|RAP] FILE</h4><p>List all open files on remote server.</p></div><div class="refsect3" lang="en"><a name="id2481893"></a><h4>[RPC|RAP] FILE CLOSE <em class="replaceable"><code>fileid</code></em></h4><p>Close file with specified <em class="replaceable"><code>fileid</code></em> on 93remote server.</p></div><div class="refsect3" lang="en"><a name="id2481909"></a><h4>[RPC|RAP] FILE INFO <em class="replaceable"><code>fileid</code></em></h4><p> 94Print information on specified <em class="replaceable"><code>fileid</code></em>. 95Currently listed are: file-id, username, locks, path, permissions. 96</p></div><div class="refsect3" lang="en"><a name="id2481925"></a><h4>[RAP|RPC] FILE USER <em class="replaceable"><code>user</code></em></h4><p> 97List files opened by specified <em class="replaceable"><code>user</code></em>. 98Please note that <code class="literal">net rap file user</code> does not work 99against Samba servers. 100</p></div></div><div class="refsect2" lang="en"><a name="id2481949"></a><h3>SESSION</h3><div class="refsect3" lang="en"><a name="id2481955"></a><h4>RAP SESSION</h4><p>Without any other options, SESSION enumerates all active SMB/CIFS 101sessions on the target server.</p></div><div class="refsect3" lang="en"><a name="id2481966"></a><h4>RAP SESSION DELETE|CLOSE <em class="replaceable"><code>CLIENT_NAME</code></em></h4><p>Close the specified sessions.</p></div><div class="refsect3" lang="en"><a name="id2481978"></a><h4>RAP SESSION INFO <em class="replaceable"><code>CLIENT_NAME</code></em></h4><p>Give a list with all the open files in specified session.</p></div></div><div class="refsect2" lang="en"><a name="id2481993"></a><h3>RAP SERVER <em class="replaceable"><code>DOMAIN</code></em></h3><p>List all servers in specified domain or workgroup. Defaults 102to local domain.</p></div><div class="refsect2" lang="en"><a name="id2482006"></a><h3>RAP DOMAIN</h3><p>Lists all domains and workgroups visible on the 103current network.</p></div><div class="refsect2" lang="en"><a name="id2482018"></a><h3>RAP PRINTQ</h3><div class="refsect3" lang="en"><a name="id2482023"></a><h4>RAP PRINTQ INFO <em class="replaceable"><code>QUEUE_NAME</code></em></h4><p>Lists the specified print queue and print jobs on the server. 104If the <em class="replaceable"><code>QUEUE_NAME</code></em> is omitted, all 105queues are listed.</p></div><div class="refsect3" lang="en"><a name="id2532506"></a><h4>RAP PRINTQ DELETE <em class="replaceable"><code>JOBID</code></em></h4><p>Delete job with specified id.</p></div></div><div class="refsect2" lang="en"><a name="id2532518"></a><h3>RAP VALIDATE <em class="replaceable"><code>user</code></em> [<em class="replaceable"><code>password</code></em>]</h3><p> 106Validate whether the specified user can log in to the 107remote server. If the password is not specified on the commandline, it 108will be prompted. 109</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Currently NOT implemented.</p></div></div><div class="refsect2" lang="en"><a name="id2532541"></a><h3>RAP GROUPMEMBER</h3><div class="refsect3" lang="en"><a name="id2532547"></a><h4>RAP GROUPMEMBER LIST <em class="replaceable"><code>GROUP</code></em></h4><p>List all members of the specified group.</p></div><div class="refsect3" lang="en"><a name="id2532559"></a><h4>RAP GROUPMEMBER DELETE <em class="replaceable"><code>GROUP</code></em> <em class="replaceable"><code>USER</code></em></h4><p>Delete member from group.</p></div><div class="refsect3" lang="en"><a name="id2532574"></a><h4>RAP GROUPMEMBER ADD <em class="replaceable"><code>GROUP</code></em> <em class="replaceable"><code>USER</code></em></h4><p>Add member to group.</p></div></div><div class="refsect2" lang="en"><a name="id2532590"></a><h3>RAP ADMIN <em class="replaceable"><code>command</code></em></h3><p>Execute the specified <em class="replaceable"><code>command</code></em> on 110the remote server. Only works with OS/2 servers. 111</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Currently NOT implemented.</p></div></div><div class="refsect2" lang="en"><a name="id2532610"></a><h3>RAP SERVICE</h3><div class="refsect3" lang="en"><a name="id2532616"></a><h4>RAP SERVICE START <em class="replaceable"><code>NAME</code></em> [arguments...]</h4><p>Start the specified service on the remote server. Not implemented yet.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Currently NOT implemented.</p></div></div><div class="refsect3" lang="en"><a name="id2532634"></a><h4>RAP SERVICE STOP</h4><p>Stop the specified service on the remote server.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Currently NOT implemented.</p></div></div></div><div class="refsect2" lang="en"><a name="id2532650"></a><h3>RAP PASSWORD <em class="replaceable"><code>USER</code></em> <em class="replaceable"><code>OLDPASS</code></em> <em class="replaceable"><code>NEWPASS</code></em></h3><p> 112Change password of <em class="replaceable"><code>USER</code></em> from <em class="replaceable"><code>OLDPASS</code></em> to <em class="replaceable"><code>NEWPASS</code></em>. 113</p></div><div class="refsect2" lang="en"><a name="id2532678"></a><h3>LOOKUP</h3><div class="refsect3" lang="en"><a name="id2532683"></a><h4>LOOKUP HOST <em class="replaceable"><code>HOSTNAME</code></em> [<em class="replaceable"><code>TYPE</code></em>]</h4><p> 114Lookup the IP address of the given host with the specified type (netbios suffix). 115The type defaults to 0x20 (workstation). 116</p></div><div class="refsect3" lang="en"><a name="id2532701"></a><h4>LOOKUP LDAP [<em class="replaceable"><code>DOMAIN</code></em>]</h4><p>Give IP address of LDAP server of specified <em class="replaceable"><code>DOMAIN</code></em>. Defaults to local domain.</p></div><div class="refsect3" lang="en"><a name="id2532718"></a><h4>LOOKUP KDC [<em class="replaceable"><code>REALM</code></em>]</h4><p>Give IP address of KDC for the specified <em class="replaceable"><code>REALM</code></em>. 117Defaults to local realm.</p></div><div class="refsect3" lang="en"><a name="id2532735"></a><h4>LOOKUP DC [<em class="replaceable"><code>DOMAIN</code></em>]</h4><p>Give IP's of Domain Controllers for specified <em class="replaceable"><code> 118DOMAIN</code></em>. Defaults to local domain.</p></div><div class="refsect3" lang="en"><a name="id2532752"></a><h4>LOOKUP MASTER <em class="replaceable"><code>DOMAIN</code></em></h4><p>Give IP of master browser for specified <em class="replaceable"><code>DOMAIN</code></em> 119or workgroup. Defaults to local domain.</p></div></div><div class="refsect2" lang="en"><a name="id2532770"></a><h3>CACHE</h3><p>Samba uses a general caching interface called 'gencache'. It 120can be controlled using 'NET CACHE'.</p><p>All the timeout parameters support the suffixes: 121 122</p><table class="simplelist" border="0" summary="Simple list"><tr><td>s - Seconds</td></tr><tr><td>m - Minutes</td></tr><tr><td>h - Hours</td></tr><tr><td>d - Days</td></tr><tr><td>w - Weeks</td></tr></table><p> 123 124</p><div class="refsect3" lang="en"><a name="id2532805"></a><h4>CACHE ADD <em class="replaceable"><code>key</code></em> <em class="replaceable"><code>data</code></em> <em class="replaceable"><code>time-out</code></em></h4><p>Add specified key+data to the cache with the given timeout.</p></div><div class="refsect3" lang="en"><a name="id2532824"></a><h4>CACHE DEL <em class="replaceable"><code>key</code></em></h4><p>Delete key from the cache.</p></div><div class="refsect3" lang="en"><a name="id2532836"></a><h4>CACHE SET <em class="replaceable"><code>key</code></em> <em class="replaceable"><code>data</code></em> <em class="replaceable"><code>time-out</code></em></h4><p>Update data of existing cache entry.</p></div><div class="refsect3" lang="en"><a name="id2532855"></a><h4>CACHE SEARCH <em class="replaceable"><code>PATTERN</code></em></h4><p>Search for the specified pattern in the cache data.</p></div><div class="refsect3" lang="en"><a name="id2532868"></a><h4>CACHE LIST</h4><p> 125List all current items in the cache. 126</p></div><div class="refsect3" lang="en"><a name="id2532878"></a><h4>CACHE FLUSH</h4><p>Remove all the current items from the cache.</p></div></div><div class="refsect2" lang="en"><a name="id2532890"></a><h3>GETLOCALSID [DOMAIN]</h3><p>Prints the SID of the specified domain, or if the parameter is 127omitted, the SID of the local server.</p></div><div class="refsect2" lang="en"><a name="id2532901"></a><h3>SETLOCALSID S-1-5-21-x-y-z</h3><p>Sets SID for the local server to the specified SID.</p></div><div class="refsect2" lang="en"><a name="id2532912"></a><h3>GETDOMAINSID</h3><p>Prints the local machine SID and the SID of the current 128domain.</p></div><div class="refsect2" lang="en"><a name="id2532922"></a><h3>SETDOMAINSID</h3><p>Sets the SID of the current domain.</p></div><div class="refsect2" lang="en"><a name="id2532932"></a><h3>GROUPMAP</h3><p>Manage the mappings between Windows group SIDs and UNIX groups. 129Common options include:</p><div class="itemizedlist"><ul type="disc"><li><p>unixgroup - Name of the UNIX group</p></li><li><p>ntgroup - Name of the Windows NT group (must be 130 resolvable to a SID</p></li><li><p>rid - Unsigned 32-bit integer</p></li><li><p>sid - Full SID in the form of "S-1-..."</p></li><li><p>type - Type of the group; either 'domain', 'local', 131 or 'builtin'</p></li><li><p>comment - Freeform text description of the group</p></li></ul></div><div class="refsect3" lang="en"><a name="id2532975"></a><h4>GROUPMAP ADD</h4><p> 132Add a new group mapping entry: 133</p><pre class="programlisting"> 134net groupmap add {rid=int|sid=string} unixgroup=string \ 135 [type={domain|local}] [ntgroup=string] [comment=string] 136</pre><p> 137</p></div><div class="refsect3" lang="en"><a name="id2532992"></a><h4>GROUPMAP DELETE</h4><p>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</p><p>net groupmap delete {ntgroup=string|sid=SID}</p></div><div class="refsect3" lang="en"><a name="id2533008"></a><h4>GROUPMAP MODIFY</h4><p>Update en existing group entry.</p><p> 138</p><pre class="programlisting"> 139net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \ 140 [comment=string] [type={domain|local}] 141</pre><p> 142</p></div><div class="refsect3" lang="en"><a name="id2533028"></a><h4>GROUPMAP LIST</h4><p>List existing group mapping entries.</p><p>net groupmap list [verbose] [ntgroup=string] [sid=SID]</p></div></div><div class="refsect2" lang="en"><a name="id2533043"></a><h3>MAXRID</h3><p>Prints out the highest RID currently in use on the local 143server (by the active 'passdb backend'). 144</p></div><div class="refsect2" lang="en"><a name="id2533055"></a><h3>RPC INFO</h3><p>Print information about the domain of the remote server, 145such as domain name, domain sid and number of users and groups. 146</p></div><div class="refsect2" lang="en"><a name="id2533066"></a><h3>[RPC|ADS] TESTJOIN</h3><p>Check whether participation in a domain is still valid.</p></div><div class="refsect2" lang="en"><a name="id2533077"></a><h3>[RPC|ADS] CHANGETRUSTPW</h3><p>Force change of domain trust password.</p></div><div class="refsect2" lang="en"><a name="id2533088"></a><h3>RPC TRUSTDOM</h3><div class="refsect3" lang="en"><a name="id2533093"></a><h4>RPC TRUSTDOM ADD <em class="replaceable"><code>DOMAIN</code></em></h4><p>Add a interdomain trust account for <em class="replaceable"><code>DOMAIN</code></em>. 147This is in fact a Samba account named <em class="replaceable"><code>DOMAIN$</code></em> 148with the account flag <code class="constant">'I'</code> (interdomain trust account). 149This is required for incoming trusts to work. It makes Samba be a 150trusted domain of the foreign (trusting) domain. 151Users of the Samba domain will be made available in the foreign domain. 152If the command is used against localhost it has the same effect as 153<code class="literal">smbpasswd -a -i DOMAIN</code>. Please note that both commands 154expect a appropriate UNIX account. 155</p></div><div class="refsect3" lang="en"><a name="id2533127"></a><h4>RPC TRUSTDOM DEL <em class="replaceable"><code>DOMAIN</code></em></h4><p>Remove interdomain trust account for 156<em class="replaceable"><code>DOMAIN</code></em>. If it is used against localhost 157it has the same effect as <code class="literal">smbpasswd -x DOMAIN$</code>. 158</p></div><div class="refsect3" lang="en"><a name="id2533149"></a><h4>RPC TRUSTDOM ESTABLISH <em class="replaceable"><code>DOMAIN</code></em></h4><p> 159Establish a trust relationship to a trusted domain. 160Interdomain account must already be created on the remote PDC. 161This is required for outgoing trusts to work. It makes Samba be a 162trusting domain of a foreign (trusted) domain. 163Users of the foreign domain will be made available in our domain. 164You'll need winbind and a working idmap config to make them 165appear in your system. 166</p></div><div class="refsect3" lang="en"><a name="id2533168"></a><h4>RPC TRUSTDOM REVOKE <em class="replaceable"><code>DOMAIN</code></em></h4><p>Abandon relationship to trusted domain</p></div><div class="refsect3" lang="en"><a name="id2533180"></a><h4>RPC TRUSTDOM LIST</h4><p>List all interdomain trust relationships.</p></div><div class="refsect3" lang="en"><a name="id2533190"></a><h4>RPC RIGHTS</h4><p>This subcommand is used to view and manage Samba's rights assignments (also 167referred to as privileges). There are three options currently available: 168<em class="parameter"><code>list</code></em>, <em class="parameter"><code>grant</code></em>, and 169<em class="parameter"><code>revoke</code></em>. More details on Samba's privilege model and its use 170can be found in the Samba-HOWTO-Collection.</p></div></div><div class="refsect2" lang="en"><a name="id2533221"></a><h3>RPC ABORTSHUTDOWN</h3><p>Abort the shutdown of a remote server.</p></div><div class="refsect2" lang="en"><a name="id2533232"></a><h3>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</h3><p>Shut down the remote server.</p><div class="variablelist"><dl><dt><span class="term">-r</span></dt><dd><p> 171Reboot after shutdown. 172</p></dd><dt><span class="term">-f</span></dt><dd><p> 173Force shutting down all applications. 174</p></dd><dt><span class="term">-t timeout</span></dt><dd><p> 175Timeout before system will be shut down. An interactive 176user of the system can use this time to cancel the shutdown. 177</p></dd><dt><span class="term">-C message</span></dt><dd><p>Display the specified message on the screen to 178announce the shutdown.</p></dd></dl></div></div><div class="refsect2" lang="en"><a name="id2533293"></a><h3>RPC SAMDUMP</h3><p>Print out sam database of remote server. You need 179to run this against the PDC, from a Samba machine joined as a BDC. </p></div><div class="refsect2" lang="en"><a name="id2533305"></a><h3>RPC VAMPIRE</h3><p>Export users, aliases and groups from remote server to 180local server. You need to run this against the PDC, from a Samba machine joined as a BDC. 181</p></div><div class="refsect2" lang="en"><a name="id2533317"></a><h3>RPC VAMPIRE KEYTAB</h3><p>Dump remote SAM database to local Kerberos keytab file. 182</p></div><div class="refsect2" lang="en"><a name="id2533328"></a><h3>RPC VAMPIRE LDIF</h3><p>Dump remote SAM database to local LDIF file or standard output. 183</p></div><div class="refsect2" lang="en"><a name="id2533338"></a><h3>RPC GETSID</h3><p>Fetch domain SID and store it in the local <code class="filename">secrets.tdb</code>. </p></div><div class="refsect2" lang="en"><a name="id2533354"></a><h3>ADS LEAVE</h3><p>Make the remote host leave the domain it is part of. </p></div><div class="refsect2" lang="en"><a name="id2533365"></a><h3>ADS STATUS</h3><p>Print out status of machine account of the local machine in ADS. 184Prints out quite some debug info. Aimed at developers, regular 185users should use <code class="literal">NET ADS TESTJOIN</code>.</p></div><div class="refsect2" lang="en"><a name="id2533382"></a><h3>ADS PRINTER</h3><div class="refsect3" lang="en"><a name="id2533387"></a><h4>ADS PRINTER INFO [<em class="replaceable"><code>PRINTER</code></em>] [<em class="replaceable"><code>SERVER</code></em>]</h4><p> 186Lookup info for <em class="replaceable"><code>PRINTER</code></em> on <em class="replaceable"><code>SERVER</code></em>. The printer name defaults to "*", the 187server name defaults to the local host.</p></div><div class="refsect3" lang="en"><a name="id2533411"></a><h4>ADS PRINTER PUBLISH <em class="replaceable"><code>PRINTER</code></em></h4><p>Publish specified printer using ADS.</p></div><div class="refsect3" lang="en"><a name="id2533424"></a><h4>ADS PRINTER REMOVE <em class="replaceable"><code>PRINTER</code></em></h4><p>Remove specified printer from ADS directory.</p></div></div><div class="refsect2" lang="en"><a name="id2533437"></a><h3>ADS SEARCH <em class="replaceable"><code>EXPRESSION</code></em> <em class="replaceable"><code>ATTRIBUTES...</code></em></h3><p>Perform a raw LDAP search on a ADS server and dump the results. The 188expression is a standard LDAP search expression, and the 189attributes are a list of LDAP fields to show in the results.</p><p>Example: <strong class="userinput"><code>net ads search '(objectCategory=group)' sAMAccountName</code></strong> 190</p></div><div class="refsect2" lang="en"><a name="id2533465"></a><h3>ADS DN <em class="replaceable"><code>DN</code></em> <em class="replaceable"><code>(attributes)</code></em></h3><p> 191Perform a raw LDAP search on a ADS server and dump the results. The 192DN standard LDAP DN, and the attributes are a list of LDAP fields 193to show in the result. 194</p><p>Example: <strong class="userinput"><code>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</code></strong></p></div><div class="refsect2" lang="en"><a name="id2533491"></a><h3>ADS WORKGROUP</h3><p>Print out workgroup name for specified kerberos realm.</p></div><div class="refsect2" lang="en"><a name="id2533502"></a><h3>SAM CREATEBUILTINGROUP <NAME></h3><p> 195(Re)Create a BUILTIN group. 196Only a wellknown set of BUILTIN groups can be created with this command. 197This is the list of currently recognized group names: Administrators, 198Users, Guests, Power Users, Account Operators, Server Operators, Print 199Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000 200compatible Access. 201 202This command requires a running Winbindd with idmap allocation properly 203configured. The group gid will be allocated out of the winbindd range. 204</p></div><div class="refsect2" lang="en"><a name="id2533521"></a><h3>SAM CREATELOCALGROUP <NAME></h3><p> 205Create a LOCAL group (also known as Alias). 206 207This command requires a running Winbindd with idmap allocation properly 208configured. The group gid will be allocated out of the winbindd range. 209</p></div><div class="refsect2" lang="en"><a name="id2533535"></a><h3>SAM DELETELOCALGROUP <NAME></h3><p> 210Delete an existing LOCAL group (also known as Alias). 211 212</p></div><div class="refsect2" lang="en"><a name="id2533546"></a><h3>SAM MAPUNIXGROUP <NAME></h3><p> 213Map an existing Unix group and make it a Domain Group, the domain group 214will have the same name. 215</p></div><div class="refsect2" lang="en"><a name="id2533558"></a><h3>SAM UNMAPUNIXGROUP <NAME></h3><p> 216Remove an existing group mapping entry. 217</p></div><div class="refsect2" lang="en"><a name="id2533570"></a><h3>SAM ADDMEM <GROUP> <MEMBER></h3><p> 218Add a member to a Local group. The group can be specified only by name, 219the member can be specified by name or SID. 220</p></div><div class="refsect2" lang="en"><a name="id2533582"></a><h3>SAM DELMEM <GROUP> <MEMBER></h3><p> 221Remove a member from a Local group. The group and the member must be 222specified by name. 223</p></div><div class="refsect2" lang="en"><a name="id2533595"></a><h3>SAM LISTMEM <GROUP></h3><p> 224List Local group members. The group must be specified by name. 225</p></div><div class="refsect2" lang="en"><a name="id2533606"></a><h3>SAM LIST <users|groups|localgroups|builtin|workstations> [verbose]</h3><p> 226List the specified set of accounts by name. If verbose is specified, 227the rid and description is also provided for each account. 228</p></div><div class="refsect2" lang="en"><a name="id2533620"></a><h3>SAM RIGHTS LIST</h3><p> 229List all available privileges. 230</p></div><div class="refsect2" lang="en"><a name="id2533630"></a><h3>SAM RIGHTS GRANT <NAME> <PRIVILEGE></h3><p> 231Grant one or more privileges to a user. 232</p></div><div class="refsect2" lang="en"><a name="id2533641"></a><h3>SAM RIGHTS REVOKE <NAME> <PRIVILEGE></h3><p> 233Revoke one or more privileges from a user. 234</p></div><div class="refsect2" lang="en"><a name="id2533653"></a><h3>SAM SHOW <NAME></h3><p> 235Show the full DOMAIN\\NAME the SID and the type for the corresponding 236account. 237</p></div><div class="refsect2" lang="en"><a name="id2533664"></a><h3>SAM SET HOMEDIR <NAME> <DIRECTORY></h3><p> 238Set the home directory for a user account. 239</p></div><div class="refsect2" lang="en"><a name="id2533675"></a><h3>SAM SET PROFILEPATH <NAME> <PATH></h3><p> 240Set the profile path for a user account. 241</p></div><div class="refsect2" lang="en"><a name="id2533686"></a><h3>SAM SET COMMENT <NAME> <COMMENT></h3><p> 242Set the comment for a user or group account. 243</p></div><div class="refsect2" lang="en"><a name="id2533697"></a><h3>SAM SET FULLNAME <NAME> <FULL NAME></h3><p> 244Set the full name for a user account. 245</p></div><div class="refsect2" lang="en"><a name="id2533708"></a><h3>SAM SET LOGONSCRIPT <NAME> <SCRIPT></h3><p> 246Set the logon script for a user account. 247</p></div><div class="refsect2" lang="en"><a name="id2533720"></a><h3>SAM SET HOMEDRIVE <NAME> <DRIVE></h3><p> 248Set the home drive for a user account. 249</p></div><div class="refsect2" lang="en"><a name="id2533731"></a><h3>SAM SET WORKSTATIONS <NAME> <WORKSTATIONS></h3><p> 250Set the workstations a user account is allowed to log in from. 251</p></div><div class="refsect2" lang="en"><a name="id2533743"></a><h3>SAM SET DISABLE <NAME></h3><p> 252Set the "disabled" flag for a user account. 253</p></div><div class="refsect2" lang="en"><a name="id2533754"></a><h3>SAM SET PWNOTREQ <NAME></h3><p> 254Set the "password not required" flag for a user account. 255</p></div><div class="refsect2" lang="en"><a name="id2533765"></a><h3>SAM SET AUTOLOCK <NAME></h3><p> 256Set the "autolock" flag for a user account. 257</p></div><div class="refsect2" lang="en"><a name="id2533777"></a><h3>SAM SET PWNOEXP <NAME></h3><p> 258Set the "password do not expire" flag for a user account. 259</p></div><div class="refsect2" lang="en"><a name="id2533788"></a><h3>SAM SET PWDMUSTCHANGENOW <NAME> [yes|no]</h3><p> 260Set or unset the "password must change" flag for a user account. 261</p></div><div class="refsect2" lang="en"><a name="id2533800"></a><h3>SAM POLICY LIST</h3><p> 262List the available account policies. 263</p></div><div class="refsect2" lang="en"><a name="id2533810"></a><h3>SAM POLICY SHOW <account policy></h3><p> 264Show the account policy value. 265</p></div><div class="refsect2" lang="en"><a name="id2533821"></a><h3>SAM POLICY SET <account policy> <value></h3><p> 266Set a value for the account policy. 267Valid values can be: "forever", "never", "off", or a number. 268</p></div><div class="refsect2" lang="en"><a name="id2533834"></a><h3>SAM PROVISION</h3><p> 269Only available if ldapsam:editposix is set and winbindd is running. 270Properly populates the ldap tree with the basic accounts (Administrator) 271and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree. 272</p></div><div class="refsect2" lang="en"><a name="id2533847"></a><h3>IDMAP DUMP <local tdb file name></h3><p> 273Dumps the mappings contained in the local tdb file specified. 274This command is useful to dump only the mappings produced by the idmap_tdb backend. 275</p></div><div class="refsect2" lang="en"><a name="id2533861"></a><h3>IDMAP RESTORE [input file]</h3><p> 276Restore the mappings from the specified file or stdin. 277</p></div><div class="refsect2" lang="en"><a name="id2533872"></a><h3>IDMAP SECRET <DOMAIN>|ALLOC <secret></h3><p> 278Store a secret for the specified domain, used primarily for domains 279that use idmap_ldap as a backend. In this case the secret is used 280as the password for the user DN used to bind to the ldap server. 281</p></div><div class="refsect2" lang="en"><a name="id2533886"></a><h3>USERSHARE</h3><p>Starting with version 3.0.23, a Samba server now supports the ability for 282non-root users to add user defined shares to be exported using the "net usershare" 283commands. 284</p><p> 285To set this up, first set up your smb.conf by adding to the [global] section: 286 287usershare path = /usr/local/samba/lib/usershares 288 289Next create the directory /usr/local/samba/lib/usershares, change the owner to root and 290set the group owner to the UNIX group who should have the ability to create usershares, 291for example a group called "serverops". 292 293Set the permissions on /usr/local/samba/lib/usershares to 01770. 294 295(Owner and group all access, no access for others, plus the sticky bit, 296which means that a file in that directory can be renamed or deleted only 297by the owner of the file). 298 299Finally, tell smbd how many usershares you will allow by adding to the [global] 300section of smb.conf a line such as : 301 302usershare max shares = 100. 303 304To allow 100 usershare definitions. Now, members of the UNIX group "serverops" 305can create user defined shares on demand using the commands below. 306</p><p>The usershare commands are: 307 308</p><table class="simplelist" border="0" summary="Simple list"><tr><td>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</td></tr><tr><td>net usershare delete sharename - to delete a user defined share.</td></tr><tr><td>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</td></tr><tr><td>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</td></tr></table><p> 309 310</p><div class="refsect3" lang="en"><a name="id2533944"></a><h4>USERSHARE ADD <em class="replaceable"><code>sharename</code></em> <em class="replaceable"><code>path</code></em> <em class="replaceable"><code>[comment]</code></em> <em class="replaceable"><code>[acl]</code></em> <em class="replaceable"><code>[guest_ok=[y|n]]</code></em></h4><p> 311Add or replace a new user defined share, with name "sharename". 312</p><p> 313"path" specifies the absolute pathname on the system to be exported. 314Restrictions may be put on this, see the global smb.conf parameters: 315"usershare owner only", "usershare prefix allow list", and 316"usershare prefix deny list". 317</p><p> 318The optional "comment" parameter is the comment that will appear 319on the share when browsed to by a client. 320</p><p>The optional "acl" field 321specifies which users have read and write access to the entire share. 322Note that guest connections are not allowed unless the smb.conf parameter 323"usershare allow guests" has been set. The definition of a user 324defined share acl is: "user:permission", where user is a valid 325username on the system and permission can be "F", "R", or "D". 326"F" stands for "full permissions", ie. read and write permissions. 327"D" stands for "deny" for a user, ie. prevent this user from accessing 328this share. 329"R" stands for "read only", ie. only allow read access to this 330share (no creation of new files or directories or writing to files). 331</p><p> 332The default if no "acl" is given is "Everyone:R", which means any 333authenticated user has read-only access. 334</p><p> 335The optional "guest_ok" has the same effect as the parameter of the 336same name in smb.conf, in that it allows guest access to this user 337defined share. This parameter is only allowed if the global parameter 338"usershare allow guests" has been set to true in the smb.conf. 339</p> 340 341There is no separate command to modify an existing user defined share, 342just use the "net usershare add [sharename]" command using the same 343sharename as the one you wish to modify and specify the new options 344you wish. The Samba smbd daemon notices user defined share modifications 345at connect time so will see the change immediately, there is no need 346to restart smbd on adding, deleting or changing a user defined share. 347</div><div class="refsect3" lang="en"><a name="id2534016"></a><h4>USERSHARE DELETE <em class="replaceable"><code>sharename</code></em></h4><p> 348Deletes the user defined share by name. The Samba smbd daemon 349immediately notices this change, although it will not disconnect 350any users currently connected to the deleted share. 351</p></div><div class="refsect3" lang="en"><a name="id2534031"></a><h4>USERSHARE INFO <em class="replaceable"><code>[-l|--long]</code></em> <em class="replaceable"><code>[wildcard sharename]</code></em></h4><p> 352Get info on user defined shares owned by the current user matching the given pattern, or all users. 353</p><p> 354net usershare info on its own dumps out info on the user defined shares that were 355created by the current user, or restricts them to share names that match the given 356wildcard pattern ('*' matches one or more characters, '?' matches only one character). 357If the '-l' or '--long' option is also given, it prints out info on user defined 358shares created by other users. 359</p><p> 360The information given about a share looks like: 361 362[foobar] 363path=/home/jeremy 364comment=testme 365usershare_acl=Everyone:F 366guest_ok=n 367 368And is a list of the current settings of the user defined share that can be 369modified by the "net usershare add" command. 370</p></div><div class="refsect3" lang="en"><a name="id2534065"></a><h4>USERSHARE LIST <em class="replaceable"><code>[-l|--long]</code></em> <em class="replaceable"><code>wildcard sharename</code></em></h4><p> 371List all the user defined shares owned by the current user matching the given pattern, or all users. 372</p><p> 373net usershare list on its own list out the names of the user defined shares that were 374created by the current user, or restricts the list to share names that match the given 375wildcard pattern ('*' matches one or more characters, '?' matches only one character). 376If the '-l' or '--long' option is also given, it includes the names of user defined 377shares created by other users. 378</p></div></div><div class="refsect2" lang="en"><a name="id2534092"></a><h3>CONF</h3><p>Starting with version 3.2.0, a Samba server can be configured by data 379stored in registry. This configuration data can be edited with the new "net 380conf" commands. 381</p><p> 382The deployment of this configuration data can be activated in two levels from the 383<span class="emphasis"><em>smb.conf</em></span> file: Share definitions from registry are 384activated by setting <em class="parameter"><code>registry shares</code></em> to 385“<span class="quote">yes</span>” in the [global] section and global configuration options are 386activated by setting <a class="link" href="smb.conf.5.html#INCLUDE" target="_top">include = registry</a> in 387the [global] section for a mixed configuration or by setting 388<a class="link" href="smb.conf.5.html#CONFIGBACKEND" target="_top">config backend = registry</a> in the [global] 389section for a registry-only configuration. 390See the <a class="citerefentry" href="smb.conf.5.html"><span class="citerefentry"><span class="refentrytitle">smb.conf</span>(5)</span></a> manpage for details. 391</p><p>The conf commands are: 392</p><table class="simplelist" border="0" summary="Simple list"><tr><td>net conf list - Dump the complete configuration in smb.conf like 393format.</td></tr><tr><td>net conf import - Import configuration from file in smb.conf 394format.</td></tr><tr><td>net conf listshares - List the registry shares.</td></tr><tr><td>net conf drop - Delete the complete configuration from 395registry.</td></tr><tr><td>net conf showshare - Show the definition of a registry share.</td></tr><tr><td>net conf addshare - Create a new registry share.</td></tr><tr><td>net conf delshare - Delete a registry share.</td></tr><tr><td>net conf setparm - Store a parameter.</td></tr><tr><td>net conf getparm - Retrieve the value of a parameter.</td></tr><tr><td>net conf delparm - Delete a parameter.</td></tr><tr><td>net conf getincludes - Show the includes of a share definition.</td></tr><tr><td>net conf setincludes - Set includes for a share.</td></tr><tr><td>net conf delincludes - Delete includes from a share definition.</td></tr></table><p> 396</p><div class="refsect3" lang="en"><a name="id2534213"></a><h4>CONF LIST</h4><p> 397Print the configuration data stored in the registry in a smb.conf-like format to 398standard output. 399</p></div><div class="refsect3" lang="en"><a name="id2534224"></a><h4>CONF IMPORT <em class="replaceable"><code>[--test|-T]</code></em> <em class="replaceable"><code>filename</code></em> <em class="replaceable"><code>[section]</code></em></h4><p> 400This command imports configuration from a file in smb.conf format. 401If a section encountered in the input file is present in registry, 402its contents is replaced. Sections of registry configuration that have 403no counterpart in the input file are not affected. If you want to delete these, 404you will have to use the "net conf drop" or "net conf delshare" commands. 405Optionally, a section may be specified to restrict the effect of the 406import command to that specific section. A test mode is enabled by specifying 407the parameter "-T" on the commandline. In test mode, no changes are made to the 408registry, and the resulting configuration is printed to standard output instead. 409</p></div><div class="refsect3" lang="en"><a name="id2534254"></a><h4>CONF LISTSHARES</h4><p> 410List the names of the shares defined in registry. 411</p></div><div class="refsect3" lang="en"><a name="id2534264"></a><h4>CONF DROP</h4><p> 412Delete the complete configuration data from registry. 413</p></div><div class="refsect3" lang="en"><a name="id2534275"></a><h4>CONF SHOWSHARE <em class="replaceable"><code>sharename</code></em></h4><p> 414Show the definition of the share or section specified. It is valid to specify 415"global" as sharename to retrieve the global configuration options from 416registry. 417</p></div><div class="refsect3" lang="en"><a name="id2534289"></a><h4>CONF ADDSHARE <em class="replaceable"><code>sharename</code></em> <em class="replaceable"><code>path</code></em> [<em class="replaceable"><code>writeable={y|N}</code></em> [<em class="replaceable"><code>guest_ok={y|N}</code></em> [<em class="replaceable"><code>comment</code></em>]]] </h4><p>Create a new share definition in registry. 418The sharename and path have to be given. The share name may 419<span class="emphasis"><em>not</em></span> be "global". Optionally, values for the very 420common options "writeable", "guest ok" and a "comment" may be specified. 421The same result may be obtained by a sequence of "net conf setparm" 422commands. 423</p></div><div class="refsect3" lang="en"><a name="id2534323"></a><h4>CONF DELSHARE <em class="replaceable"><code>sharename</code></em></h4><p> 424Delete a share definition from registry. 425</p></div><div class="refsect3" lang="en"><a name="id2534336"></a><h4>CONF SETPARM <em class="replaceable"><code>section</code></em> <em class="replaceable"><code>parameter</code></em> <em class="replaceable"><code>value</code></em></h4><p> 426Store a parameter in registry. The section may be global or a sharename. 427The section is created if it does not exist yet. 428</p></div><div class="refsect3" lang="en"><a name="id2534356"></a><h4>CONF GETPARM <em class="replaceable"><code>section</code></em> <em class="replaceable"><code>parameter</code></em></h4><p> 429Show a parameter stored in registry. 430</p></div><div class="refsect3" lang="en"><a name="id2534372"></a><h4>CONF DELPARM <em class="replaceable"><code>section</code></em> <em class="replaceable"><code>parameter</code></em></h4><p> 431Delete a parameter stored in registry. 432</p></div><div class="refsect3" lang="en"><a name="id2534388"></a><h4>CONF GETINCLUDES <em class="replaceable"><code>section</code></em></h4><p> 433Get the list of includes for the provided section (global or share). 434</p><p> 435Note that due to the nature of the registry database and the nature of include directives, 436the includes need special treatment: Parameters are stored in registry by the parameter 437name as valuename, so there is only ever one instance of a parameter per share. 438Also, a specific order like in a text file is not guaranteed. For all real 439parameters, this is perfectly ok, but the include directive is rather a meta 440parameter, for which, in the smb.conf text file, the place where it is specified 441between the other parameters is very important. This can not be achieved by the 442simple registry smbconf data model, so there is one ordered list of includes 443per share, and this list is evaluated after all the parameters of the share. 444</p><p> 445Further note that currently, only files can be included from registry 446configuration. In the future, there will be the ability to include configuration 447data from other registry keys. 448</p></div><div class="refsect3" lang="en"><a name="id2534423"></a><h4>CONF SETINCLUDES <em class="replaceable"><code>section</code></em> [<em class="replaceable"><code>filename</code></em>]+</h4><p> 449Set the list of includes for the provided section (global or share) to the given 450list of one or more filenames. The filenames may contain the usual smb.conf 451macros like %I. 452</p></div><div class="refsect3" lang="en"><a name="id2534442"></a><h4>CONF DELINCLUDES <em class="replaceable"><code>section</code></em></h4><p> 453Delete the list of includes from the provided section (global or share). 454</p></div></div><div class="refsect2" lang="en"><a name="id2534456"></a><h3>EVENTLOG</h3><p>Starting with version 3.4.0 net can read, dump, import and export native 455win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools. 456</p><p> 457The import and export of evt files can only succeed when <em class="parameter"><code>eventlog list</code></em> is used in 458<span class="emphasis"><em>smb.conf</em></span> file. 459See the <a class="citerefentry" href="smb.conf.5.html"><span class="citerefentry"><span class="refentrytitle">smb.conf</span>(5)</span></a> manpage for details. 460</p><p>The eventlog commands are: 461</p><table class="simplelist" border="0" summary="Simple list"><tr><td>net eventlog dump - Dump a eventlog *.evt file on the screen.</td></tr><tr><td>net eventlog import - Import a eventlog *.evt into the samba internal 462tdb based representation of eventlogs.</td></tr><tr><td>net eventlog export - Export the samba internal tdb based representation 463of eventlogs into an eventlog *.evt file.</td></tr></table><p> 464</p><div class="refsect3" lang="en"><a name="id2534511"></a><h4>EVENTLOG DUMP <em class="replaceable"><code>filename</code></em></h4><p> 465Prints a eventlog *.evt file to standard output. 466</p></div><div class="refsect3" lang="en"><a name="id2534523"></a><h4>EVENTLOG IMPORT <em class="replaceable"><code>filename</code></em> <em class="replaceable"><code>eventlog</code></em></h4><p> 467Imports a eventlog *.evt file defined by <em class="replaceable"><code>filename</code></em> into the 468samba internal tdb representation of eventlog defined by <em class="replaceable"><code>eventlog</code></em>. 469<em class="replaceable"><code>eventlog</code></em> needs to part of the <em class="parameter"><code>eventlog list</code></em> 470defined in smb.conf. 471See the <a class="citerefentry" href="smb.conf.5.html"><span class="citerefentry"><span class="refentrytitle">smb.conf</span>(5)</span></a> manpage for details. 472</p></div><div class="refsect3" lang="en"><a name="id2534563"></a><h4>EVENTLOG EXPORT <em class="replaceable"><code>filename</code></em> <em class="replaceable"><code>eventlog</code></em></h4><p> 473Exports the samba internal tdb representation of eventlog defined by <em class="replaceable"><code>eventlog</code></em> 474to a eventlog *.evt file defined by <em class="replaceable"><code>filename</code></em>. 475<em class="replaceable"><code>eventlog</code></em> needs to part of the <em class="parameter"><code>eventlog list</code></em> 476defined in smb.conf. 477See the <a class="citerefentry" href="smb.conf.5.html"><span class="citerefentry"><span class="refentrytitle">smb.conf</span>(5)</span></a> manpage for details. 478</p></div></div><div class="refsect2" lang="en"><a name="id2534604"></a><h3>DOM</h3><p>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. 479</p><p>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. 480</p><p>The client side support for remote join is implemented in the net dom commands which are: 481</p><table class="simplelist" border="0" summary="Simple list"><tr><td>net dom join - Join a remote computer into a domain.</td></tr><tr><td>net dom unjoin - Unjoin a remote computer from a domain.</td></tr><tr><td>net dom renamecomputer - Renames a remote computer joined to a domain.</td></tr></table><p> 482</p><div class="refsect3" lang="en"><a name="id2534646"></a><h4>DOM JOIN <em class="replaceable"><code>domain=DOMAIN</code></em> <em class="replaceable"><code>ou=OU</code></em> <em class="replaceable"><code>account=ACCOUNT</code></em> <em class="replaceable"><code>password=PASSWORD</code></em> <em class="replaceable"><code>reboot</code></em></h4><p> 483Joins a computer into a domain. This command supports the following additional parameters: 484</p><div class="itemizedlist"><ul type="disc"><li><p><em class="replaceable"><code>DOMAIN</code></em> 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 <em class="replaceable"><code>DOMAIN</code></em> parameter cannot be NULL.</p></li><li><p><em class="replaceable"><code>OU</code></em> can be set to a RFC 1779 LDAP DN, like <span class="emphasis"><em>ou=mymachines,cn=Users,dc=example,dc=com</em></span> in order to create the machine account in a non-default LDAP containter. This optional parameter is only supported when joining Active Directory Domains.</p></li><li><p><em class="replaceable"><code>ACCOUNT</code></em> 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.</p></li><li><p><em class="replaceable"><code>PASSWORD</code></em> defines the password for the domain account defined with <em class="replaceable"><code>ACCOUNT</code></em>.</p></li><li><p><em class="replaceable"><code>REBOOT</code></em> is an optional parameter that can be set to reboot the remote machine after successful join to the domain.</p></li></ul></div><p> 485Note 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. 486</p><p> 487 Example: 488 net dom join -S xp -U XP\\administrator%secret domain=MYDOM account=MYDOM\\administrator password=topsecret reboot. 489</p><p> 490This 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. 491</p></div><div class="refsect3" lang="en"><a name="id2534752"></a><h4>DOM UNJOIN <em class="replaceable"><code>account=ACCOUNT</code></em> <em class="replaceable"><code>password=PASSWORD</code></em> <em class="replaceable"><code>reboot</code></em></h4><p> 492Unjoins a computer from a domain. This command supports the following additional parameters: 493</p><div class="itemizedlist"><ul type="disc"><li><p><em class="replaceable"><code>ACCOUNT</code></em> 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.</p></li><li><p><em class="replaceable"><code>PASSWORD</code></em> defines the password for the domain account defined with <em class="replaceable"><code>ACCOUNT</code></em>.</p></li><li><p><em class="replaceable"><code>REBOOT</code></em> is an optional parameter that can be set to reboot the remote machine after successful unjoin from the domain.</p></li></ul></div><p> 494Note 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. 495</p><p> 496 Example: 497 net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot. 498</p><p> 499This 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. 500</p></div><div class="refsect3" lang="en"><a name="id2534823"></a><h4>DOM RENAMECOMPUTER <em class="replaceable"><code>newname=NEWNAME</code></em> <em class="replaceable"><code>account=ACCOUNT</code></em> <em class="replaceable"><code>password=PASSWORD</code></em> <em class="replaceable"><code>reboot</code></em></h4><p> 501Renames a computer that is joined to a domain. This command supports the following additional parameters: 502</p><div class="itemizedlist"><ul type="disc"><li><p><em class="replaceable"><code>NEWNAME</code></em> defines the new name of the machine in the domain.</p></li><li><p><em class="replaceable"><code>ACCOUNT</code></em> 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.</p></li><li><p><em class="replaceable"><code>PASSWORD</code></em> defines the password for the domain account defined with <em class="replaceable"><code>ACCOUNT</code></em>.</p></li><li><p><em class="replaceable"><code>REBOOT</code></em> is an optional parameter that can be set to reboot the remote machine after successful rename in the domain.</p></li></ul></div><p> 503Note 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. 504</p><p> 505 Example: 506 net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot. 507</p><p> 508This 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. 509</p></div></div><div class="refsect2" lang="en"><a name="id2534906"></a><h3>G_LOCK</h3><p>Manage global locks.</p><div class="refsect3" lang="en"><a name="id2534915"></a><h4>G_LOCK DO <em class="replaceable"><code>lockname</code></em> <em class="replaceable"><code>timeout</code></em> <em class="replaceable"><code>command</code></em></h4><p> 510Execute a shell command under a global lock. This might be useful to define the 511order in which several shell commands will be executed. The locking information 512is stored in a file called <code class="filename">g_lock.tdb</code>. In setups with CTDB 513running, the locking information will be available on all cluster nodes. 514</p><div class="itemizedlist"><ul type="disc"><li><p><em class="replaceable"><code>LOCKNAME</code></em> defines the name of the global lock.</p></li><li><p><em class="replaceable"><code>TIMEOUT</code></em> defines the timeout.</p></li><li><p><em class="replaceable"><code>COMMAND</code></em> defines the shell command to execute.</p></li></ul></div></div><div class="refsect3" lang="en"><a name="id2534967"></a><h4>G_LOCK LOCKS</h4><p> 515Print a list of all currently existing locknames. 516</p></div><div class="refsect3" lang="en"><a name="id2534978"></a><h4>G_LOCK DUMP <em class="replaceable"><code>lockname</code></em></h4><p> 517Dump the locking table of a certain global lock. 518</p></div></div><div class="refsect2" lang="en"><a name="id2534991"></a><h3>HELP [COMMAND]</h3><p>Gives usage information for the specified command.</p></div></div><div class="refsect1" lang="en"><a name="id2535003"></a><h2>VERSION</h2><p>This man page is complete for version 3 of the Samba 519 suite.</p></div><div class="refsect1" lang="en"><a name="id2535014"></a><h2>AUTHOR</h2><p>The original Samba software and related utilities 520 were created by Andrew Tridgell. Samba is now developed 521 by the Samba Team as an Open Source project similar 522 to the way the Linux kernel is developed.</p><p>The net manpage was written by Jelmer Vernooij.</p></div></div></body></html> 523