Fix syntax errors
[Samba/gebeck_regimport.git] / docs / docbook / manpages / net.8.sgml
blob8ee965e3ed849a58706a5e4a3995a6f7bf632b89
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
2 <!ENTITY % globalentities SYSTEM '../global.ent'> %globalentities;
4 <!-- This one is only used for adding users using RAP -->
5 <!ENTITY net.arg.flags '
6 <varlistentry>
7 <term>-F flags</term>
8 <listitem><para>
9 FIXME. Defaults to 0x21
10 </para></listitem>
11 </varlistentry>'>
13 <!-- This one is only used by shutdown (RPC) -->
14 <!ENTITY net.arg.shutdown '
15 <varlistentry>
16 <term>-r</term>
17 <listitem><para>
18 Reboot after shutdown.
19 </para></listitem>
20 </varlistentry>
22 <varlistentry>
23 <term>-f</term>
24 <listitem><para>
25 Force shutting down all applications.
26 </para></listitem>
27 </varlistentry>
29 <varlistentry>
30 <term>-t timeout</term>
31 <listitem><para>
32 Timeout before system will be shut down. An interactive
33 user of the system can use this time to cancel the shutdown.
34 </para></listitem>
35 </varlistentry>'>
38 <refentry id="net.8">
40 <refmeta>
41 <refentrytitle>net</refentrytitle>
42 <manvolnum>8</manvolnum>
43 </refmeta>
46 <refnamediv>
47 <refname>net</refname>
48 <refpurpose>Tool for administration of Samba and remote
49 CIFS servers.
50 </refpurpose>
51 </refnamediv>
53 <refsynopsisdiv>
54 <cmdsynopsis>
55 <command>net</command>
56 <arg choice="req">&lt;ads|rap|rpc&gt;</arg>
57 <arg choice="opt">-h</arg>
58 <arg choice="opt">-w workgroup</arg>
59 <arg choice="opt">-W myworkgroup</arg>
60 <arg choice="opt">-U user</arg>
61 <arg choice="opt">-I ip-address</arg>
62 <arg choice="opt">-p port</arg>
63 <arg choice="opt">-n myname</arg>
64 <arg choice="opt">-s conffile</arg>
65 <arg choice="opt">-S server</arg>
66 <arg choice="opt">-l</arg>
67 <arg choice="opt">-P</arg>
68 <arg choice="opt">-D debuglevel</arg>
69 </cmdsynopsis>
70 </refsynopsisdiv>
72 <refsect1>
73 <title>DESCRIPTION</title>
75 <para>This tool is part of the <citerefentry><refentrytitle>Samba</refentrytitle>
76 <manvolnum>7</manvolnum></citerefentry> suite.</para>
78 <para>The samba net utility is meant to work just like the net utility
79 available for windows and DOS. The first argument should be used
80 to specify the protocol to use when executing a certain command.
81 ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3)
82 clients and RPC can be used for NT4 and Windows 2000. If this
83 argument is omitted, net will try to determine it automatically.
84 Not all commands are available on all protocols.
85 </para>
87 </refsect1>
89 <refsect1>
90 <title>OPTIONS</title>
92 <variablelist>
93 &stdarg.help;
95 <varlistentry>
96 <term>-w target-workgroup</term>
97 <listitem><para>
98 Sets target workgroup or domain. You have to specify
99 either this option or the IP address or the name of a server.
100 </para></listitem>
101 </varlistentry>
103 <varlistentry>
104 <term>-W workgroup</term>
105 <listitem><para>
106 Sets client workgroup or domain
107 </para></listitem>
108 </varlistentry>
110 <varlistentry>
111 <term>-U user</term>
112 <listitem><para>
113 User name to use
114 </para></listitem>
115 </varlistentry>
117 <varlistentry>
118 <term>-I ip-address</term>
119 <listitem><para>
120 IP address of target server to use. You have to
121 specify either this option or a target workgroup or
122 a target server.
123 </para></listitem>
124 </varlistentry>
126 <varlistentry>
127 <term>-p port</term>
128 <listitem><para>
129 Port on the target server to connect to (usually 139 or 445).
130 Defaults to trying 445 first, then 139.
131 </para></listitem>
132 </varlistentry>
134 &stdarg.netbios.name;
135 &stdarg.configfile;
137 <varlistentry>
138 <term>-S server</term>
139 <listitem><para>
140 Name of target server. You should specify either
141 this option or a target workgroup or a target IP address.
142 </para></listitem>
143 </varlistentry>
145 <varlistentry>
146 <term>-l</term>
147 <listitem><para>
148 When listing data, give more information on each item.
149 </para></listitem>
150 </varlistentry>
152 <varlistentry>
153 <term>-P</term>
154 <listitem><para>
155 Make queries to the external server using the machine account of the local server.
156 </para></listitem>
157 </varlistentry>
159 &stdarg.debug;
160 </variablelist>
161 </refsect1>
163 <refsect1>
164 <title>COMMANDS</title>
166 <refsect2>
167 <title>TIME</title>
169 <para>The <command>NET TIME</command> command allows you to view the time on a remote server
170 or synchronise the time on the local server with the time on the remote server.</para>
172 <refsect3>
173 <title>TIME</title>
175 <para>Without any options, the <command>NET TIME</command> command
176 displays the time on the remote server.
177 </para>
179 </refsect3>
181 <refsect3>
182 <title>TIME SYSTEM</title>
184 <para> Displays the time on the remote server in a format ready for <command>/bin/date</command></para>
186 </refsect3>
188 <refsect3>
189 <title>TIME SET</title>
190 <para>Tries to set the date and time of the local server to that on
191 the remote server using <command>/bin/date</command>. </para>
193 </refsect3>
195 <refsect3>
196 <title>TIME ZONE</title>
198 <para>Displays the timezone in hours from GMT on the remote computer.</para>
200 </refsect3>
201 </refsect2>
203 <refsect2>
204 <title>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [options]</title>
206 <para>
207 Join a domain. If the account already exists on the server, and
208 [TYPE] is MEMBER, the machine will attempt to join automatically.
209 (Assuming that the machine has been created in server manager)
210 Otherwise, a password will be prompted for, and a new account may
211 be created.</para>
213 <para>
214 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
215 joining the domain.
216 </para>
217 </refsect2>
219 <refsect2>
220 <title>[RPC] OLDJOIN [options]</title>
222 <para>Join a domain. Use the OLDJOIN option to join the domain
223 using the old style of domain joining - you need to create a trust
224 account in server manager first.</para>
225 </refsect2>
227 <refsect2>
228 <title>[RPC|ADS] USER</title>
230 <refsect3>
231 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
233 <para>Delete specified user</para>
235 </refsect3>
237 <refsect3>
238 <title>[RPC|ADS] USER LIST</title>
240 <para>List all users</para>
242 </refsect3>
244 <refsect3>
245 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
247 <para>List the domain groups of a the specified user.</para>
249 </refsect3>
251 <refsect3>
252 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
254 <para>Add specified user.</para>
255 </refsect3>
256 </refsect2>
258 <refsect2>
259 <title>[RPC|ADS] GROUP</title>
261 <refsect3>
262 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
263 <para>List user groups.</para>
264 </refsect3>
266 <refsect3>
267 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
269 <para>Delete specified group.</para>
271 </refsect3>
273 <refsect3>
274 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
276 <para>Create specified group.</para>
278 </refsect3>
279 </refsect2>
281 <refsect2>
282 <title>[RAP|RPC] SHARE</title>
284 <refsect3>
285 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
287 <para>Enumerates all exported resources (network shares) on target server.</para>
289 </refsect3>
291 <refsect3>
292 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
294 <para>Adds a share from a server (makes the export active). Maxusers
295 specifies the number of users that can be connected to the
296 share simultaneously.</para>
298 </refsect3>
300 <refsect3>
301 <title>SHARE DELETE <replaceable>sharenam</replaceable></title>
303 <para>Delete specified share.</para>
304 </refsect3>
305 </refsect2>
307 <refsect2>
308 <title>[RPC|RAP] FILE</title>
310 <refsect3>
311 <title>[RPC|RAP] FILE</title>
313 <para>List all open files on remote server.</para>
315 </refsect3>
317 <refsect3>
318 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
320 <para>Close file with specified <replaceable>fileid</replaceable> on
321 remote server.</para>
323 </refsect3>
325 <refsect3>
326 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
328 <para>
329 Print information on specified <replaceable>fileid</replaceable>.
330 Currently listed are: file-id, username, locks, path, permissions.
331 </para>
333 </refsect3>
335 <refsect3>
336 <title>[RAP|RPC] FILE USER</title>
338 &not.implemented;
340 </refsect3>
342 </refsect2>
344 <refsect2>
345 <title>SESSION</title>
347 <refsect3>
348 <title>RAP SESSION</title>
350 <para>Without any other options, SESSION enumerates all active SMB/CIFS
351 sessions on the target server.</para>
353 </refsect3>
355 <refsect3>
356 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
358 <para>Close the specified sessions.</para>
360 </refsect3>
362 <refsect3>
363 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
365 <para>Give a list with all the open files in specified session.</para>
367 </refsect3>
369 </refsect2>
371 <refsect2>
372 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
374 <para>List all servers in specified domain or workgroup. Defaults
375 to local domain.</para>
377 </refsect2>
379 <refsect2>
380 <title>RAP DOMAIN</title>
382 <para>Lists all domains and workgroups visible on the
383 current network.</para>
385 </refsect2>
387 <refsect2>
388 <title>RAP PRINTQ</title>
390 <refsect3>
391 <title>RAP PRINTQ LIST <replaceable>QUEUE_NAME</replaceable></title>
393 <para>Lists the specified print queue and print jobs on the server.
394 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all
395 queues are listed.</para>
397 </refsect3>
399 <refsect3>
400 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
402 <para>Delete job with specified id.</para>
404 </refsect3>
406 </refsect2>
408 <refsect2>
409 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
411 <para>
412 Validate whether the specified user can log in to the
413 remote server. If the password is not specified on the commandline, it
414 will be prompted.
415 </para>
417 &not.implemented;
419 </refsect2>
421 <refsect2>
422 <title>RAP GROUPMEMBER</title>
424 <refsect3>
425 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
427 <para>List all members of the specified group.</para>
429 </refsect3>
431 <refsect3>
432 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
434 <para>Delete member from group.</para>
436 </refsect3>
438 <refsect3>
439 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
441 <para>Add member to group.</para>
443 </refsect3>
445 </refsect2>
447 <refsect2>
448 <title>RAP ADMIN <replaceable>command</replaceable></title>
450 <para>Execute the specified <replaceable>command</replaceable> on
451 the remote server. Only works with OS/2 servers.
452 </para>
454 &not.implemented;
456 </refsect2>
458 <refsect2>
459 <title>RAP SERVICE</title>
461 <refsect3>
462 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
464 <para>Start the specified service on the remote server. Not implemented yet.</para>
466 &not.implemented;
468 </refsect3>
470 <refsect3>
471 <title>RAP SERVICE STOP</title>
473 <para>Stop the specified service on the remote server.</para>
475 &not.implemented;
477 </refsect3>
479 </refsect2>
481 <refsect2>
482 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
484 <para>
485 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
486 </para>
488 </refsect2>
490 <refsect2>
491 <title>LOOKUP</title>
493 <refsect3>
494 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
496 <para>
497 Lookup the IP address of the given host with the specified type (netbios suffix).
498 The type defaults to 0x20 (workstation).
499 </para>
501 </refsect3>
503 <refsect3>
504 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable></title>
506 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
508 </refsect3>
510 <refsect3>
511 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
513 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
514 Defaults to local realm.</para>
516 </refsect3>
518 <refsect3>
519 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
521 <para>Give IP's of Domain Controllers for specified <replaceable>
522 DOMAIN</replaceable>. Defaults to local domain.</para>
524 </refsect3>
526 <refsect3>
527 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
529 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
530 or workgroup. Defaults to local domain.</para>
532 </refsect3>
534 </refsect2>
536 <refsect2>
537 <title>CACHE</title>
539 <para>Samba uses a general caching interface called 'gencache'. It
540 can be controlled using 'NET CACHE'.</para>
542 <para>All the timeout parameters support the suffixes:
544 <simplelist>
545 <member>s - Seconds</member>
546 <member>m - Minutes</member>
547 <member>h - Hours</member>
548 <member>d - Days</member>
549 <member>w - Weeks</member>
550 </simplelist>
552 </para>
554 <refsect3>
555 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
557 <para>Add specified key+data to the cache with the given timeout.</para>
559 </refsect3>
561 <refsect3>
562 <title>CACHE DEL <replaceable>key</replaceable></title>
564 <para>Delete key from the cache.</para>
566 </refsect3>
568 <refsect3>
569 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
571 <para>Update data of existing cache entry.</para>
573 </refsect3>
575 <refsect3>
576 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
578 <para>Search for the specified pattern in the cache data.</para>
580 </refsect3>
582 <refsect3>
583 <title>CACHE LIST</title>
585 <para>
586 List all current items in the cache.
587 </para>
589 </refsect3>
591 <refsect3>
592 <title>CACHE FLUSH</title>
594 <para>Remove all the current items from the cache.</para>
596 </refsect3>
598 </refsect2>
600 <refsect2>
601 <title>GETLOCALSID [DOMAIN]</title>
603 <para>Print the SID of the specified domain, or if the parameter is
604 omitted, the SID of the domain the local server is in.</para>
606 </refsect2>
608 <refsect2>
609 <title>SETLOCALSID S-1-5-21-x-y-z</title>
611 <para>Sets domain sid for the local server to the specified SID.</para>
613 </refsect2>
615 <refsect2>
616 <title>MAXRID</title>
618 <para>Prints out the highest RID currently in use on the local
619 server (by the active 'passdb backend').
620 </para>
622 </refsect2>
624 <refsect2>
625 <title>RPC INFO</title>
627 <para>Print information about the domain of the remote server,
628 such as domain name, domain sid and number of users and groups.
629 </para>
631 </refsect2>
633 <refsect2>
634 <title>[RPC|ADS] TESTJOIN</title>
636 <para>Check whether participation in a domain is still valid.</para>
638 </refsect2>
640 <refsect2>
641 <title>[RPC|ADS] CHANGETRUSTPW</title>
643 <para>Force change of domain trust password.</para>
645 </refsect2>
647 <refsect2>
648 <title>RPC TRUSTDOM</title>
650 <refsect3>
651 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
653 <para>Add a interdomain trust account for
654 <replaceable>DOMAIN</replaceable> to the remote server.
655 </para>
657 </refsect3>
659 <refsect3>
660 <title>RPC TRUSTDOM DEL <replaceable>DOMAIM</replaceable></title>
662 <para>Remove interdomain trust account for
663 <replaceable>DOMAIN</replaceable> from the remote server.
664 </para>
666 &not.implemented;
668 </refsect3>
670 <refsect3>
671 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
673 <para>
674 Establish a trust relationship to a trusting domain.
675 Interdomain account must already be created on the remote PDC.
676 </para>
678 </refsect3>
680 <refsect3>
681 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
682 <para>Abandon relationship to trusted domain</para>
684 </refsect3>
686 <refsect3>
687 <title>RPC TRUSTDOM LIST</title>
689 <para>List all current interdomain trust relationships.</para>
691 </refsect3>
693 </refsect2>
695 <refsect2>
696 <title>RPC ABORTSHUTDOWN</title>
698 <para>Abort the shutdown of a remote server.</para>
700 </refsect2>
702 <refsect2>
703 <title>SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
705 <para>Shut down the remote server.</para>
707 <variablelist>
708 &net.arg.shutdown;
709 <varlistentry>
710 <term>-C message</term>
711 <listitem><para>Display the specified message on the screen to
712 announce the shutdown.</para></listitem>
713 </varlistentry>
714 </variablelist>
716 </refsect2>
718 <refsect2>
719 <title>SAMDUMP</title>
721 <para>Print out sam database of remote server. You need
722 to run this on either a BDC. <!--
723 Is that correct? - Jelmer --></para>
724 </refsect2>
726 <refsect2>
727 <title>VAMPIRE</title>
729 <para>Export users, aliases and groups from remote server to
730 local server. Can only be run an a BDC.
731 </para>
733 </refsect2>
735 <refsect2>
736 <title>GETSID</title>
738 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename>. </para>
740 </refsect2>
742 <refsect2>
743 <title>ADS LEAVE</title>
745 <para>Make the remote host leave the domain it is part of. </para>
747 </refsect2>
749 <refsect2>
750 <title>ADS STATUS</title>
752 <para>Print out status of machine account of the local machine in ADS.
753 Prints out quite some debug info. Aimed at developers, regular
754 users should use <command>NET ADS TESTJOIN</command>.</para>
756 </refsect2>
758 <refsect2>
759 <title>ADS PRINTER</title>
761 <refsect3>
762 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
764 <para>
765 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the
766 server name defaults to the local host.</para>
768 </refsect3>
770 <refsect3>
771 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
773 <para>Publish specified printer using ADS.</para>
775 </refsect3>
777 <refsect3>
778 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
780 <para>Remove specified printer from ADS directory.</para>
782 </refsect3>
784 </refsect2>
786 <refsect2>
787 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
789 <para>Perform a raw LDAP search on a ADS server and dump the results. The
790 expression is a standard LDAP search expression, and the
791 attributes are a list of LDAP fields to show in the results.</para>
793 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
794 </para>
796 </refsect2>
798 <refsect2>
799 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
801 <para>
802 Perform a raw LDAP search on a ADS server and dump the results. The
803 DN standard LDAP DN, and the attributes are a list of LDAP fields
804 to show in the result.
805 </para>
807 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
809 </refsect2>
811 <refsect2>
812 <title>WORKGROUP</title>
814 <para>Print out workgroup name for specified kerberos realm.</para>
816 </refsect2>
819 <refsect2>
820 <title>HELP [COMMAND]</title>
822 <para>Gives usage information for the specified command.</para>
824 </refsect2>
826 </refsect1>
828 <refsect1>
829 <title>VERSION</title>
831 <para>This man page is incomplete for version 3.0 of the Samba
832 suite.</para>
833 </refsect1>
835 <refsect1>
836 <title>AUTHOR</title>
838 <para>The original Samba software and related utilities
839 were created by Andrew Tridgell. Samba is now developed
840 by the Samba Team as an Open Source project similar
841 to the way the Linux kernel is developed.</para>
843 <para>The net manpage was written by Jelmer Vernooij.</para>
845 </refsect1>
847 </refentry>