source: vendor/current/docs/manpages/net.8@ 746

Last change on this file since 746 was 746, checked in by Silvan Scherrer, 12 years ago

Samba Server: updated vendor to 3.6.9

File size: 49.2 KB
Line 
1'\" t
2.\" Title: net
3.\" Author: [see the "AUTHOR" section]
4.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5.\" Date: 10/29/2012
6.\" Manual: System Administration tools
7.\" Source: Samba 3.6
8.\" Language: English
9.\"
10.TH "NET" "8" "10/29/2012" "Samba 3\&.6" "System Administration tools"
11.\" -----------------------------------------------------------------
12.\" * set default formatting
13.\" -----------------------------------------------------------------
14.\" disable hyphenation
15.nh
16.\" disable justification (adjust text to left margin only)
17.ad l
18.\" -----------------------------------------------------------------
19.\" * MAIN CONTENT STARTS HERE *
20.\" -----------------------------------------------------------------
21.SH "NAME"
22net \- Tool for administration of Samba and remote CIFS servers\&.
23.SH "SYNOPSIS"
24.HP \w'\ 'u
25net {<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]
26.SH "DESCRIPTION"
27.PP
28This tool is part of the
29\fBsamba\fR(7)
30suite\&.
31.PP
32The Samba net utility is meant to work just like the net utility available for windows and DOS\&. The first argument should be used to specify the protocol to use when executing a certain command\&. ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3) clients and RPC can be used for NT4 and Windows 2000\&. If this argument is omitted, net will try to determine it automatically\&. Not all commands are available on all protocols\&.
33.SH "OPTIONS"
34.PP
35\-h|\-\-help
36.RS 4
37Print a summary of command line options\&.
38.RE
39.PP
40\-k|\-\-kerberos
41.RS 4
42Try to authenticate with kerberos\&. Only useful in an Active Directory environment\&.
43.RE
44.PP
45\-w target\-workgroup
46.RS 4
47Sets target workgroup or domain\&. You have to specify either this option or the IP address or the name of a server\&.
48.RE
49.PP
50\-W workgroup
51.RS 4
52Sets client workgroup or domain
53.RE
54.PP
55\-U user
56.RS 4
57User name to use
58.RE
59.PP
60\-I ip\-address
61.RS 4
62IP address of target server to use\&. You have to specify either this option or a target workgroup or a target server\&.
63.RE
64.PP
65\-p port
66.RS 4
67Port on the target server to connect to (usually 139 or 445)\&. Defaults to trying 445 first, then 139\&.
68.RE
69.PP
70\-n|\-\-netbiosname <primary NetBIOS name>
71.RS 4
72This option allows you to override the NetBIOS name that Samba uses for itself\&. This is identical to setting the
73\m[blue]\fB\%smb.conf.5.html#\fR\m[]
74parameter in the
75smb\&.conf
76file\&. However, a command line setting will take precedence over settings in
77smb\&.conf\&.
78.RE
79.PP
80\-s|\-\-configfile <configuration file>
81.RS 4
82The file specified contains the configuration details required by the server\&. The information in this file includes server\-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide\&. See
83smb\&.conf
84for more information\&. The default configuration file name is determined at compile time\&.
85.RE
86.PP
87\-S server
88.RS 4
89Name of target server\&. You should specify either this option or a target workgroup or a target IP address\&.
90.RE
91.PP
92\-l
93.RS 4
94When listing data, give more information on each item\&.
95.RE
96.PP
97\-P
98.RS 4
99Make queries to the external server using the machine account of the local server\&.
100.RE
101.PP
102\-\-request\-timeout 30
103.RS 4
104Let client requests timeout after 30 seconds the default is 10 seconds\&.
105.RE
106.PP
107\-d|\-\-debuglevel=level
108.RS 4
109\fIlevel\fR
110is an integer from 0 to 10\&. The default value if this parameter is not specified is 0\&.
111.sp
112The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&.
113.sp
114Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&.
115.sp
116Note that specifying this parameter here will override the
117\m[blue]\fB\%smb.conf.5.html#\fR\m[]
118parameter in the
119smb\&.conf
120file\&.
121.RE
122.SH "COMMANDS"
123.SS "CHANGESECRETPW"
124.PP
125This command allows the Samba machine account password to be set from an external application to a machine account password that has already been stored in Active Directory\&. DO NOT USE this command unless you know exactly what you are doing\&. The use of this command requires that the force flag (\-f) be used also\&. There will be NO command prompt\&. Whatever information is piped into stdin, either by typing at the command line or otherwise, will be stored as the literal machine password\&. Do NOT use this without care and attention as it will overwrite a legitimate machine password without warning\&. YOU HAVE BEEN WARNED\&.
126.SS "TIME"
127.PP
128The
129NET TIME
130command allows you to view the time on a remote server or synchronise the time on the local server with the time on the remote server\&.
131.SS "TIME"
132.PP
133Without any options, the
134NET TIME
135command displays the time on the remote server\&.
136.SS "TIME SYSTEM"
137.PP
138Displays the time on the remote server in a format ready for
139/bin/date\&.
140.SS "TIME SET"
141.PP
142Tries to set the date and time of the local server to that on the remote server using
143/bin/date\&.
144.SS "TIME ZONE"
145.PP
146Displays the timezone in hours from GMT on the remote computer\&.
147.SS "[RPC|ADS] JOIN [TYPE] [\-U username[%password]] [createupn=UPN] [createcomputer=OU] [options]"
148.PP
149Join a domain\&. If the account already exists on the server, and [TYPE] is MEMBER, the machine will attempt to join automatically\&. (Assuming that the machine has been created in server manager) Otherwise, a password will be prompted for, and a new account may be created\&.
150.PP
151[TYPE] may be PDC, BDC or MEMBER to specify the type of server joining the domain\&.
152.PP
153[UPN] (ADS only) set the principalname attribute during the join\&. The default format is host/netbiosname@REALM\&.
154.PP
155[OU] (ADS only) Precreate the computer account in a specific OU\&. The OU string reads from top to bottom without RDNs, and is delimited by a \'/\'\&. Please note that \'\e\' is used for escape by both the shell and ldap, so it may need to be doubled or quadrupled to pass through, and it is not used as a delimiter\&.
156.SS "[RPC] OLDJOIN [options]"
157.PP
158Join a domain\&. Use the OLDJOIN option to join the domain using the old style of domain joining \- you need to create a trust account in server manager first\&.
159.SS "[RPC|ADS] USER"
160.SS "[RPC|ADS] USER"
161.PP
162List all users
163.SS "[RPC|ADS] USER DELETE target"
164.PP
165Delete specified user
166.SS "[RPC|ADS] USER INFO target"
167.PP
168List the domain groups of the specified user\&.
169.SS "[RPC|ADS] USER RENAME oldname newname"
170.PP
171Rename specified user\&.
172.SS "[RPC|ADS] USER ADD name [password] [-F user flags] [-C comment]"
173.PP
174Add specified user\&.
175.SS "[RPC|ADS] GROUP"
176.SS "[RPC|ADS] GROUP [misc options] [targets]"
177.PP
178List user groups\&.
179.SS "[RPC|ADS] GROUP DELETE name [misc. options]"
180.PP
181Delete specified group\&.
182.SS "[RPC|ADS] GROUP ADD name [-C comment]"
183.PP
184Create specified group\&.
185.SS "[RAP|RPC] SHARE"
186.SS "[RAP|RPC] SHARE [misc. options] [targets]"
187.PP
188Enumerates all exported resources (network shares) on target server\&.
189.SS "[RAP|RPC] SHARE ADD name=serverpath [-C comment] [-M maxusers] [targets]"
190.PP
191Adds a share from a server (makes the export active)\&. Maxusers specifies the number of users that can be connected to the share simultaneously\&.
192.SS "SHARE DELETE sharename"
193.PP
194Delete specified share\&.
195.SS "[RPC|RAP] FILE"
196.SS "[RPC|RAP] FILE"
197.PP
198List all open files on remote server\&.
199.SS "[RPC|RAP] FILE CLOSE fileid"
200.PP
201Close file with specified
202\fIfileid\fR
203on remote server\&.
204.SS "[RPC|RAP] FILE INFO fileid"
205.PP
206Print information on specified
207\fIfileid\fR\&. Currently listed are: file\-id, username, locks, path, permissions\&.
208.SS "[RAP|RPC] FILE USER user"
209.PP
210List files opened by specified
211\fIuser\fR\&. Please note that
212net rap file user
213does not work against Samba servers\&.
214.SS "SESSION"
215.SS "RAP SESSION"
216.PP
217Without any other options, SESSION enumerates all active SMB/CIFS sessions on the target server\&.
218.SS "RAP SESSION DELETE|CLOSE CLIENT_NAME"
219.PP
220Close the specified sessions\&.
221.SS "RAP SESSION INFO CLIENT_NAME"
222.PP
223Give a list with all the open files in specified session\&.
224.SS "RAP SERVER \fIDOMAIN\fR"
225.PP
226List all servers in specified domain or workgroup\&. Defaults to local domain\&.
227.SS "RAP DOMAIN"
228.PP
229Lists all domains and workgroups visible on the current network\&.
230.SS "RAP PRINTQ"
231.SS "RAP PRINTQ INFO QUEUE_NAME"
232.PP
233Lists the specified print queue and print jobs on the server\&. If the
234\fIQUEUE_NAME\fR
235is omitted, all queues are listed\&.
236.SS "RAP PRINTQ DELETE JOBID"
237.PP
238Delete job with specified id\&.
239.SS "RAP VALIDATE \fIuser\fR [\fIpassword\fR]"
240.PP
241Validate whether the specified user can log in to the remote server\&. If the password is not specified on the commandline, it will be prompted\&.
242.if n \{\
243.sp
244.\}
245.RS 4
246.it 1 an-trap
247.nr an-no-space-flag 1
248.nr an-break-flag 1
249.br
250.ps +1
251\fBNote\fR
252.ps -1
253.br
254.PP
255Currently NOT implemented\&.
256.sp .5v
257.RE
258.SS "RAP GROUPMEMBER"
259.SS "RAP GROUPMEMBER LIST GROUP"
260.PP
261List all members of the specified group\&.
262.SS "RAP GROUPMEMBER DELETE GROUP USER"
263.PP
264Delete member from group\&.
265.SS "RAP GROUPMEMBER ADD GROUP USER"
266.PP
267Add member to group\&.
268.SS "RAP ADMIN \fIcommand\fR"
269.PP
270Execute the specified
271\fIcommand\fR
272on the remote server\&. Only works with OS/2 servers\&.
273.if n \{\
274.sp
275.\}
276.RS 4
277.it 1 an-trap
278.nr an-no-space-flag 1
279.nr an-break-flag 1
280.br
281.ps +1
282\fBNote\fR
283.ps -1
284.br
285.PP
286Currently NOT implemented\&.
287.sp .5v
288.RE
289.SS "RAP SERVICE"
290.SS "RAP SERVICE START NAME [arguments...]"
291.PP
292Start the specified service on the remote server\&. Not implemented yet\&.
293.if n \{\
294.sp
295.\}
296.RS 4
297.it 1 an-trap
298.nr an-no-space-flag 1
299.nr an-break-flag 1
300.br
301.ps +1
302\fBNote\fR
303.ps -1
304.br
305.PP
306Currently NOT implemented\&.
307.sp .5v
308.RE
309.SS "RAP SERVICE STOP"
310.PP
311Stop the specified service on the remote server\&.
312.if n \{\
313.sp
314.\}
315.RS 4
316.it 1 an-trap
317.nr an-no-space-flag 1
318.nr an-break-flag 1
319.br
320.ps +1
321\fBNote\fR
322.ps -1
323.br
324.PP
325Currently NOT implemented\&.
326.sp .5v
327.RE
328.SS "RAP PASSWORD \fIUSER\fR \fIOLDPASS\fR \fINEWPASS\fR"
329.PP
330Change password of
331\fIUSER\fR
332from
333\fIOLDPASS\fR
334to
335\fINEWPASS\fR\&.
336.SS "LOOKUP"
337.SS "LOOKUP HOST HOSTNAME [TYPE]"
338.PP
339Lookup the IP address of the given host with the specified type (netbios suffix)\&. The type defaults to 0x20 (workstation)\&.
340.SS "LOOKUP LDAP [DOMAIN]"
341.PP
342Give IP address of LDAP server of specified
343\fIDOMAIN\fR\&. Defaults to local domain\&.
344.SS "LOOKUP KDC [REALM]"
345.PP
346Give IP address of KDC for the specified
347\fIREALM\fR\&. Defaults to local realm\&.
348.SS "LOOKUP DC [DOMAIN]"
349.PP
350Give IP\'s of Domain Controllers for specified
351\fI DOMAIN\fR\&. Defaults to local domain\&.
352.SS "LOOKUP MASTER DOMAIN"
353.PP
354Give IP of master browser for specified
355\fIDOMAIN\fR
356or workgroup\&. Defaults to local domain\&.
357.SS "CACHE"
358.PP
359Samba uses a general caching interface called \'gencache\'\&. It can be controlled using \'NET CACHE\'\&.
360.PP
361All the timeout parameters support the suffixes:
362.RS 4
363s \- Seconds
364.RE
365.RS 4
366m \- Minutes
367.RE
368.RS 4
369h \- Hours
370.RE
371.RS 4
372d \- Days
373.RE
374.RS 4
375w \- Weeks
376.RE
377.SS "CACHE ADD key data time-out"
378.PP
379Add specified key+data to the cache with the given timeout\&.
380.SS "CACHE DEL key"
381.PP
382Delete key from the cache\&.
383.SS "CACHE SET key data time-out"
384.PP
385Update data of existing cache entry\&.
386.SS "CACHE SEARCH PATTERN"
387.PP
388Search for the specified pattern in the cache data\&.
389.SS "CACHE LIST"
390.PP
391List all current items in the cache\&.
392.SS "CACHE FLUSH"
393.PP
394Remove all the current items from the cache\&.
395.SS "GETLOCALSID [DOMAIN]"
396.PP
397Prints the SID of the specified domain, or if the parameter is omitted, the SID of the local server\&.
398.SS "SETLOCALSID S\-1\-5\-21\-x\-y\-z"
399.PP
400Sets SID for the local server to the specified SID\&.
401.SS "GETDOMAINSID"
402.PP
403Prints the local machine SID and the SID of the current domain\&.
404.SS "SETDOMAINSID"
405.PP
406Sets the SID of the current domain\&.
407.SS "GROUPMAP"
408.PP
409Manage the mappings between Windows group SIDs and UNIX groups\&. Common options include:
410.sp
411.RS 4
412.ie n \{\
413\h'-04'\(bu\h'+03'\c
414.\}
415.el \{\
416.sp -1
417.IP \(bu 2.3
418.\}
419unixgroup \- Name of the UNIX group
420.RE
421.sp
422.RS 4
423.ie n \{\
424\h'-04'\(bu\h'+03'\c
425.\}
426.el \{\
427.sp -1
428.IP \(bu 2.3
429.\}
430ntgroup \- Name of the Windows NT group (must be resolvable to a SID
431.RE
432.sp
433.RS 4
434.ie n \{\
435\h'-04'\(bu\h'+03'\c
436.\}
437.el \{\
438.sp -1
439.IP \(bu 2.3
440.\}
441rid \- Unsigned 32\-bit integer
442.RE
443.sp
444.RS 4
445.ie n \{\
446\h'-04'\(bu\h'+03'\c
447.\}
448.el \{\
449.sp -1
450.IP \(bu 2.3
451.\}
452sid \- Full SID in the form of "S\-1\-\&.\&.\&."
453.RE
454.sp
455.RS 4
456.ie n \{\
457\h'-04'\(bu\h'+03'\c
458.\}
459.el \{\
460.sp -1
461.IP \(bu 2.3
462.\}
463type \- Type of the group; either \'domain\', \'local\', or \'builtin\'
464.RE
465.sp
466.RS 4
467.ie n \{\
468\h'-04'\(bu\h'+03'\c
469.\}
470.el \{\
471.sp -1
472.IP \(bu 2.3
473.\}
474comment \- Freeform text description of the group
475.RE
476.sp
477.RE
478.SS "GROUPMAP ADD"
479.PP
480Add a new group mapping entry:
481.sp
482.if n \{\
483.RS 4
484.\}
485.nf
486net groupmap add {rid=int|sid=string} unixgroup=string \e
487 [type={domain|local}] [ntgroup=string] [comment=string]
488.fi
489.if n \{\
490.RE
491.\}
492.sp
493
494.SS "GROUPMAP DELETE"
495.PP
496Delete a group mapping entry\&. If more than one group name matches, the first entry found is deleted\&.
497.PP
498net groupmap delete {ntgroup=string|sid=SID}
499.SS "GROUPMAP MODIFY"
500.PP
501Update en existing group entry\&.
502.PP
503
504.sp
505.if n \{\
506.RS 4
507.\}
508.nf
509net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \e
510 [comment=string] [type={domain|local}]
511.fi
512.if n \{\
513.RE
514.\}
515.sp
516
517.SS "GROUPMAP LIST"
518.PP
519List existing group mapping entries\&.
520.PP
521net groupmap list [verbose] [ntgroup=string] [sid=SID]
522.SS "MAXRID"
523.PP
524Prints out the highest RID currently in use on the local server (by the active \'passdb backend\')\&.
525.SS "RPC INFO"
526.PP
527Print information about the domain of the remote server, such as domain name, domain sid and number of users and groups\&.
528.SS "[RPC|ADS] TESTJOIN"
529.PP
530Check whether participation in a domain is still valid\&.
531.SS "[RPC|ADS] CHANGETRUSTPW"
532.PP
533Force change of domain trust password\&.
534.SS "RPC TRUSTDOM"
535.SS "RPC TRUSTDOM ADD DOMAIN"
536.PP
537Add a interdomain trust account for
538\fIDOMAIN\fR\&. This is in fact a Samba account named
539\fIDOMAIN$\fR
540with the account flag
541\fB\'I\'\fR
542(interdomain trust account)\&. This is required for incoming trusts to work\&. It makes Samba be a trusted domain of the foreign (trusting) domain\&. Users of the Samba domain will be made available in the foreign domain\&. If the command is used against localhost it has the same effect as
543smbpasswd \-a \-i DOMAIN\&. Please note that both commands expect a appropriate UNIX account\&.
544.SS "RPC TRUSTDOM DEL DOMAIN"
545.PP
546Remove interdomain trust account for
547\fIDOMAIN\fR\&. If it is used against localhost it has the same effect as
548smbpasswd \-x DOMAIN$\&.
549.SS "RPC TRUSTDOM ESTABLISH DOMAIN"
550.PP
551Establish a trust relationship to a trusted domain\&. Interdomain account must already be created on the remote PDC\&. This is required for outgoing trusts to work\&. It makes Samba be a trusting domain of a foreign (trusted) domain\&. Users of the foreign domain will be made available in our domain\&. You\'ll need winbind and a working idmap config to make them appear in your system\&.
552.SS "RPC TRUSTDOM REVOKE DOMAIN"
553.PP
554Abandon relationship to trusted domain
555.SS "RPC TRUSTDOM LIST"
556.PP
557List all interdomain trust relationships\&.
558.SS "RPC TRUSTDOM LIST"
559.PP
560List all interdomain trust relationships\&.
561.SS "RPC TRUST"
562.SS "RPC TRUST CREATE"
563.PP
564Create a trust trust object by calling lsaCreateTrustedDomainEx2\&. The can be done on a single server or on two servers at once with the possibility to use a random trust password\&.
565.PP
566\fBOptions:\fR
567.PP
568otherserver
569.RS 4
570Domain controller of the second domain
571.RE
572.PP
573otheruser
574.RS 4
575Admin user in the second domain
576.RE
577.PP
578otherdomainsid
579.RS 4
580SID of the second domain
581.RE
582.PP
583other_netbios_domain
584.RS 4
585NetBIOS (short) name of the second domain
586.RE
587.PP
588otherdomain
589.RS 4
590DNS (full) name of the second domain
591.RE
592.PP
593trustpw
594.RS 4
595Trust password
596.RE
597.PP
598\fBExamples:\fR
599.PP
600Create a trust object on srv1\&.dom1\&.dom for the domain dom2
601.RS 4
602.sp
603.if n \{\
604.RS 4
605.\}
606.nf
607net rpc trust create \e
608 otherdomainsid=S\-x\-x\-xx\-xxxxxxxxxx\-xxxxxxxxxx\-xxxxxxxxx \e
609 other_netbios_domain=dom2 \e
610 otherdomain=dom2\&.dom \e
611 trustpw=12345678 \e
612 \-S srv1\&.dom1\&.dom
613.fi
614.if n \{\
615.RE
616.\}
617.RE
618.PP
619Create a trust relationship between dom1 and dom2
620.RS 4
621.sp
622.if n \{\
623.RS 4
624.\}
625.nf
626net rpc trust create \e
627 otherserver=srv2\&.dom2\&.test \e
628 otheruser=dom2adm \e
629 \-S srv1\&.dom1\&.dom
630.fi
631.if n \{\
632.RE
633.\}
634.RE
635.SS "RPC TRUST DELETE"
636.PP
637Delete a trust trust object by calling lsaDeleteTrustedDomain\&. The can be done on a single server or on two servers at once\&.
638.PP
639\fBOptions:\fR
640.PP
641otherserver
642.RS 4
643Domain controller of the second domain
644.RE
645.PP
646otheruser
647.RS 4
648Admin user in the second domain
649.RE
650.PP
651otherdomainsid
652.RS 4
653SID of the second domain
654.RE
655.PP
656\fBExamples:\fR
657.PP
658Delete a trust object on srv1\&.dom1\&.dom for the domain dom2
659.RS 4
660.sp
661.if n \{\
662.RS 4
663.\}
664.nf
665net rpc trust delete \e
666 otherdomainsid=S\-x\-x\-xx\-xxxxxxxxxx\-xxxxxxxxxx\-xxxxxxxxx \e
667 \-S srv1\&.dom1\&.dom
668.fi
669.if n \{\
670.RE
671.\}
672.RE
673.PP
674Delete a trust relationship between dom1 and dom2
675.RS 4
676.sp
677.if n \{\
678.RS 4
679.\}
680.nf
681net rpc trust delete \e
682 otherserver=srv2\&.dom2\&.test \e
683 otheruser=dom2adm \e
684 \-S srv1\&.dom1\&.dom
685.fi
686.if n \{\
687.RE
688.\}
689.RE
690.SS ""
691.SS "RPC RIGHTS"
692.PP
693This subcommand is used to view and manage Samba\'s rights assignments (also referred to as privileges)\&. There are three options currently available:
694\fIlist\fR,
695\fIgrant\fR, and
696\fIrevoke\fR\&. More details on Samba\'s privilege model and its use can be found in the Samba\-HOWTO\-Collection\&.
697.SS "RPC ABORTSHUTDOWN"
698.PP
699Abort the shutdown of a remote server\&.
700.SS "RPC SHUTDOWN [\-t timeout] [\-r] [\-f] [\-C message]"
701.PP
702Shut down the remote server\&.
703.PP
704\-r
705.RS 4
706Reboot after shutdown\&.
707.RE
708.PP
709\-f
710.RS 4
711Force shutting down all applications\&.
712.RE
713.PP
714\-t timeout
715.RS 4
716Timeout before system will be shut down\&. An interactive user of the system can use this time to cancel the shutdown\&.
717.RE
718.PP
719\-C message
720.RS 4
721Display the specified message on the screen to announce the shutdown\&.
722.RE
723.SS "RPC SAMDUMP"
724.PP
725Print out sam database of remote server\&. You need to run this against the PDC, from a Samba machine joined as a BDC\&.
726.SS "RPC VAMPIRE"
727.PP
728Export users, aliases and groups from remote server to local server\&. You need to run this against the PDC, from a Samba machine joined as a BDC\&.
729.SS "RPC VAMPIRE KEYTAB"
730.PP
731Dump remote SAM database to local Kerberos keytab file\&.
732.SS "RPC VAMPIRE LDIF"
733.PP
734Dump remote SAM database to local LDIF file or standard output\&.
735.SS "RPC GETSID"
736.PP
737Fetch domain SID and store it in the local
738secrets\&.tdb\&.
739.SS "ADS LEAVE"
740.PP
741Make the remote host leave the domain it is part of\&.
742.SS "ADS STATUS"
743.PP
744Print out status of machine account of the local machine in ADS\&. Prints out quite some debug info\&. Aimed at developers, regular users should use
745NET ADS TESTJOIN\&.
746.SS "ADS PRINTER"
747.SS "ADS PRINTER INFO [PRINTER] [SERVER]"
748.PP
749Lookup info for
750\fIPRINTER\fR
751on
752\fISERVER\fR\&. The printer name defaults to "*", the server name defaults to the local host\&.
753.SS "ADS PRINTER PUBLISH PRINTER"
754.PP
755Publish specified printer using ADS\&.
756.SS "ADS PRINTER REMOVE PRINTER"
757.PP
758Remove specified printer from ADS directory\&.
759.SS "ADS SEARCH \fIEXPRESSION\fR \fIATTRIBUTES\&.\&.\&.\fR"
760.PP
761Perform a raw LDAP search on a ADS server and dump the results\&. The expression is a standard LDAP search expression, and the attributes are a list of LDAP fields to show in the results\&.
762.PP
763Example:
764\fBnet ads search \'(objectCategory=group)\' sAMAccountName\fR
765.SS "ADS DN \fIDN\fR \fI(attributes)\fR"
766.PP
767Perform a raw LDAP search on a ADS server and dump the results\&. The DN standard LDAP DN, and the attributes are a list of LDAP fields to show in the result\&.
768.PP
769Example:
770\fBnet ads dn \'CN=administrator,CN=Users,DC=my,DC=domain\' SAMAccountName\fR
771.SS "ADS WORKGROUP"
772.PP
773Print out workgroup name for specified kerberos realm\&.
774.SS "SAM CREATEBUILTINGROUP <NAME>"
775.PP
776(Re)Create a BUILTIN group\&. Only a wellknown set of BUILTIN groups can be created with this command\&. This is the list of currently recognized group names: Administrators, Users, Guests, Power Users, Account Operators, Server Operators, Print Operators, Backup Operators, Replicator, RAS Servers, Pre\-Windows 2000 compatible Access\&. This command requires a running Winbindd with idmap allocation properly configured\&. The group gid will be allocated out of the winbindd range\&.
777.SS "SAM CREATELOCALGROUP <NAME>"
778.PP
779Create a LOCAL group (also known as Alias)\&. This command requires a running Winbindd with idmap allocation properly configured\&. The group gid will be allocated out of the winbindd range\&.
780.SS "SAM DELETELOCALGROUP <NAME>"
781.PP
782Delete an existing LOCAL group (also known as Alias)\&.
783.SS "SAM MAPUNIXGROUP <NAME>"
784.PP
785Map an existing Unix group and make it a Domain Group, the domain group will have the same name\&.
786.SS "SAM UNMAPUNIXGROUP <NAME>"
787.PP
788Remove an existing group mapping entry\&.
789.SS "SAM ADDMEM <GROUP> <MEMBER>"
790.PP
791Add a member to a Local group\&. The group can be specified only by name, the member can be specified by name or SID\&.
792.SS "SAM DELMEM <GROUP> <MEMBER>"
793.PP
794Remove a member from a Local group\&. The group and the member must be specified by name\&.
795.SS "SAM LISTMEM <GROUP>"
796.PP
797List Local group members\&. The group must be specified by name\&.
798.SS "SAM LIST <users|groups|localgroups|builtin|workstations> [verbose]"
799.PP
800List the specified set of accounts by name\&. If verbose is specified, the rid and description is also provided for each account\&.
801.SS "SAM RIGHTS LIST"
802.PP
803List all available privileges\&.
804.SS "SAM RIGHTS GRANT <NAME> <PRIVILEGE>"
805.PP
806Grant one or more privileges to a user\&.
807.SS "SAM RIGHTS REVOKE <NAME> <PRIVILEGE>"
808.PP
809Revoke one or more privileges from a user\&.
810.SS "SAM SHOW <NAME>"
811.PP
812Show the full DOMAIN\e\eNAME the SID and the type for the corresponding account\&.
813.SS "SAM SET HOMEDIR <NAME> <DIRECTORY>"
814.PP
815Set the home directory for a user account\&.
816.SS "SAM SET PROFILEPATH <NAME> <PATH>"
817.PP
818Set the profile path for a user account\&.
819.SS "SAM SET COMMENT <NAME> <COMMENT>"
820.PP
821Set the comment for a user or group account\&.
822.SS "SAM SET FULLNAME <NAME> <FULL NAME>"
823.PP
824Set the full name for a user account\&.
825.SS "SAM SET LOGONSCRIPT <NAME> <SCRIPT>"
826.PP
827Set the logon script for a user account\&.
828.SS "SAM SET HOMEDRIVE <NAME> <DRIVE>"
829.PP
830Set the home drive for a user account\&.
831.SS "SAM SET WORKSTATIONS <NAME> <WORKSTATIONS>"
832.PP
833Set the workstations a user account is allowed to log in from\&.
834.SS "SAM SET DISABLE <NAME>"
835.PP
836Set the "disabled" flag for a user account\&.
837.SS "SAM SET PWNOTREQ <NAME>"
838.PP
839Set the "password not required" flag for a user account\&.
840.SS "SAM SET AUTOLOCK <NAME>"
841.PP
842Set the "autolock" flag for a user account\&.
843.SS "SAM SET PWNOEXP <NAME>"
844.PP
845Set the "password do not expire" flag for a user account\&.
846.SS "SAM SET PWDMUSTCHANGENOW <NAME> [yes|no]"
847.PP
848Set or unset the "password must change" flag for a user account\&.
849.SS "SAM POLICY LIST"
850.PP
851List the available account policies\&.
852.SS "SAM POLICY SHOW <account policy>"
853.PP
854Show the account policy value\&.
855.SS "SAM POLICY SET <account policy> <value>"
856.PP
857Set a value for the account policy\&. Valid values can be: "forever", "never", "off", or a number\&.
858.SS "SAM PROVISION"
859.PP
860Only available if ldapsam:editposix is set and winbindd is running\&. Properly populates the ldap tree with the basic accounts (Administrator) and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree\&.
861.SS "IDMAP DUMP <local tdb file name>"
862.PP
863Dumps the mappings contained in the local tdb file specified\&. This command is useful to dump only the mappings produced by the idmap_tdb backend\&.
864.SS "IDMAP RESTORE [input file]"
865.PP
866Restore the mappings from the specified file or stdin\&.
867.SS "IDMAP SECRET <DOMAIN> <secret>"
868.PP
869Store a secret for the specified domain, used primarily for domains that use idmap_ldap as a backend\&. In this case the secret is used as the password for the user DN used to bind to the ldap server\&.
870.SS "IDMAP DELETE [\-f] [\-\-db=<DB>] <ID>"
871.PP
872Delete a mapping sid <\-> gid or sid <\-> uid from the IDMAP database\&. The mapping is given by <ID> which may either be a sid: S\-x\-\&.\&.\&., a gid: "GID number" or a uid: "UID number"\&. Use \-f to delete an invalid partial mapping <ID> \-> xx
873.PP
874Use "smbcontrol all idmap \&.\&.\&." to notify running smbd instances\&. See the
875\fBsmbcontrol\fR(1)
876manpage for details\&.
877.SS "IDMAP CHECK [\-v] [\-r] [\-a] [\-T] [\-f] [\-l] [\-\-db=<DB>]"
878.PP
879Check and repair the IDMAP 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:
880.PP
881\-r|\-\-repair
882.RS 4
883Interactive repair mode, ask a lot of questions\&.
884.RE
885.PP
886\-a|\-\-auto
887.RS 4
888Noninteractive repair mode, use default answers\&.
889.RE
890.PP
891\-v|\-\-verbose
892.RS 4
893Produce more output\&.
894.RE
895.PP
896\-f|\-\-force
897.RS 4
898Try to apply changes, even if they do not apply cleanly\&.
899.RE
900.PP
901\-T|\-\-test
902.RS 4
903Dry run, show what changes would be made but don\'t touch anything\&.
904.RE
905.PP
906\-l|\-\-lock
907.RS 4
908Lock the database while doing the check\&.
909.RE
910.PP
911\-\-db <DB>
912.RS 4
913Check the specified database\&.
914.RE
915.PP
916.RS 4
917.RE
918It reports about the finding of the following errors:
919.PP
920Missing reverse mapping:
921.RS 4
922A record with mapping A\->B where there is no B\->A\&. Default action in repair mode is to "fix" this by adding the reverse mapping\&.
923.RE
924.PP
925Invalid mapping:
926.RS 4
927A record with mapping A\->B where B\->C\&. Default action is to "delete" this record\&.
928.RE
929.PP
930Missing or invalid HWM:
931.RS 4
932A high water mark is not at least equal to the largest ID in the database\&. Default action is to "fix" this by setting it to the largest ID found +1\&.
933.RE
934.PP
935Invalid record:
936.RS 4
937Something we failed to parse\&. Default action is to "edit" it in interactive and "delete" it in automatic mode\&.
938.RE
939.SS "USERSHARE"
940.PP
941Starting with version 3\&.0\&.23, a Samba server now supports the ability for non\-root users to add user defined shares to be exported using the "net usershare" commands\&.
942.PP
943To set this up, first set up your smb\&.conf by adding to the [global] section: usershare path = /usr/local/samba/lib/usershares Next create the directory /usr/local/samba/lib/usershares, change the owner to root and set the group owner to the UNIX group who should have the ability to create usershares, for example a group called "serverops"\&. Set the permissions on /usr/local/samba/lib/usershares to 01770\&. (Owner and group all access, no access for others, plus the sticky bit, which means that a file in that directory can be renamed or deleted only by the owner of the file)\&. Finally, tell smbd how many usershares you will allow by adding to the [global] section of smb\&.conf a line such as : usershare max shares = 100\&. To allow 100 usershare definitions\&. Now, members of the UNIX group "serverops" can create user defined shares on demand using the commands below\&.
944.PP
945The usershare commands are:
946.RS 4
947net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] \- to add or change a user defined share\&.
948.RE
949.RS 4
950net usershare delete sharename \- to delete a user defined share\&.
951.RE
952.RS 4
953net usershare info [\-l|\-\-long] [wildcard sharename] \- to print info about a user defined share\&.
954.RE
955.RS 4
956net usershare list [\-l|\-\-long] [wildcard sharename] \- to list user defined shares\&.
957.RE
958.SS "USERSHARE ADD sharename path [comment] [acl] [guest_ok=[y|n]]"
959.PP
960Add or replace a new user defined share, with name "sharename"\&.
961.PP
962"path" specifies the absolute pathname on the system to be exported\&. Restrictions may be put on this, see the global smb\&.conf parameters: "usershare owner only", "usershare prefix allow list", and "usershare prefix deny list"\&.
963.PP
964The optional "comment" parameter is the comment that will appear on the share when browsed to by a client\&.
965.PP
966The optional "acl" field specifies which users have read and write access to the entire share\&. Note that guest connections are not allowed unless the smb\&.conf parameter "usershare allow guests" has been set\&. The definition of a user defined share acl is: "user:permission", where user is a valid username on the system and permission can be "F", "R", or "D"\&. "F" stands for "full permissions", ie\&. read and write permissions\&. "D" stands for "deny" for a user, ie\&. prevent this user from accessing this share\&. "R" stands for "read only", ie\&. only allow read access to this share (no creation of new files or directories or writing to files)\&.
967.PP
968The default if no "acl" is given is "Everyone:R", which means any authenticated user has read\-only access\&.
969.PP
970The optional "guest_ok" has the same effect as the parameter of the same name in smb\&.conf, in that it allows guest access to this user defined share\&. This parameter is only allowed if the global parameter "usershare allow guests" has been set to true in the smb\&.conf\&.
971
972
973There is no separate command to modify an existing user defined share,
974just use the "net usershare add [sharename]" command using the same
975sharename as the one you wish to modify and specify the new options
976you wish\&. The Samba smbd daemon notices user defined share modifications
977at connect time so will see the change immediately, there is no need
978to restart smbd on adding, deleting or changing a user defined share\&.
979.SS "USERSHARE DELETE sharename"
980.PP
981Deletes the user defined share by name\&. The Samba smbd daemon immediately notices this change, although it will not disconnect any users currently connected to the deleted share\&.
982.SS "USERSHARE INFO [-l|--long] [wildcard sharename]"
983.PP
984Get info on user defined shares owned by the current user matching the given pattern, or all users\&.
985.PP
986net usershare info on its own dumps out info on the user defined shares that were created by the current user, or restricts them to share names that match the given wildcard pattern (\'*\' matches one or more characters, \'?\' matches only one character)\&. If the \'\-l\' or \'\-\-long\' option is also given, it prints out info on user defined shares created by other users\&.
987.PP
988The information given about a share looks like: [foobar] path=/home/jeremy comment=testme usershare_acl=Everyone:F guest_ok=n And is a list of the current settings of the user defined share that can be modified by the "net usershare add" command\&.
989.SS "USERSHARE LIST [-l|--long] wildcard sharename"
990.PP
991List all the user defined shares owned by the current user matching the given pattern, or all users\&.
992.PP
993net usershare list on its own list out the names of the user defined shares that were created by the current user, or restricts the list to share names that match the given wildcard pattern (\'*\' matches one or more characters, \'?\' matches only one character)\&. If the \'\-l\' or \'\-\-long\' option is also given, it includes the names of user defined shares created by other users\&.
994.SS "CONF"
995.PP
996Starting with version 3\&.2\&.0, a Samba server can be configured by data stored in registry\&. This configuration data can be edited with the new "net conf" commands\&.
997.PP
998The deployment of this configuration data can be activated in two levels from the
999\fIsmb\&.conf\fR
1000file: Share definitions from registry are activated by setting
1001\fIregistry shares\fR
1002to
1003\(lqyes\(rq
1004in the [global] section and global configuration options are activated by setting
1005\m[blue]\fBinclude = registry\fR\m[]
1006in the [global] section for a mixed configuration or by setting
1007\m[blue]\fBconfig backend = registry\fR\m[]
1008in the [global] section for a registry\-only configuration\&. See the
1009\fBsmb.conf\fR(5)
1010manpage for details\&.
1011.PP
1012The conf commands are:
1013.RS 4
1014net conf list \- Dump the complete configuration in smb\&.conf like
1015format\&.
1016.RE
1017.RS 4
1018net conf import \- Import configuration from file in smb\&.conf
1019format\&.
1020.RE
1021.RS 4
1022net conf listshares \- List the registry shares\&.
1023.RE
1024.RS 4
1025net conf drop \- Delete the complete configuration from
1026registry\&.
1027.RE
1028.RS 4
1029net conf showshare \- Show the definition of a registry share\&.
1030.RE
1031.RS 4
1032net conf addshare \- Create a new registry share\&.
1033.RE
1034.RS 4
1035net conf delshare \- Delete a registry share\&.
1036.RE
1037.RS 4
1038net conf setparm \- Store a parameter\&.
1039.RE
1040.RS 4
1041net conf getparm \- Retrieve the value of a parameter\&.
1042.RE
1043.RS 4
1044net conf delparm \- Delete a parameter\&.
1045.RE
1046.RS 4
1047net conf getincludes \- Show the includes of a share definition\&.
1048.RE
1049.RS 4
1050net conf setincludes \- Set includes for a share\&.
1051.RE
1052.RS 4
1053net conf delincludes \- Delete includes from a share definition\&.
1054.RE
1055.SS "CONF LIST"
1056.PP
1057Print the configuration data stored in the registry in a smb\&.conf\-like format to standard output\&.
1058.SS "CONF IMPORT [--test|-T] filename [section]"
1059.PP
1060This command imports configuration from a file in smb\&.conf format\&. If a section encountered in the input file is present in registry, its contents is replaced\&. Sections of registry configuration that have no counterpart in the input file are not affected\&. If you want to delete these, you will have to use the "net conf drop" or "net conf delshare" commands\&. Optionally, a section may be specified to restrict the effect of the import command to that specific section\&. A test mode is enabled by specifying the parameter "\-T" on the commandline\&. In test mode, no changes are made to the registry, and the resulting configuration is printed to standard output instead\&.
1061.SS "CONF LISTSHARES"
1062.PP
1063List the names of the shares defined in registry\&.
1064.SS "CONF DROP"
1065.PP
1066Delete the complete configuration data from registry\&.
1067.SS "CONF SHOWSHARE sharename"
1068.PP
1069Show the definition of the share or section specified\&. It is valid to specify "global" as sharename to retrieve the global configuration options from registry\&.
1070.SS "CONF ADDSHARE sharename path [writeable={y|N} [guest_ok={y|N} [comment]]] "
1071.PP
1072Create a new share definition in registry\&. The sharename and path have to be given\&. The share name may
1073\fInot\fR
1074be "global"\&. Optionally, values for the very common options "writeable", "guest ok" and a "comment" may be specified\&. The same result may be obtained by a sequence of "net conf setparm" commands\&.
1075.SS "CONF DELSHARE sharename"
1076.PP
1077Delete a share definition from registry\&.
1078.SS "CONF SETPARM section parameter value"
1079.PP
1080Store a parameter in registry\&. The section may be global or a sharename\&. The section is created if it does not exist yet\&.
1081.SS "CONF GETPARM section parameter"
1082.PP
1083Show a parameter stored in registry\&.
1084.SS "CONF DELPARM section parameter"
1085.PP
1086Delete a parameter stored in registry\&.
1087.SS "CONF GETINCLUDES section"
1088.PP
1089Get the list of includes for the provided section (global or share)\&.
1090.PP
1091Note that due to the nature of the registry database and the nature of include directives, the includes need special treatment: Parameters are stored in registry by the parameter name as valuename, so there is only ever one instance of a parameter per share\&. Also, a specific order like in a text file is not guaranteed\&. For all real parameters, this is perfectly ok, but the include directive is rather a meta parameter, for which, in the smb\&.conf text file, the place where it is specified between the other parameters is very important\&. This can not be achieved by the simple registry smbconf data model, so there is one ordered list of includes per share, and this list is evaluated after all the parameters of the share\&.
1092.PP
1093Further note that currently, only files can be included from registry configuration\&. In the future, there will be the ability to include configuration data from other registry keys\&.
1094.SS "CONF SETINCLUDES section [filename]+"
1095.PP
1096Set the list of includes for the provided section (global or share) to the given list of one or more filenames\&. The filenames may contain the usual smb\&.conf macros like %I\&.
1097.SS "CONF DELINCLUDES section"
1098.PP
1099Delete the list of includes from the provided section (global or share)\&.
1100.SS "REGISTRY"
1101.PP
1102Manipulate Samba\'s registry\&.
1103.PP
1104The registry commands are:
1105.RS 4
1106net registry enumerate \- Enumerate registry keys and values\&.
1107.RE
1108.RS 4
1109net registry enumerate_recursive \- Enumerate registry key and its subkeys\&.
1110.RE
1111.RS 4
1112net registry createkey \- Create a new registry key\&.
1113.RE
1114.RS 4
1115net registry deletekey \- Delete a registry key\&.
1116.RE
1117.RS 4
1118net registry deletekey_recursive \- Delete a registry key with subkeys\&.
1119.RE
1120.RS 4
1121net registry getvalue \- Print a registry value\&.
1122.RE
1123.RS 4
1124net registry getvalueraw \- Print a registry value (raw format)\&.
1125.RE
1126.RS 4
1127net registry setvalue \- Set a new registry value\&.
1128.RE
1129.RS 4
1130net registry increment \- Increment a DWORD registry value under a lock\&.
1131.RE
1132.RS 4
1133net registry deletevalue \- Delete a registry value\&.
1134.RE
1135.RS 4
1136net registry getsd \- Get security descriptor\&.
1137.RE
1138.RS 4
1139net registry getsd_sdd1 \- Get security descriptor in sddl format\&.
1140.RE
1141.RS 4
1142net registry setsd_sdd1 \- Set security descriptor from sddl format
1143string\&.
1144.RE
1145.RS 4
1146net registry import \- Import a registration entries (\&.reg) file\&.
1147.RE
1148.RS 4
1149net registry export \- Export a registration entries (\&.reg) file\&.
1150.RE
1151.RS 4
1152net registry convert \- Convert a registration entries (\&.reg) file\&.
1153.RE
1154.SS "REGISTRY ENUMERATE key "
1155.PP
1156Enumerate subkeys and values of
1157\fIkey\fR\&.
1158.SS "REGISTRY ENUMERATE_RECURSIVE key "
1159.PP
1160Enumerate values of
1161\fIkey\fR
1162and its subkeys\&.
1163.SS "REGISTRY CREATEKEY key "
1164.PP
1165Create a new
1166\fIkey\fR
1167if not yet existing\&.
1168.SS "REGISTRY DELETEKEY key "
1169.PP
1170Delete the given
1171\fIkey\fR
1172and its values from the registry, if it has no subkeys\&.
1173.SS "REGISTRY DELETEKEY_RECURSIVE key "
1174.PP
1175Delete the given
1176\fIkey\fR
1177and all of its subkeys and values from the registry\&.
1178.SS "REGISTRY GETVALUE key name"
1179.PP
1180Output type and actual value of the value
1181\fIname\fR
1182of the given
1183\fIkey\fR\&.
1184.SS "REGISTRY GETVALUERAW key name"
1185.PP
1186Output the actual value of the value
1187\fIname\fR
1188of the given
1189\fIkey\fR\&.
1190.SS "REGISTRY SETVALUE key name type value ..."
1191.PP
1192Set the value
1193\fIname\fR
1194of an existing
1195\fIkey\fR\&.
1196\fItype\fR
1197may be one of
1198\fIsz\fR,
1199\fImulti_sz\fR
1200or
1201\fIdword\fR\&. In case of
1202\fImulti_sz\fR
1203\fIvalue\fR
1204may be given multiple times\&.
1205.SS "REGISTRY INCREMENT key name [inc]"
1206.PP
1207Increment the DWORD value
1208\fIname\fR
1209of
1210\fIkey\fR
1211by
1212\fIinc\fR
1213while holding a g_lock\&.
1214\fIinc\fR
1215defaults to 1\&.
1216.SS "REGISTRY DELETEVALUE key name"
1217.PP
1218Delete the value
1219\fIname\fR
1220of the given
1221\fIkey\fR\&.
1222.SS "REGISTRY GETSD key"
1223.PP
1224Get the security descriptor of the given
1225\fIkey\fR\&.
1226.SS "REGISTRY GETSD_SDDL key"
1227.PP
1228Get the security descriptor of the given
1229\fIkey\fR
1230as a Security Descriptor Definition Language (SDDL) string\&.
1231.SS "REGISTRY SETSD_SDDL keysd"
1232.PP
1233Set the security descriptor of the given
1234\fIkey\fR
1235from a Security Descriptor Definition Language (SDDL) string
1236\fIsd\fR\&.
1237.SS "REGISTRY IMPORT file[opt]"
1238.PP
1239Import a registration entries (\&.reg)
1240\fIfile\fR\&.
1241.SS "REGISTRY EXPORT keyfile[opt]"
1242.PP
1243Export a
1244\fIkey\fR
1245to a registration entries (\&.reg)
1246\fIfile\fR\&.
1247.SS "REGISTRY CONVERT in out [[inopt] outopt]"
1248.PP
1249Convert a registration entries (\&.reg) file
1250\fIin\fR\&.
1251.SS "EVENTLOG"
1252.PP
1253Starting with version 3\&.4\&.0 net can read, dump, import and export native win32 eventlog files (usually *\&.evt)\&. evt files are used by the native Windows eventviewer tools\&.
1254.PP
1255The import and export of evt files can only succeed when
1256\fIeventlog list\fR
1257is used in
1258\fIsmb\&.conf\fR
1259file\&. See the
1260\fBsmb.conf\fR(5)
1261manpage for details\&.
1262.PP
1263The eventlog commands are:
1264.RS 4
1265net eventlog dump \- Dump a eventlog *\&.evt file on the screen\&.
1266.RE
1267.RS 4
1268net eventlog import \- Import a eventlog *\&.evt into the samba internal
1269tdb based representation of eventlogs\&.
1270.RE
1271.RS 4
1272net eventlog export \- Export the samba internal tdb based representation
1273of eventlogs into an eventlog *\&.evt file\&.
1274.RE
1275.SS "EVENTLOG DUMP filename"
1276.PP
1277Prints a eventlog *\&.evt file to standard output\&.
1278.SS "EVENTLOG IMPORT filename eventlog"
1279.PP
1280Imports a eventlog *\&.evt file defined by
1281\fIfilename\fR
1282into the samba internal tdb representation of eventlog defined by
1283\fIeventlog\fR\&.
1284\fIeventlog\fR
1285needs to part of the
1286\fIeventlog list\fR
1287defined in smb\&.conf\&. See the
1288\fBsmb.conf\fR(5)
1289manpage for details\&.
1290.SS "EVENTLOG EXPORT filename eventlog"
1291.PP
1292Exports the samba internal tdb representation of eventlog defined by
1293\fIeventlog\fR
1294to a eventlog *\&.evt file defined by
1295\fIfilename\fR\&.
1296\fIeventlog\fR
1297needs to part of the
1298\fIeventlog list\fR
1299defined in smb\&.conf\&. See the
1300\fBsmb.conf\fR(5)
1301manpage for details\&.
1302.SS "DOM"
1303.PP
1304Starting 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\&.
1305.PP
1306In 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\&.
1307.PP
1308The client side support for remote join is implemented in the net dom commands which are:
1309.RS 4
1310net dom join \- Join a remote computer into a domain\&.
1311.RE
1312.RS 4
1313net dom unjoin \- Unjoin a remote computer from a domain\&.
1314.RE
1315.RS 4
1316net dom renamecomputer \- Renames a remote computer joined to a domain\&.
1317.RE
1318.SS "DOM JOIN domain=DOMAIN ou=OU account=ACCOUNT password=PASSWORD reboot"
1319.PP
1320Joins a computer into a domain\&. This command supports the following additional parameters:
1321.sp
1322.RS 4
1323.ie n \{\
1324\h'-04'\(bu\h'+03'\c
1325.\}
1326.el \{\
1327.sp -1
1328.IP \(bu 2.3
1329.\}
1330\fIDOMAIN\fR
1331can 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 \e separator character\&. Example: MYDOM\eMYDC\&. The
1332\fIDOMAIN\fR
1333parameter cannot be NULL\&.
1334.RE
1335.sp
1336.RS 4
1337.ie n \{\
1338\h'-04'\(bu\h'+03'\c
1339.\}
1340.el \{\
1341.sp -1
1342.IP \(bu 2.3
1343.\}
1344\fIOU\fR
1345can be set to a RFC 1779 LDAP DN, like
1346\fIou=mymachines,cn=Users,dc=example,dc=com\fR
1347in order to create the machine account in a non\-default LDAP container\&. This optional parameter is only supported when joining Active Directory Domains\&.
1348.RE
1349.sp
1350.RS 4
1351.ie n \{\
1352\h'-04'\(bu\h'+03'\c
1353.\}
1354.el \{\
1355.sp -1
1356.IP \(bu 2.3
1357.\}
1358\fIACCOUNT\fR
1359defines 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\&.
1360.RE
1361.sp
1362.RS 4
1363.ie n \{\
1364\h'-04'\(bu\h'+03'\c
1365.\}
1366.el \{\
1367.sp -1
1368.IP \(bu 2.3
1369.\}
1370\fIPASSWORD\fR
1371defines the password for the domain account defined with
1372\fIACCOUNT\fR\&.
1373.RE
1374.sp
1375.RS 4
1376.ie n \{\
1377\h'-04'\(bu\h'+03'\c
1378.\}
1379.el \{\
1380.sp -1
1381.IP \(bu 2.3
1382.\}
1383\fIREBOOT\fR
1384is an optional parameter that can be set to reboot the remote machine after successful join to the domain\&.
1385.RE
1386.sp
1387.RE
1388.PP
1389Note 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\&.
1390.PP
1391Example: net dom join \-S xp \-U XP\e\eadministrator%secret domain=MYDOM account=MYDOM\e\eadministrator password=topsecret reboot\&.
1392.PP
1393This 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\&.
1394.SS "DOM UNJOIN account=ACCOUNT password=PASSWORD reboot"
1395.PP
1396Unjoins a computer from a domain\&. This command supports the following additional parameters:
1397.sp
1398.RS 4
1399.ie n \{\
1400\h'-04'\(bu\h'+03'\c
1401.\}
1402.el \{\
1403.sp -1
1404.IP \(bu 2.3
1405.\}
1406\fIACCOUNT\fR
1407defines 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\&.
1408.RE
1409.sp
1410.RS 4
1411.ie n \{\
1412\h'-04'\(bu\h'+03'\c
1413.\}
1414.el \{\
1415.sp -1
1416.IP \(bu 2.3
1417.\}
1418\fIPASSWORD\fR
1419defines the password for the domain account defined with
1420\fIACCOUNT\fR\&.
1421.RE
1422.sp
1423.RS 4
1424.ie n \{\
1425\h'-04'\(bu\h'+03'\c
1426.\}
1427.el \{\
1428.sp -1
1429.IP \(bu 2.3
1430.\}
1431\fIREBOOT\fR
1432is an optional parameter that can be set to reboot the remote machine after successful unjoin from the domain\&.
1433.RE
1434.sp
1435.RE
1436.PP
1437Note 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\&.
1438.PP
1439Example: net dom unjoin \-S xp \-U XP\e\eadministrator%secret account=MYDOM\e\eadministrator password=topsecret reboot\&.
1440.PP
1441This 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\&.
1442.SS "DOM RENAMECOMPUTER newname=NEWNAME account=ACCOUNT password=PASSWORD reboot"
1443.PP
1444Renames a computer that is joined to a domain\&. This command supports the following additional parameters:
1445.sp
1446.RS 4
1447.ie n \{\
1448\h'-04'\(bu\h'+03'\c
1449.\}
1450.el \{\
1451.sp -1
1452.IP \(bu 2.3
1453.\}
1454\fINEWNAME\fR
1455defines the new name of the machine in the domain\&.
1456.RE
1457.sp
1458.RS 4
1459.ie n \{\
1460\h'-04'\(bu\h'+03'\c
1461.\}
1462.el \{\
1463.sp -1
1464.IP \(bu 2.3
1465.\}
1466\fIACCOUNT\fR
1467defines 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\&.
1468.RE
1469.sp
1470.RS 4
1471.ie n \{\
1472\h'-04'\(bu\h'+03'\c
1473.\}
1474.el \{\
1475.sp -1
1476.IP \(bu 2.3
1477.\}
1478\fIPASSWORD\fR
1479defines the password for the domain account defined with
1480\fIACCOUNT\fR\&.
1481.RE
1482.sp
1483.RS 4
1484.ie n \{\
1485\h'-04'\(bu\h'+03'\c
1486.\}
1487.el \{\
1488.sp -1
1489.IP \(bu 2.3
1490.\}
1491\fIREBOOT\fR
1492is an optional parameter that can be set to reboot the remote machine after successful rename in the domain\&.
1493.RE
1494.sp
1495.RE
1496.PP
1497Note 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\&.
1498.PP
1499Example: net dom renamecomputer \-S xp \-U XP\e\eadministrator%secret newname=XPNEW account=MYDOM\e\eadministrator password=topsecret reboot\&.
1500.PP
1501This 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\&.
1502.SS "G_LOCK"
1503.PP
1504Manage global locks\&.
1505.SS "G_LOCK DO lockname timeout command"
1506.PP
1507Execute a shell command under a global lock\&. This might be useful to define the order in which several shell commands will be executed\&. The locking information is stored in a file called
1508g_lock\&.tdb\&. In setups with CTDB running, the locking information will be available on all cluster nodes\&.
1509.sp
1510.RS 4
1511.ie n \{\
1512\h'-04'\(bu\h'+03'\c
1513.\}
1514.el \{\
1515.sp -1
1516.IP \(bu 2.3
1517.\}
1518\fILOCKNAME\fR
1519defines the name of the global lock\&.
1520.RE
1521.sp
1522.RS 4
1523.ie n \{\
1524\h'-04'\(bu\h'+03'\c
1525.\}
1526.el \{\
1527.sp -1
1528.IP \(bu 2.3
1529.\}
1530\fITIMEOUT\fR
1531defines the timeout\&.
1532.RE
1533.sp
1534.RS 4
1535.ie n \{\
1536\h'-04'\(bu\h'+03'\c
1537.\}
1538.el \{\
1539.sp -1
1540.IP \(bu 2.3
1541.\}
1542\fICOMMAND\fR
1543defines the shell command to execute\&.
1544.RE
1545.SS "G_LOCK LOCKS"
1546.PP
1547Print a list of all currently existing locknames\&.
1548.SS "G_LOCK DUMP lockname"
1549.PP
1550Dump the locking table of a certain global lock\&.
1551.SS "HELP [COMMAND]"
1552.PP
1553Gives usage information for the specified command\&.
1554.SH "VERSION"
1555.PP
1556This man page is complete for version 3 of the Samba suite\&.
1557.SH "AUTHOR"
1558.PP
1559The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.
1560.PP
1561The net manpage was written by Jelmer Vernooij\&.
Note: See TracBrowser for help on using the repository browser.