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 '
9 FIXME. Defaults to
0x21
13 <!-- This one is only used by shutdown (RPC) -->
14 <!ENTITY net.arg.shutdown '
18 Reboot after shutdown.
25 Force shutting down all applications.
30 <term>-t timeout
</term>
32 Timeout before system will be shut down. An interactive
33 user of the system can use this time to cancel the shutdown.
41 <refentrytitle>net
</refentrytitle>
42 <manvolnum>8</manvolnum>
47 <refname>net
</refname>
48 <refpurpose>Tool for administration of Samba and remote
55 <command>net
</command>
56 <arg choice=
"req"><ads|rap|rpc
></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>
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.
90 <title>OPTIONS
</title>
96 <term>-w target-workgroup
</term>
98 Sets target workgroup or domain. You have to specify
99 either this option or the IP address or the name of a server.
104 <term>-W workgroup
</term>
106 Sets client workgroup or domain
118 <term>-I ip-address
</term>
120 IP address of target server to use. You have to
121 specify either this option or a target workgroup or
129 Port on the target server to connect to (usually
139 or
445).
130 Defaults to trying
445 first, then
139.
134 &stdarg.netbios.name;
138 <term>-S server
</term>
140 Name of target server. You should specify either
141 this option or a target workgroup or a target IP address.
148 When listing data, give more information on each item.
155 Make queries to the external server using the machine account of the local server.
164 <title>COMMANDS
</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>
175 <para>Without any options, the
<command>NET TIME
</command> command
176 displays the time on the remote server.
182 <title>TIME SYSTEM
</title>
184 <para> Displays the time on the remote server in a format ready for
<command>/bin/date
</command></para>
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>
196 <title>TIME ZONE
</title>
198 <para>Displays the timezone in hours from GMT on the remote computer.
</para>
204 <title>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [options]
</title>
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
214 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
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>
228 <title>[RPC|ADS] USER
</title>
231 <title>[RPC|ADS] USER DELETE
<replaceable>target
</replaceable></title>
233 <para>Delete specified user
</para>
238 <title>[RPC|ADS] USER LIST
</title>
240 <para>List all users
</para>
245 <title>[RPC|ADS] USER INFO
<replaceable>target
</replaceable></title>
247 <para>List the domain groups of a the specified user.
</para>
252 <title>[RPC|ADS] USER ADD
<replaceable>name
</replaceable> [password] [-F user flags] [-C comment]
</title>
254 <para>Add specified user.
</para>
259 <title>[RPC|ADS] GROUP
</title>
262 <title>[RPC|ADS] GROUP [misc options] [targets]
</title>
263 <para>List user groups.
</para>
267 <title>[RPC|ADS] GROUP DELETE
<replaceable>name
</replaceable> [misc. options]
</title>
269 <para>Delete specified group.
</para>
274 <title>[RPC|ADS] GROUP ADD
<replaceable>name
</replaceable> [-C comment]
</title>
276 <para>Create specified group.
</para>
282 <title>[RAP|RPC] SHARE
</title>
285 <title>[RAP|RPC] SHARE [misc. options] [targets]
</title>
287 <para>Enumerates all exported resources (network shares) on target server.
</para>
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>
301 <title>SHARE DELETE
<replaceable>sharenam
</replaceable></title>
303 <para>Delete specified share.
</para>
308 <title>[RPC|RAP] FILE
</title>
311 <title>[RPC|RAP] FILE
</title>
313 <para>List all open files on remote server.
</para>
318 <title>[RPC|RAP] FILE CLOSE
<replaceable>fileid
</replaceable></title>
320 <para>Close file with specified
<replaceable>fileid
</replaceable> on
321 remote server.
</para>
326 <title>[RPC|RAP] FILE INFO
<replaceable>fileid
</replaceable></title>
329 Print information on specified
<replaceable>fileid
</replaceable>.
330 Currently listed are: file-id, username, locks, path, permissions.
336 <title>[RAP|RPC] FILE USER
</title>
345 <title>SESSION
</title>
348 <title>RAP SESSION
</title>
350 <para>Without any other options, SESSION enumerates all active SMB/CIFS
351 sessions on the target server.
</para>
356 <title>RAP SESSION DELETE|CLOSE
<replaceable>CLIENT_NAME
</replaceable></title>
358 <para>Close the specified sessions.
</para>
363 <title>RAP SESSION INFO
<replaceable>CLIENT_NAME
</replaceable></title>
365 <para>Give a list with all the open files in specified session.
</para>
372 <title>RAP SERVER
<replaceable>DOMAIN
</replaceable></title>
374 <para>List all servers in specified domain or workgroup. Defaults
375 to local domain.
</para>
380 <title>RAP DOMAIN
</title>
382 <para>Lists all domains and workgroups visible on the
383 current network.
</para>
388 <title>RAP PRINTQ
</title>
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>
400 <title>RAP PRINTQ DELETE
<replaceable>JOBID
</replaceable></title>
402 <para>Delete job with specified id.
</para>
409 <title>RAP VALIDATE
<replaceable>user
</replaceable> [
<replaceable>password
</replaceable>]
</title>
412 Validate whether the specified user can log in to the
413 remote server. If the password is not specified on the commandline, it
422 <title>RAP GROUPMEMBER
</title>
425 <title>RAP GROUPMEMBER LIST
<replaceable>GROUP
</replaceable></title>
427 <para>List all members of the specified group.
</para>
432 <title>RAP GROUPMEMBER DELETE
<replaceable>GROUP
</replaceable> <replaceable>USER
</replaceable></title>
434 <para>Delete member from group.
</para>
439 <title>RAP GROUPMEMBER ADD
<replaceable>GROUP
</replaceable> <replaceable>USER
</replaceable></title>
441 <para>Add member to group.
</para>
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.
459 <title>RAP SERVICE
</title>
462 <title>RAP SERVICE START
<replaceable>NAME
</replaceable> [arguments...]
</title>
464 <para>Start the specified service on the remote server. Not implemented yet.
</para>
471 <title>RAP SERVICE STOP
</title>
473 <para>Stop the specified service on the remote server.
</para>
482 <title>RAP PASSWORD
<replaceable>USER
</replaceable> <replaceable>OLDPASS
</replaceable> <replaceable>NEWPASS
</replaceable></title>
485 Change password of
<replaceable>USER
</replaceable> from
<replaceable>OLDPASS
</replaceable> to
<replaceable>NEWPASS
</replaceable>.
491 <title>LOOKUP
</title>
494 <title>LOOKUP HOST
<replaceable>HOSTNAME
</replaceable> [
<replaceable>TYPE
</replaceable>]
</title>
497 Lookup the IP address of the given host with the specified type (netbios suffix).
498 The type defaults to
0x20 (workstation).
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>
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>
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>
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>
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:
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>
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>
562 <title>CACHE DEL
<replaceable>key
</replaceable></title>
564 <para>Delete key from the cache.
</para>
569 <title>CACHE SET
<replaceable>key
</replaceable> <replaceable>data
</replaceable> <replaceable>time-out
</replaceable></title>
571 <para>Update data of existing cache entry.
</para>
576 <title>CACHE SEARCH
<replaceable>PATTERN
</replaceable></title>
578 <para>Search for the specified pattern in the cache data.
</para>
583 <title>CACHE LIST
</title>
586 List all current items in the cache.
592 <title>CACHE FLUSH
</title>
594 <para>Remove all the current items from the cache.
</para>
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>
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>
616 <title>GROUPMAP
</title>
618 <para>Manage the mappings between Windows group SIDs and UNIX groups.
619 Parameters take the for
"parameter=value". Common options include:
</para>
622 <listitem><para>unixgroup - Name of the UNIX group
</para></listitem>
623 <listitem><para>ntgroup - Name of the Windows NT group (must be
624 resolvable to a SID
</para></listitem>
625 <listitem><para>rid - Unsigned
32-bit integer
</para></listitem>
626 <listitem><para>sid - Full SID in the form of
"S-1-..."</para></listitem>
627 <listitem><para>type - Type of the group; either 'domain', 'local',
628 or 'builtin'
</para></listitem>
629 <listitem><para>comment - Freeform text description of the group
</para></listitem>
633 <title>GROUPMAP ADD
</title>
635 <para>Add a new group mapping entry
</para>
637 <para>net groupmap add {rid=int|sid=string} unixgroup=string [type={domain|local|builtin}] [ntgroup=string] [comment=string]
</para>
642 <title>GROUPMAP DELETE
</title>
644 <para>Delete a group mapping entry
</para>
646 <para>net groupmap delete {ntgroup=string|sid=SID}
</para>
651 <title>GROUPMAP MODIFY
</title>
653 <para>Update en existing group entry
</para>
655 <para>net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] [comment=string] [type={domain|local}
</para>
659 <title>GROUPMAP LIST
</title>
661 <para>List existing group mapping entries
</para>
663 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]
</para>
671 <title>MAXRID
</title>
673 <para>Prints out the highest RID currently in use on the local
674 server (by the active 'passdb backend').
680 <title>RPC INFO
</title>
682 <para>Print information about the domain of the remote server,
683 such as domain name, domain sid and number of users and groups.
689 <title>[RPC|ADS] TESTJOIN
</title>
691 <para>Check whether participation in a domain is still valid.
</para>
696 <title>[RPC|ADS] CHANGETRUSTPW
</title>
698 <para>Force change of domain trust password.
</para>
703 <title>RPC TRUSTDOM
</title>
706 <title>RPC TRUSTDOM ADD
<replaceable>DOMAIN
</replaceable></title>
708 <para>Add a interdomain trust account for
709 <replaceable>DOMAIN
</replaceable> to the remote server.
715 <title>RPC TRUSTDOM DEL
<replaceable>DOMAIM
</replaceable></title>
717 <para>Remove interdomain trust account for
718 <replaceable>DOMAIN
</replaceable> from the remote server.
726 <title>RPC TRUSTDOM ESTABLISH
<replaceable>DOMAIN
</replaceable></title>
729 Establish a trust relationship to a trusting domain.
730 Interdomain account must already be created on the remote PDC.
736 <title>RPC TRUSTDOM REVOKE
<replaceable>DOMAIN
</replaceable></title>
737 <para>Abandon relationship to trusted domain
</para>
742 <title>RPC TRUSTDOM LIST
</title>
744 <para>List all current interdomain trust relationships.
</para>
751 <title>RPC ABORTSHUTDOWN
</title>
753 <para>Abort the shutdown of a remote server.
</para>
758 <title>SHUTDOWN [-t timeout] [-r] [-f] [-C message]
</title>
760 <para>Shut down the remote server.
</para>
765 <term>-C message
</term>
766 <listitem><para>Display the specified message on the screen to
767 announce the shutdown.
</para></listitem>
774 <title>SAMDUMP
</title>
776 <para>Print out sam database of remote server. You need
777 to run this on either a BDC.
<!--
778 Is that correct? - Jelmer --></para>
782 <title>VAMPIRE
</title>
784 <para>Export users, aliases and groups from remote server to
785 local server. Can only be run an a BDC.
791 <title>GETSID
</title>
793 <para>Fetch domain SID and store it in the local
<filename>secrets.tdb
</filename>.
</para>
798 <title>ADS LEAVE
</title>
800 <para>Make the remote host leave the domain it is part of.
</para>
805 <title>ADS STATUS
</title>
807 <para>Print out status of machine account of the local machine in ADS.
808 Prints out quite some debug info. Aimed at developers, regular
809 users should use
<command>NET ADS TESTJOIN
</command>.
</para>
814 <title>ADS PRINTER
</title>
817 <title>ADS PRINTER INFO [
<replaceable>PRINTER
</replaceable>] [
<replaceable>SERVER
</replaceable>]
</title>
820 Lookup info for
<replaceable>PRINTER
</replaceable> on
<replaceable>SERVER
</replaceable>. The printer name defaults to
"*", the
821 server name defaults to the local host.
</para>
826 <title>ADS PRINTER PUBLISH
<replaceable>PRINTER
</replaceable></title>
828 <para>Publish specified printer using ADS.
</para>
833 <title>ADS PRINTER REMOVE
<replaceable>PRINTER
</replaceable></title>
835 <para>Remove specified printer from ADS directory.
</para>
842 <title>ADS SEARCH
<replaceable>EXPRESSION
</replaceable> <replaceable>ATTRIBUTES...
</replaceable></title>
844 <para>Perform a raw LDAP search on a ADS server and dump the results. The
845 expression is a standard LDAP search expression, and the
846 attributes are a list of LDAP fields to show in the results.
</para>
848 <para>Example:
<userinput>net ads search '(objectCategory=group)' sAMAccountName
</userinput>
854 <title>ADS DN
<replaceable>DN
</replaceable> <replaceable>(attributes)
</replaceable></title>
857 Perform a raw LDAP search on a ADS server and dump the results. The
858 DN standard LDAP DN, and the attributes are a list of LDAP fields
859 to show in the result.
862 <para>Example:
<userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName
</userinput></para>
867 <title>WORKGROUP
</title>
869 <para>Print out workgroup name for specified kerberos realm.
</para>
875 <title>HELP [COMMAND]
</title>
877 <para>Gives usage information for the specified command.
</para>
884 <title>VERSION
</title>
886 <para>This man page is complete for version
3.0 of the Samba
891 <title>AUTHOR
</title>
893 <para>The original Samba software and related utilities
894 were created by Andrew Tridgell. Samba is now developed
895 by the Samba Team as an Open Source project similar
896 to the way the Linux kernel is developed.
</para>
898 <para>The net manpage was written by Jelmer Vernooij.
</para>