syncing up docs, examples, & packaging from 3.0
[bbaumbach/samba-autobuild/.git] / docs / manpages / net.8
1 .\"Generated by db2man.xsl. Don't modify this, modify the source.
2 .de Sh \" Subsection
3 .br
4 .if t .Sp
5 .ne 5
6 .PP
7 \fB\\$1\fR
8 .PP
9 ..
10 .de Sp \" Vertical space (when we can't use .PP)
11 .if t .sp .5v
12 .if n .sp
13 ..
14 .de Ip \" List item
15 .br
16 .ie \\n(.$>=3 .ne \\$3
17 .el .ne 3
18 .IP "\\$1" \\$2
19 ..
20 .TH "NET" 8 "" "" ""
21 .SH NAME
22 net \- Tool for administration of Samba and remote CIFS servers.
23 .SH "SYNOPSIS"
24
25 .nf
26 \fBnet\fR {<ads|rap|rpc>} [-h] [-w workgroup] [-W myworkgroup] [-U user] [-I ip-address]
27     [-p port] [-n myname] [-s conffile] [-S server] [-l] [-P] [-D debuglevel]
28    
29 .fi
30
31 .SH "DESCRIPTION"
32
33 .PP
34 This tool is part of the \fBSamba\fR(7) suite\&.
35
36 .PP
37 The 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\&.
38
39 .SH "OPTIONS"
40
41 .TP
42 -h|--help
43 Print a summary of command line options\&.
44
45
46 .TP
47 -w target-workgroup
48 Sets target workgroup or domain\&. You have to specify either this option or the IP address or the name of a server\&.
49
50
51 .TP
52 -W workgroup
53 Sets client workgroup or domain
54
55
56 .TP
57 -U user
58 User name to use
59
60
61 .TP
62 -I ip-address
63 IP address of target server to use\&. You have to specify either this option or a target workgroup or a target server\&.
64
65
66 .TP
67 -p port
68 Port on the target server to connect to (usually 139 or 445)\&. Defaults to trying 445 first, then 139\&.
69
70
71 .TP
72 -n <primary NetBIOS name>
73 This option allows you to override the NetBIOS name that Samba uses for itself\&. This is identical to setting the \fInetbios name\fR parameter in the \fIsmb\&.conf\fR file\&. However, a command line setting will take precedence over settings in \fIsmb\&.conf\fR\&.
74
75
76 .TP
77 -s <configuration file>
78 The 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 \fIsmb\&.conf\fR for more information\&. The default configuration file name is determined at compile time\&.
79
80
81 .TP
82 -S server
83 Name of target server\&. You should specify either this option or a target workgroup or a target IP address\&.
84
85
86 .TP
87 -l
88 When listing data, give more information on each item\&.
89
90
91 .TP
92 -P
93 Make queries to the external server using the machine account of the local server\&.
94
95
96 .TP
97 -d|--debug=debuglevel
98 \fIdebuglevel\fR is an integer from 0 to 10\&. The default value if this parameter is not specified is zero\&.
99
100
101 The 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\&.
102
103
104 Levels 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\&.
105
106
107 Note that specifying this parameter here will override the \fIlog level\fR parameter in the \fIsmb\&.conf\fR file\&.
108
109
110 .SH "COMMANDS"
111
112 .SS "CHANGESECRETPW"
113
114 .PP
115 This 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\&.
116
117 .SS "TIME"
118
119 .PP
120 The \fBNET TIME\fR command 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\&.
121
122 .PP
123 Without any options, the \fBNET TIME\fR command displays the time on the remote server\&.
124
125 .PP
126 Displays the time on the remote server in a format ready for \fB/bin/date\fR
127
128 .PP
129 Tries to set the date and time of the local server to that on the remote server using \fB/bin/date\fR\&.
130
131 .PP
132 Displays the timezone in hours from GMT on the remote computer\&.
133
134 .SS "[RPC|ADS] JOIN [TYPE] [-U username[%password]] [options]"
135
136 .PP
137 Join 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\&.
138
139 .PP
140 [TYPE] may be PDC, BDC or MEMBER to specify the type of server joining the domain\&.
141
142 .SS "[RPC] OLDJOIN [options]"
143
144 .PP
145 Join 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\&.
146
147 .SS "[RPC|ADS] USER"
148
149 .PP
150 Delete specified user
151
152 .PP
153 List all users
154
155 .PP
156 List the domain groups of a the specified user\&.
157
158 .PP
159 Add specified user\&.
160
161 .SS "[RPC|ADS] GROUP"
162
163 .PP
164 List user groups\&.
165
166 .PP
167 Delete specified group\&.
168
169 .PP
170 Create specified group\&.
171
172 .SS "[RAP|RPC] SHARE"
173
174 .PP
175 Enumerates all exported resources (network shares) on target server\&.
176
177 .PP
178 Adds a share from a server (makes the export active)\&. Maxusers specifies the number of users that can be connected to the share simultaneously\&.
179
180 .PP
181 Delete specified share\&.
182
183 .SS "[RPC|RAP] FILE"
184
185 .PP
186 List all open files on remote server\&.
187
188 .PP
189 Close file with specified \fIfileid\fR on remote server\&.
190
191 .PP
192 Print information on specified \fIfileid\fR\&. Currently listed are: file-id, username, locks, path, permissions\&.
193
194 .RS
195 .Sh "Note"
196
197 .PP
198 Currently NOT implemented\&.
199
200 .RE
201
202 .SS "SESSION"
203
204 .PP
205 Without any other options, SESSION enumerates all active SMB/CIFS sessions on the target server\&.
206
207 .PP
208 Close the specified sessions\&.
209
210 .PP
211 Give a list with all the open files in specified session\&.
212
213 .SS "RAP SERVER DOMAIN"
214
215 .PP
216 List all servers in specified domain or workgroup\&. Defaults to local domain\&.
217
218 .SS "RAP DOMAIN"
219
220 .PP
221 Lists all domains and workgroups visible on the current network\&.
222
223 .SS "RAP PRINTQ"
224
225 .PP
226 Lists the specified print queue and print jobs on the server\&. If the \fIQUEUE_NAME\fR is omitted, all queues are listed\&.
227
228 .PP
229 Delete job with specified id\&.
230
231 .SS "RAP VALIDATE user [password]"
232
233 .PP
234 Validate whether the specified user can log in to the remote server\&. If the password is not specified on the commandline, it will be prompted\&.
235
236 .RS
237 .Sh "Note"
238
239 .PP
240 Currently NOT implemented\&.
241
242 .RE
243
244 .SS "RAP GROUPMEMBER"
245
246 .PP
247 List all members of the specified group\&.
248
249 .PP
250 Delete member from group\&.
251
252 .PP
253 Add member to group\&.
254
255 .SS "RAP ADMIN command"
256
257 .PP
258 Execute the specified \fIcommand\fR on the remote server\&. Only works with OS/2 servers\&.
259
260 .RS
261 .Sh "Note"
262
263 .PP
264 Currently NOT implemented\&.
265
266 .RE
267
268 .SS "RAP SERVICE"
269
270 .PP
271 Start the specified service on the remote server\&. Not implemented yet\&.
272
273 .RS
274 .Sh "Note"
275
276 .PP
277 Currently NOT implemented\&.
278
279 .RE
280
281 .PP
282 Stop the specified service on the remote server\&.
283
284 .RS
285 .Sh "Note"
286
287 .PP
288 Currently NOT implemented\&.
289
290 .RE
291
292 .SS "RAP PASSWORD USER OLDPASS NEWPASS"
293
294 .PP
295 Change password of \fIUSER\fR from \fIOLDPASS\fR to \fINEWPASS\fR\&.
296
297 .SS "LOOKUP"
298
299 .PP
300 Lookup the IP address of the given host with the specified type (netbios suffix)\&. The type defaults to 0x20 (workstation)\&.
301
302 .PP
303 Give IP address of LDAP server of specified \fIDOMAIN\fR\&. Defaults to local domain\&.
304
305 .PP
306 Give IP address of KDC for the specified \fIREALM\fR\&. Defaults to local realm\&.
307
308 .PP
309 Give IP's of Domain Controllers for specified \fI DOMAIN\fR\&. Defaults to local domain\&.
310
311 .PP
312 Give IP of master browser for specified \fIDOMAIN\fR or workgroup\&. Defaults to local domain\&.
313
314 .SS "CACHE"
315
316 .PP
317 Samba uses a general caching interface called 'gencache'\&. It can be controlled using 'NET CACHE'\&.
318
319 .PP
320 All the timeout parameters support the suffixes: s - Secondsm - Minutesh - Hoursd - Daysw - Weeks 
321
322 .PP
323 Add specified key+data to the cache with the given timeout\&.
324
325 .PP
326 Delete key from the cache\&.
327
328 .PP
329 Update data of existing cache entry\&.
330
331 .PP
332 Search for the specified pattern in the cache data\&.
333
334 .PP
335 List all current items in the cache\&.
336
337 .PP
338 Remove all the current items from the cache\&.
339
340 .SS "GETLOCALSID [DOMAIN]"
341
342 .PP
343 Print the SID of the specified domain, or if the parameter is omitted, the SID of the domain the local server is in\&.
344
345 .SS "SETLOCALSID S-1-5-21-x-y-z"
346
347 .PP
348 Sets domain sid for the local server to the specified SID\&.
349
350 .SS "GROUPMAP"
351
352 .PP
353 Manage the mappings between Windows group SIDs and UNIX groups\&. Parameters take the for "parameter=value"\&. Common options include:
354
355 .TP 3
356 \(bu
357 unixgroup - Name of the UNIX group
358
359 .TP
360 \(bu
361 ntgroup - Name of the Windows NT group (must be resolvable to a SID
362
363 .TP
364 \(bu
365 rid - Unsigned 32-bit integer
366
367 .TP
368 \(bu
369 sid - Full SID in the form of "S-1-\&.\&.\&."
370
371 .TP
372 \(bu
373 type - Type of the group; either 'domain', 'local', or 'builtin'
374
375 .TP
376 \(bu
377 comment - Freeform text description of the group
378
379 .LP
380
381 .PP
382 Add a new group mapping entry
383
384 .PP
385 net groupmap add {rid=int|sid=string} unixgroup=string [type={domain|local|builtin}] [ntgroup=string] [comment=string]
386
387 .PP
388 Delete a group mapping entry
389
390 .PP
391 net groupmap delete {ntgroup=string|sid=SID}
392
393 .PP
394 Update en existing group entry
395
396 .PP
397 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] [comment=string] [type={domain|local}
398
399 .PP
400 List existing group mapping entries
401
402 .PP
403 net groupmap list [verbose] [ntgroup=string] [sid=SID]
404
405 .SS "MAXRID"
406
407 .PP
408 Prints out the highest RID currently in use on the local server (by the active 'passdb backend')\&.
409
410 .SS "RPC INFO"
411
412 .PP
413 Print information about the domain of the remote server, such as domain name, domain sid and number of users and groups\&.
414
415 .SS "[RPC|ADS] TESTJOIN"
416
417 .PP
418 Check whether participation in a domain is still valid\&.
419
420 .SS "[RPC|ADS] CHANGETRUSTPW"
421
422 .PP
423 Force change of domain trust password\&.
424
425 .SS "RPC TRUSTDOM"
426
427 .PP
428 Add a interdomain trust account for \fIDOMAIN\fR to the remote server\&.
429
430 .PP
431 Remove interdomain trust account for \fIDOMAIN\fR from the remote server\&.
432
433 .RS
434 .Sh "Note"
435
436 .PP
437 Currently NOT implemented\&.
438
439 .RE
440
441 .PP
442 Establish a trust relationship to a trusting domain\&. Interdomain account must already be created on the remote PDC\&.
443
444 .PP
445 Abandon relationship to trusted domain
446
447 .PP
448 List all current interdomain trust relationships\&.
449
450 .SS "RPC ABORTSHUTDOWN"
451
452 .PP
453 Abort the shutdown of a remote server\&.
454
455 .SS "SHUTDOWN [-t timeout] [-r] [-f] [-C message]"
456
457 .PP
458 Shut down the remote server\&.
459
460 .TP
461 -r
462 Reboot after shutdown\&.
463
464
465 .TP
466 -f
467 Force shutting down all applications\&.
468
469
470 .TP
471 -t timeout
472 Timeout before system will be shut down\&. An interactive user of the system can use this time to cancel the shutdown\&.
473
474
475 .TP
476 -C message
477 Display the specified message on the screen to announce the shutdown\&.
478
479
480 .SS "SAMDUMP"
481
482 .PP
483 Print out sam database of remote server\&. You need to run this on either a BDC\&.
484
485 .SS "VAMPIRE"
486
487 .PP
488 Export users, aliases and groups from remote server to local server\&. Can only be run an a BDC\&.
489
490 .SS "GETSID"
491
492 .PP
493 Fetch domain SID and store it in the local \fIsecrets\&.tdb\fR\&.
494
495 .SS "ADS LEAVE"
496
497 .PP
498 Make the remote host leave the domain it is part of\&.
499
500 .SS "ADS STATUS"
501
502 .PP
503 Print out status of machine account of the local machine in ADS\&. Prints out quite some debug info\&. Aimed at developers, regular users should use \fBNET ADS TESTJOIN\fR\&.
504
505 .SS "ADS PRINTER"
506
507 .PP
508 Lookup info for \fIPRINTER\fR on \fISERVER\fR\&. The printer name defaults to "*", the server name defaults to the local host\&.
509
510 .PP
511 Publish specified printer using ADS\&.
512
513 .PP
514 Remove specified printer from ADS directory\&.
515
516 .SS "ADS SEARCH EXPRESSION ATTRIBUTES..."
517
518 .PP
519 Perform 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\&.
520
521 .PP
522 Example: \fBnet ads search '(objectCategory=group)' sAMAccountName\fR 
523
524 .SS "ADS DN DN (attributes)"
525
526 .PP
527 Perform 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\&.
528
529 .PP
530 Example: \fBnet ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName\fR
531
532 .SS "WORKGROUP"
533
534 .PP
535 Print out workgroup name for specified kerberos realm\&.
536
537 .SS "HELP [COMMAND]"
538
539 .PP
540 Gives usage information for the specified command\&.
541
542 .SH "VERSION"
543
544 .PP
545 This man page is complete for version 3\&.0 of the Samba suite\&.
546
547 .SH "AUTHOR"
548
549 .PP
550 The 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\&.
551
552 .PP
553 The net manpage was written by Jelmer Vernooij\&.
554