1 <?xml version="1.0" encoding="iso8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
5 <!ENTITY % globalentities SYSTEM './../global.ent'> %globalentities;
7 <!-- This one is only used for adding users using RAP -->
8 <!ENTITY net.arg.flags '
12 FIXME. Defaults to 0x21
16 <!-- This one is only used by shutdown (RPC) -->
17 <!ENTITY net.arg.shutdown '
21 Reboot after shutdown.
28 Force shutting down all applications.
33 <term>-t timeout</term>
35 Timeout before system will be shut down. An interactive
36 user of the system can use this time to cancel the shutdown.
44 <refentrytitle>net</refentrytitle>
45 <manvolnum>8</manvolnum>
50 <refname>net</refname>
51 <refpurpose>Tool for administration of Samba and remote
58 <command>net</command>
59 <arg choice="req"><ads|rap|rpc></arg>
60 <arg choice="opt">-h</arg>
61 <arg choice="opt">-w workgroup</arg>
62 <arg choice="opt">-W myworkgroup</arg>
63 <arg choice="opt">-U user</arg>
64 <arg choice="opt">-I ip-address</arg>
65 <arg choice="opt">-p port</arg>
66 <arg choice="opt">-n myname</arg>
67 <arg choice="opt">-s conffile</arg>
68 <arg choice="opt">-S server</arg>
69 <arg choice="opt">-l</arg>
70 <arg choice="opt">-P</arg>
71 <arg choice="opt">-D debuglevel</arg>
76 <title>DESCRIPTION</title>
78 <para>This tool is part of the <citerefentry><refentrytitle>Samba</refentrytitle>
79 <manvolnum>7</manvolnum></citerefentry> suite.</para>
81 <para>The samba net utility is meant to work just like the net utility
82 available for windows and DOS. The first argument should be used
83 to specify the protocol to use when executing a certain command.
84 ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3)
85 clients and RPC can be used for NT4 and Windows 2000. If this
86 argument is omitted, net will try to determine it automatically.
87 Not all commands are available on all protocols.
93 <title>OPTIONS</title>
99 <term>-w target-workgroup</term>
101 Sets target workgroup or domain. You have to specify
102 either this option or the IP address or the name of a server.
107 <term>-W workgroup</term>
109 Sets client workgroup or domain
121 <term>-I ip-address</term>
123 IP address of target server to use. You have to
124 specify either this option or a target workgroup or
132 Port on the target server to connect to (usually 139 or 445).
133 Defaults to trying 445 first, then 139.
137 &stdarg.netbios.name;
141 <term>-S server</term>
143 Name of target server. You should specify either
144 this option or a target workgroup or a target IP address.
151 When listing data, give more information on each item.
158 Make queries to the external server using the machine account of the local server.
167 <title>COMMANDS</title>
172 <para>The <command>NET TIME</command> command allows you to view the time on a remote server
173 or synchronise the time on the local server with the time on the remote server.</para>
178 <para>Without any options, the <command>NET TIME</command> command
179 displays the time on the remote server.
185 <title>TIME SYSTEM</title>
187 <para> Displays the time on the remote server in a format ready for <command>/bin/date</command></para>
192 <title>TIME SET</title>
193 <para>Tries to set the date and time of the local server to that on
194 the remote server using <command>/bin/date</command>. </para>
199 <title>TIME ZONE</title>
201 <para>Displays the timezone in hours from GMT on the remote computer.</para>
207 <title>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [options]</title>
210 Join a domain. If the account already exists on the server, and
211 [TYPE] is MEMBER, the machine will attempt to join automatically.
212 (Assuming that the machine has been created in server manager)
213 Otherwise, a password will be prompted for, and a new account may
217 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
223 <title>[RPC] OLDJOIN [options]</title>
225 <para>Join a domain. Use the OLDJOIN option to join the domain
226 using the old style of domain joining - you need to create a trust
227 account in server manager first.</para>
231 <title>[RPC|ADS] USER</title>
234 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
236 <para>Delete specified user</para>
241 <title>[RPC|ADS] USER LIST</title>
243 <para>List all users</para>
248 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
250 <para>List the domain groups of a the specified user.</para>
255 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
257 <para>Add specified user.</para>
262 <title>[RPC|ADS] GROUP</title>
265 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
266 <para>List user groups.</para>
270 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
272 <para>Delete specified group.</para>
277 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
279 <para>Create specified group.</para>
285 <title>[RAP|RPC] SHARE</title>
288 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
290 <para>Enumerates all exported resources (network shares) on target server.</para>
295 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
297 <para>Adds a share from a server (makes the export active). Maxusers
298 specifies the number of users that can be connected to the
299 share simultaneously.</para>
304 <title>SHARE DELETE <replaceable>sharenam</replaceable></title>
306 <para>Delete specified share.</para>
311 <title>[RPC|RAP] FILE</title>
314 <title>[RPC|RAP] FILE</title>
316 <para>List all open files on remote server.</para>
321 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
323 <para>Close file with specified <replaceable>fileid</replaceable> on
324 remote server.</para>
329 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
332 Print information on specified <replaceable>fileid</replaceable>.
333 Currently listed are: file-id, username, locks, path, permissions.
339 <title>[RAP|RPC] FILE USER</title>
348 <title>SESSION</title>
351 <title>RAP SESSION</title>
353 <para>Without any other options, SESSION enumerates all active SMB/CIFS
354 sessions on the target server.</para>
359 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
361 <para>Close the specified sessions.</para>
366 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
368 <para>Give a list with all the open files in specified session.</para>
375 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
377 <para>List all servers in specified domain or workgroup. Defaults
378 to local domain.</para>
383 <title>RAP DOMAIN</title>
385 <para>Lists all domains and workgroups visible on the
386 current network.</para>
391 <title>RAP PRINTQ</title>
394 <title>RAP PRINTQ LIST <replaceable>QUEUE_NAME</replaceable></title>
396 <para>Lists the specified print queue and print jobs on the server.
397 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all
398 queues are listed.</para>
403 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
405 <para>Delete job with specified id.</para>
412 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
415 Validate whether the specified user can log in to the
416 remote server. If the password is not specified on the commandline, it
425 <title>RAP GROUPMEMBER</title>
428 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
430 <para>List all members of the specified group.</para>
435 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
437 <para>Delete member from group.</para>
442 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
444 <para>Add member to group.</para>
451 <title>RAP ADMIN <replaceable>command</replaceable></title>
453 <para>Execute the specified <replaceable>command</replaceable> on
454 the remote server. Only works with OS/2 servers.
462 <title>RAP SERVICE</title>
465 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
467 <para>Start the specified service on the remote server. Not implemented yet.</para>
474 <title>RAP SERVICE STOP</title>
476 <para>Stop the specified service on the remote server.</para>
485 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
488 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
494 <title>LOOKUP</title>
497 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
500 Lookup the IP address of the given host with the specified type (netbios suffix).
501 The type defaults to 0x20 (workstation).
507 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable></title>
509 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
514 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
516 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
517 Defaults to local realm.</para>
522 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
524 <para>Give IP's of Domain Controllers for specified <replaceable>
525 DOMAIN</replaceable>. Defaults to local domain.</para>
530 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
532 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
533 or workgroup. Defaults to local domain.</para>
542 <para>Samba uses a general caching interface called 'gencache'. It
543 can be controlled using 'NET CACHE'.</para>
545 <para>All the timeout parameters support the suffixes:
548 <member>s - Seconds</member>
549 <member>m - Minutes</member>
550 <member>h - Hours</member>
551 <member>d - Days</member>
552 <member>w - Weeks</member>
558 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
560 <para>Add specified key+data to the cache with the given timeout.</para>
565 <title>CACHE DEL <replaceable>key</replaceable></title>
567 <para>Delete key from the cache.</para>
572 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
574 <para>Update data of existing cache entry.</para>
579 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
581 <para>Search for the specified pattern in the cache data.</para>
586 <title>CACHE LIST</title>
589 List all current items in the cache.
595 <title>CACHE FLUSH</title>
597 <para>Remove all the current items from the cache.</para>
604 <title>GETLOCALSID [DOMAIN]</title>
606 <para>Print the SID of the specified domain, or if the parameter is
607 omitted, the SID of the domain the local server is in.</para>
612 <title>SETLOCALSID S-1-5-21-x-y-z</title>
614 <para>Sets domain sid for the local server to the specified SID.</para>
619 <title>GROUPMAP</title>
621 <para>Manage the mappings between Windows group SIDs and UNIX groups.
622 Parameters take the for "parameter=value". Common options include:</para>
625 <listitem><para>unixgroup - Name of the UNIX group</para></listitem>
626 <listitem><para>ntgroup - Name of the Windows NT group (must be
627 resolvable to a SID</para></listitem>
628 <listitem><para>rid - Unsigned 32-bit integer</para></listitem>
629 <listitem><para>sid - Full SID in the form of "S-1-..."</para></listitem>
630 <listitem><para>type - Type of the group; either 'domain', 'local',
631 or 'builtin'</para></listitem>
632 <listitem><para>comment - Freeform text description of the group</para></listitem>
636 <title>GROUPMAP ADD</title>
638 <para>Add a new group mapping entry</para>
640 <para>net groupmap add {rid=int|sid=string} unixgroup=string [type={domain|local|builtin}] [ntgroup=string] [comment=string]</para>
645 <title>GROUPMAP DELETE</title>
647 <para>Delete a group mapping entry</para>
649 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
654 <title>GROUPMAP MODIFY</title>
656 <para>Update en existing group entry</para>
658 <para>net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] [comment=string] [type={domain|local}</para>
662 <title>GROUPMAP LIST</title>
664 <para>List existing group mapping entries</para>
666 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
674 <title>MAXRID</title>
676 <para>Prints out the highest RID currently in use on the local
677 server (by the active 'passdb backend').
683 <title>RPC INFO</title>
685 <para>Print information about the domain of the remote server,
686 such as domain name, domain sid and number of users and groups.
692 <title>[RPC|ADS] TESTJOIN</title>
694 <para>Check whether participation in a domain is still valid.</para>
699 <title>[RPC|ADS] CHANGETRUSTPW</title>
701 <para>Force change of domain trust password.</para>
706 <title>RPC TRUSTDOM</title>
709 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
711 <para>Add a interdomain trust account for
712 <replaceable>DOMAIN</replaceable> to the remote server.
718 <title>RPC TRUSTDOM DEL <replaceable>DOMAIM</replaceable></title>
720 <para>Remove interdomain trust account for
721 <replaceable>DOMAIN</replaceable> from the remote server.
729 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
732 Establish a trust relationship to a trusting domain.
733 Interdomain account must already be created on the remote PDC.
739 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
740 <para>Abandon relationship to trusted domain</para>
745 <title>RPC TRUSTDOM LIST</title>
747 <para>List all current interdomain trust relationships.</para>
754 <title>RPC ABORTSHUTDOWN</title>
756 <para>Abort the shutdown of a remote server.</para>
761 <title>SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
763 <para>Shut down the remote server.</para>
768 <term>-C message</term>
769 <listitem><para>Display the specified message on the screen to
770 announce the shutdown.</para></listitem>
777 <title>SAMDUMP</title>
779 <para>Print out sam database of remote server. You need
780 to run this on either a BDC. <!--
781 Is that correct? - Jelmer --></para>
785 <title>VAMPIRE</title>
787 <para>Export users, aliases and groups from remote server to
788 local server. Can only be run an a BDC.
794 <title>GETSID</title>
796 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename>. </para>
801 <title>ADS LEAVE</title>
803 <para>Make the remote host leave the domain it is part of. </para>
808 <title>ADS STATUS</title>
810 <para>Print out status of machine account of the local machine in ADS.
811 Prints out quite some debug info. Aimed at developers, regular
812 users should use <command>NET ADS TESTJOIN</command>.</para>
817 <title>ADS PRINTER</title>
820 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
823 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the
824 server name defaults to the local host.</para>
829 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
831 <para>Publish specified printer using ADS.</para>
836 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
838 <para>Remove specified printer from ADS directory.</para>
845 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
847 <para>Perform a raw LDAP search on a ADS server and dump the results. The
848 expression is a standard LDAP search expression, and the
849 attributes are a list of LDAP fields to show in the results.</para>
851 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
857 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
860 Perform a raw LDAP search on a ADS server and dump the results. The
861 DN standard LDAP DN, and the attributes are a list of LDAP fields
862 to show in the result.
865 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
870 <title>WORKGROUP</title>
872 <para>Print out workgroup name for specified kerberos realm.</para>
878 <title>HELP [COMMAND]</title>
880 <para>Gives usage information for the specified command.</para>
887 <title>VERSION</title>
889 <para>This man page is complete for version 3.0 of the Samba
894 <title>AUTHOR</title>
896 <para>The original Samba software and related utilities
897 were created by Andrew Tridgell. Samba is now developed
898 by the Samba Team as an Open Source project similar
899 to the way the Linux kernel is developed.</para>
901 <para>The net manpage was written by Jelmer Vernooij.</para>