source: trunk/server/docs/manpages/net.8@ 751

Last change on this file since 751 was 745, checked in by Silvan Scherrer, 13 years ago

Samba Server: updated trunk to 3.6.0

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