source: vendor/3.6.23/docs/manpages/net.8

Last change on this file was 860, checked in by Silvan Scherrer, 11 years ago

Samba 3.6: updated vendor to latest version

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