source: branches/samba-3.3.x/docs/manpages/net.8@ 372

Last change on this file since 372 was 368, checked in by Herwig Bauernfeind, 16 years ago

Update Samba 3.3 to 3.3.10 (docs)

File size: 37.0 KB
Line 
1'\" t
2.\" Title: net
3.\" Author: [see the "AUTHOR" section]
4.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5.\" Date: 01/14/2010
6.\" Manual: System Administration tools
7.\" Source: Samba 3.3
8.\" Language: English
9.\"
10.TH "NET" "8" "01/14/2010" "Samba 3\&.3" "System Administration tools"
11.\" -----------------------------------------------------------------
12.\" * set default formatting
13.\" -----------------------------------------------------------------
14.\" disable hyphenation
15.nh
16.\" disable justification (adjust text to left margin only)
17.ad l
18.\" -----------------------------------------------------------------
19.\" * MAIN CONTENT STARTS HERE *
20.\" -----------------------------------------------------------------
21.SH "NAME"
22net \- Tool for administration of Samba and remote CIFS servers\&.
23.SH "SYNOPSIS"
24.HP \w'\ 'u
25net {<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]
26.SH "DESCRIPTION"
27.PP
28This tool is part of the
29\fBsamba\fR(7)
30suite\&.
31.PP
32The 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\&.
33.SH "OPTIONS"
34.PP
35\-h|\-\-help
36.RS 4
37Print a summary of command line options\&.
38.RE
39.PP
40\-w target\-workgroup
41.RS 4
42Sets target workgroup or domain\&. You have to specify either this option or the IP address or the name of a server\&.
43.RE
44.PP
45\-W workgroup
46.RS 4
47Sets client workgroup or domain
48.RE
49.PP
50\-U user
51.RS 4
52User name to use
53.RE
54.PP
55\-I ip\-address
56.RS 4
57IP address of target server to use\&. You have to specify either this option or a target workgroup or a target server\&.
58.RE
59.PP
60\-p port
61.RS 4
62Port on the target server to connect to (usually 139 or 445)\&. Defaults to trying 445 first, then 139\&.
63.RE
64.PP
65\-n|\-\-netbiosname <primary NetBIOS name>
66.RS 4
67This option allows you to override the NetBIOS name that Samba uses for itself\&. This is identical to setting the
68\m[blue]\fB\%smb.conf.5.html#\fR\m[]
69parameter in the
70smb\&.conf
71file\&. However, a command line setting will take precedence over settings in
72smb\&.conf\&.
73.RE
74.PP
75\-s|\-\-configfile <configuration file>
76.RS 4
77The 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
78smb\&.conf
79for more information\&. The default configuration file name is determined at compile time\&.
80.RE
81.PP
82\-S server
83.RS 4
84Name of target server\&. You should specify either this option or a target workgroup or a target IP address\&.
85.RE
86.PP
87\-l
88.RS 4
89When listing data, give more information on each item\&.
90.RE
91.PP
92\-P
93.RS 4
94Make queries to the external server using the machine account of the local server\&.
95.RE
96.PP
97\-\-request\-timeout 30
98.RS 4
99Let client requests timeout after 30 seconds the default is 10 seconds\&.
100.RE
101.PP
102\-d|\-\-debuglevel=level
103.RS 4
104\fIlevel\fR
105is an integer from 0 to 10\&. The default value if this parameter is not specified is 0\&.
106.sp
107The 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\&.
108.sp
109Levels 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\&.
110.sp
111Note that specifying this parameter here will override the
112\m[blue]\fB\%smb.conf.5.html#\fR\m[]
113parameter in the
114smb\&.conf
115file\&.
116.RE
117.SH "COMMANDS"
118.SS "CHANGESECRETPW"
119.PP
120This 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\&.
121.SS "TIME"
122.PP
123The
124NET TIME
125command 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\&.
126.SS "TIME"
127.PP
128Without any options, the
129NET TIME
130command displays the time on the remote server\&.
131.SS "TIME SYSTEM"
132.PP
133Displays the time on the remote server in a format ready for
134/bin/date\&.
135.SS "TIME SET"
136.PP
137Tries to set the date and time of the local server to that on the remote server using
138/bin/date\&.
139.SS "TIME ZONE"
140.PP
141Displays the timezone in hours from GMT on the remote computer\&.
142.SS "[RPC|ADS] JOIN [TYPE] [\-U username[%password]] [createupn=UPN] [createcomputer=OU] [options]"
143.PP
144Join 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\&.
145.PP
146[TYPE] may be PDC, BDC or MEMBER to specify the type of server joining the domain\&.
147.PP
148[UPN] (ADS only) set the principalname attribute during the join\&. The default format is host/netbiosname@REALM\&.
149.PP
150[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 \'/\'\&. Please note that \'\e\' 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\&.
151.SS "[RPC] OLDJOIN [options]"
152.PP
153Join 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\&.
154.SS "[RPC|ADS] USER"
155.SS "[RPC|ADS] USER"
156.PP
157List all users
158.SS "[RPC|ADS] USER DELETE target"
159.PP
160Delete specified user
161.SS "[RPC|ADS] USER INFO target"
162.PP
163List the domain groups of the specified user\&.
164.SS "[RPC|ADS] USER RENAME oldname newname"
165.PP
166Rename specified user\&.
167.SS "[RPC|ADS] USER ADD name [password] [-F user flags] [-C comment]"
168.PP
169Add specified user\&.
170.SS "[RPC|ADS] GROUP"
171.SS "[RPC|ADS] GROUP [misc options] [targets]"
172.PP
173List user groups\&.
174.SS "[RPC|ADS] GROUP DELETE name [misc. options]"
175.PP
176Delete specified group\&.
177.SS "[RPC|ADS] GROUP ADD name [-C comment]"
178.PP
179Create specified group\&.
180.SS "[RAP|RPC] SHARE"
181.SS "[RAP|RPC] SHARE [misc. options] [targets]"
182.PP
183Enumerates all exported resources (network shares) on target server\&.
184.SS "[RAP|RPC] SHARE ADD name=serverpath [-C comment] [-M maxusers] [targets]"
185.PP
186Adds a share from a server (makes the export active)\&. Maxusers specifies the number of users that can be connected to the share simultaneously\&.
187.SS "SHARE DELETE sharename"
188.PP
189Delete specified share\&.
190.SS "[RPC|RAP] FILE"
191.SS "[RPC|RAP] FILE"
192.PP
193List all open files on remote server\&.
194.SS "[RPC|RAP] FILE CLOSE fileid"
195.PP
196Close file with specified
197\fIfileid\fR
198on remote server\&.
199.SS "[RPC|RAP] FILE INFO fileid"
200.PP
201Print information on specified
202\fIfileid\fR\&. Currently listed are: file\-id, username, locks, path, permissions\&.
203.SS "[RAP|RPC] FILE USER user"
204.PP
205List files opened by specified
206\fIuser\fR\&. Please note that
207net rap file user
208does not work against Samba servers\&.
209.SS "SESSION"
210.SS "RAP SESSION"
211.PP
212Without any other options, SESSION enumerates all active SMB/CIFS sessions on the target server\&.
213.SS "RAP SESSION DELETE|CLOSE CLIENT_NAME"
214.PP
215Close the specified sessions\&.
216.SS "RAP SESSION INFO CLIENT_NAME"
217.PP
218Give a list with all the open files in specified session\&.
219.SS "RAP SERVER \fIDOMAIN\fR"
220.PP
221List all servers in specified domain or workgroup\&. Defaults to local domain\&.
222.SS "RAP DOMAIN"
223.PP
224Lists all domains and workgroups visible on the current network\&.
225.SS "RAP PRINTQ"
226.SS "RAP PRINTQ INFO QUEUE_NAME"
227.PP
228Lists the specified print queue and print jobs on the server\&. If the
229\fIQUEUE_NAME\fR
230is omitted, all queues are listed\&.
231.SS "RAP PRINTQ DELETE JOBID"
232.PP
233Delete job with specified id\&.
234.SS "RAP VALIDATE \fIuser\fR [\fIpassword\fR]"
235.PP
236Validate whether the specified user can log in to the remote server\&. If the password is not specified on the commandline, it will be prompted\&.
237.if n \{\
238.sp
239.\}
240.RS 4
241.it 1 an-trap
242.nr an-no-space-flag 1
243.nr an-break-flag 1
244.br
245.ps +1
246\fBNote\fR
247.ps -1
248.br
249.PP
250Currently NOT implemented\&.
251.sp .5v
252.RE
253.SS "RAP GROUPMEMBER"
254.SS "RAP GROUPMEMBER LIST GROUP"
255.PP
256List all members of the specified group\&.
257.SS "RAP GROUPMEMBER DELETE GROUP USER"
258.PP
259Delete member from group\&.
260.SS "RAP GROUPMEMBER ADD GROUP USER"
261.PP
262Add member to group\&.
263.SS "RAP ADMIN \fIcommand\fR"
264.PP
265Execute the specified
266\fIcommand\fR
267on the remote server\&. Only works with OS/2 servers\&.
268.if n \{\
269.sp
270.\}
271.RS 4
272.it 1 an-trap
273.nr an-no-space-flag 1
274.nr an-break-flag 1
275.br
276.ps +1
277\fBNote\fR
278.ps -1
279.br
280.PP
281Currently NOT implemented\&.
282.sp .5v
283.RE
284.SS "RAP SERVICE"
285.SS "RAP SERVICE START NAME [arguments...]"
286.PP
287Start the specified service on the remote server\&. Not implemented yet\&.
288.if n \{\
289.sp
290.\}
291.RS 4
292.it 1 an-trap
293.nr an-no-space-flag 1
294.nr an-break-flag 1
295.br
296.ps +1
297\fBNote\fR
298.ps -1
299.br
300.PP
301Currently NOT implemented\&.
302.sp .5v
303.RE
304.SS "RAP SERVICE STOP"
305.PP
306Stop the specified service on the remote server\&.
307.if n \{\
308.sp
309.\}
310.RS 4
311.it 1 an-trap
312.nr an-no-space-flag 1
313.nr an-break-flag 1
314.br
315.ps +1
316\fBNote\fR
317.ps -1
318.br
319.PP
320Currently NOT implemented\&.
321.sp .5v
322.RE
323.SS "RAP PASSWORD \fIUSER\fR \fIOLDPASS\fR \fINEWPASS\fR"
324.PP
325Change password of
326\fIUSER\fR
327from
328\fIOLDPASS\fR
329to
330\fINEWPASS\fR\&.
331.SS "LOOKUP"
332.SS "LOOKUP HOST HOSTNAME [TYPE]"
333.PP
334Lookup the IP address of the given host with the specified type (netbios suffix)\&. The type defaults to 0x20 (workstation)\&.
335.SS "LOOKUP LDAP [DOMAIN]"
336.PP
337Give IP address of LDAP server of specified
338\fIDOMAIN\fR\&. Defaults to local domain\&.
339.SS "LOOKUP KDC [REALM]"
340.PP
341Give IP address of KDC for the specified
342\fIREALM\fR\&. Defaults to local realm\&.
343.SS "LOOKUP DC [DOMAIN]"
344.PP
345Give IP\'s of Domain Controllers for specified
346\fI DOMAIN\fR\&. Defaults to local domain\&.
347.SS "LOOKUP MASTER DOMAIN"
348.PP
349Give IP of master browser for specified
350\fIDOMAIN\fR
351or workgroup\&. Defaults to local domain\&.
352.SS "CACHE"
353.PP
354Samba uses a general caching interface called \'gencache\'\&. It can be controlled using \'NET CACHE\'\&.
355.PP
356All the timeout parameters support the suffixes:
357.RS 4
358s \- Seconds
359.RE
360.RS 4
361m \- Minutes
362.RE
363.RS 4
364h \- Hours
365.RE
366.RS 4
367d \- Days
368.RE
369.RS 4
370w \- Weeks
371.RE
372.SS "CACHE ADD key data time-out"
373.PP
374Add specified key+data to the cache with the given timeout\&.
375.SS "CACHE DEL key"
376.PP
377Delete key from the cache\&.
378.SS "CACHE SET key data time-out"
379.PP
380Update data of existing cache entry\&.
381.SS "CACHE SEARCH PATTERN"
382.PP
383Search for the specified pattern in the cache data\&.
384.SS "CACHE LIST"
385.PP
386List all current items in the cache\&.
387.SS "CACHE FLUSH"
388.PP
389Remove all the current items from the cache\&.
390.SS "GETLOCALSID [DOMAIN]"
391.PP
392Prints the SID of the specified domain, or if the parameter is omitted, the SID of the local server\&.
393.SS "SETLOCALSID S\-1\-5\-21\-x\-y\-z"
394.PP
395Sets SID for the local server to the specified SID\&.
396.SS "GETDOMAINSID"
397.PP
398Prints the local machine SID and the SID of the current domain\&.
399.SS "SETDOMAINSID"
400.PP
401Sets the SID of the current domain\&.
402.SS "GROUPMAP"
403.PP
404Manage the mappings between Windows group SIDs and UNIX groups\&. Common options include:
405.sp
406.RS 4
407.ie n \{\
408\h'-04'\(bu\h'+03'\c
409.\}
410.el \{\
411.sp -1
412.IP \(bu 2.3
413.\}
414unixgroup \- Name of the UNIX group
415.RE
416.sp
417.RS 4
418.ie n \{\
419\h'-04'\(bu\h'+03'\c
420.\}
421.el \{\
422.sp -1
423.IP \(bu 2.3
424.\}
425ntgroup \- Name of the Windows NT group (must be resolvable to a SID
426.RE
427.sp
428.RS 4
429.ie n \{\
430\h'-04'\(bu\h'+03'\c
431.\}
432.el \{\
433.sp -1
434.IP \(bu 2.3
435.\}
436rid \- Unsigned 32\-bit integer
437.RE
438.sp
439.RS 4
440.ie n \{\
441\h'-04'\(bu\h'+03'\c
442.\}
443.el \{\
444.sp -1
445.IP \(bu 2.3
446.\}
447sid \- Full SID in the form of "S\-1\-\&.\&.\&."
448.RE
449.sp
450.RS 4
451.ie n \{\
452\h'-04'\(bu\h'+03'\c
453.\}
454.el \{\
455.sp -1
456.IP \(bu 2.3
457.\}
458type \- Type of the group; either \'domain\', \'local\', or \'builtin\'
459.RE
460.sp
461.RS 4
462.ie n \{\
463\h'-04'\(bu\h'+03'\c
464.\}
465.el \{\
466.sp -1
467.IP \(bu 2.3
468.\}
469comment \- Freeform text description of the group
470.sp
471.RE
472.SS "GROUPMAP ADD"
473.PP
474Add a new group mapping entry:
475.sp
476.if n \{\
477.RS 4
478.\}
479.nf
480net groupmap add {rid=int|sid=string} unixgroup=string \e
481 [type={domain|local}] [ntgroup=string] [comment=string]
482.fi
483.if n \{\
484.RE
485.\}
486.sp
487
488.SS "GROUPMAP DELETE"
489.PP
490Delete a group mapping entry\&. If more than one group name matches, the first entry found is deleted\&.
491.PP
492net groupmap delete {ntgroup=string|sid=SID}
493.SS "GROUPMAP MODIFY"
494.PP
495Update en existing group entry\&.
496.PP
497
498.sp
499.if n \{\
500.RS 4
501.\}
502.nf
503net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \e
504 [comment=string] [type={domain|local}]
505.fi
506.if n \{\
507.RE
508.\}
509.sp
510
511.SS "GROUPMAP LIST"
512.PP
513List existing group mapping entries\&.
514.PP
515net groupmap list [verbose] [ntgroup=string] [sid=SID]
516.SS "MAXRID"
517.PP
518Prints out the highest RID currently in use on the local server (by the active \'passdb backend\')\&.
519.SS "RPC INFO"
520.PP
521Print information about the domain of the remote server, such as domain name, domain sid and number of users and groups\&.
522.SS "[RPC|ADS] TESTJOIN"
523.PP
524Check whether participation in a domain is still valid\&.
525.SS "[RPC|ADS] CHANGETRUSTPW"
526.PP
527Force change of domain trust password\&.
528.SS "RPC TRUSTDOM"
529.SS "RPC TRUSTDOM ADD DOMAIN"
530.PP
531Add a interdomain trust account for
532\fIDOMAIN\fR\&. This is in fact a Samba account named
533\fIDOMAIN$\fR
534with the account flag
535\fB\'I\'\fR
536(interdomain trust account)\&. If the command is used against localhost it has the same effect as
537smbpasswd \-a \-i DOMAIN\&. Please note that both commands expect a appropriate UNIX account\&.
538.SS "RPC TRUSTDOM DEL DOMAIN"
539.PP
540Remove interdomain trust account for
541\fIDOMAIN\fR\&. If it is used against localhost it has the same effect as
542smbpasswd \-x DOMAIN$\&.
543.SS "RPC TRUSTDOM ESTABLISH DOMAIN"
544.PP
545Establish a trust relationship to a trusting domain\&. Interdomain account must already be created on the remote PDC\&.
546.SS "RPC TRUSTDOM REVOKE DOMAIN"
547.PP
548Abandon relationship to trusted domain
549.SS "RPC TRUSTDOM LIST"
550.PP
551List all current interdomain trust relationships\&.
552.SS "RPC RIGHTS"
553.PP
554This subcommand is used to view and manage Samba\'s rights assignments (also referred to as privileges)\&. There are three options currently available:
555\fIlist\fR,
556\fIgrant\fR, and
557\fIrevoke\fR\&. More details on Samba\'s privilege model and its use can be found in the Samba\-HOWTO\-Collection\&.
558.SS "RPC ABORTSHUTDOWN"
559.PP
560Abort the shutdown of a remote server\&.
561.SS "RPC SHUTDOWN [\-t timeout] [\-r] [\-f] [\-C message]"
562.PP
563Shut down the remote server\&.
564.PP
565\-r
566.RS 4
567Reboot after shutdown\&.
568.RE
569.PP
570\-f
571.RS 4
572Force shutting down all applications\&.
573.RE
574.PP
575\-t timeout
576.RS 4
577Timeout before system will be shut down\&. An interactive user of the system can use this time to cancel the shutdown\&.
578.RE
579\'>
580.PP
581\-C message
582.RS 4
583Display the specified message on the screen to announce the shutdown\&.
584.RE
585.SS "RPC SAMDUMP"
586.PP
587Print out sam database of remote server\&. You need to run this against the PDC, from a Samba machine joined as a BDC\&.
588.SS "RPC VAMPIRE"
589.PP
590Export 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\&.
591.SS "RPC VAMPIRE KEYTAB"
592.PP
593Dump remote SAM database to local Kerberos keytab file\&.
594.SS "RPC VAMPIRE LDIF"
595.PP
596Dump remote SAM database to local LDIF file or standard output\&.
597.SS "RPC GETSID"
598.PP
599Fetch domain SID and store it in the local
600secrets\&.tdb\&.
601.SS "ADS LEAVE"
602.PP
603Make the remote host leave the domain it is part of\&.
604.SS "ADS STATUS"
605.PP
606Print out status of machine account of the local machine in ADS\&. Prints out quite some debug info\&. Aimed at developers, regular users should use
607NET ADS TESTJOIN\&.
608.SS "ADS PRINTER"
609.SS "ADS PRINTER INFO [PRINTER] [SERVER]"
610.PP
611Lookup info for
612\fIPRINTER\fR
613on
614\fISERVER\fR\&. The printer name defaults to "*", the server name defaults to the local host\&.
615.SS "ADS PRINTER PUBLISH PRINTER"
616.PP
617Publish specified printer using ADS\&.
618.SS "ADS PRINTER REMOVE PRINTER"
619.PP
620Remove specified printer from ADS directory\&.
621.SS "ADS SEARCH \fIEXPRESSION\fR \fIATTRIBUTES\&.\&.\&.\fR"
622.PP
623Perform 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\&.
624.PP
625Example:
626\fBnet ads search \'(objectCategory=group)\' sAMAccountName\fR
627.SS "ADS DN \fIDN\fR \fI(attributes)\fR"
628.PP
629Perform 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\&.
630.PP
631Example:
632\fBnet ads dn \'CN=administrator,CN=Users,DC=my,DC=domain\' SAMAccountName\fR
633.SS "ADS WORKGROUP"
634.PP
635Print out workgroup name for specified kerberos realm\&.
636.SS "SAM CREATEBUILTINGROUP <NAME>"
637.PP
638(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\&.
639.SS "SAM CREATELOCALGROUP <NAME>"
640.PP
641Create 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\&.
642.SS "SAM DELETELOCALGROUP <NAME>"
643.PP
644Delete an existing LOCAL group (also known as Alias)\&.
645.SS "SAM MAPUNIXGROUP <NAME>"
646.PP
647Map an existing Unix group and make it a Domain Group, the domain group will have the same name\&.
648.SS "SAM UNMAPUNIXGROUP <NAME>"
649.PP
650Remove an existing group mapping entry\&.
651.SS "SAM ADDMEM <GROUP> <MEMBER>"
652.PP
653Add a member to a Local group\&. The group can be specified only by name, the member can be specified by name or SID\&.
654.SS "SAM DELMEM <GROUP> <MEMBER>"
655.PP
656Remove a member from a Local group\&. The group and the member must be specified by name\&.
657.SS "SAM LISTMEM <GROUP>"
658.PP
659List Local group members\&. The group must be specified by name\&.
660.SS "SAM LIST <users|groups|localgroups|builtin|workstations> [verbose]"
661.PP
662List the specified set of accounts by name\&. If verbose is specified, the rid and description is also provided for each account\&.
663.SS "SAM RIGHTS LIST"
664.PP
665List all available privileges\&.
666.SS "SAM RIGHTS GRANT <NAME> <PRIVILEGE>"
667.PP
668Grant a certain privilege to a user\&.
669.SS "SAM RIGHTS REVOKE <NAME> <PRIVILEGE>"
670.PP
671Revoke a certain privilege from a user\&.
672.SS "SAM SHOW <NAME>"
673.PP
674Show the full DOMAIN\e\eNAME the SID and the type for the corresponding account\&.
675.SS "SAM SET HOMEDIR <NAME> <DIRECTORY>"
676.PP
677Set the home directory for a user account\&.
678.SS "SAM SET PROFILEPATH <NAME> <PATH>"
679.PP
680Set the profile path for a user account\&.
681.SS "SAM SET COMMENT <NAME> <COMMENT>"
682.PP
683Set the comment for a user or group account\&.
684.SS "SAM SET FULLNAME <NAME> <FULL NAME>"
685.PP
686Set the full name for a user account\&.
687.SS "SAM SET LOGONSCRIPT <NAME> <SCRIPT>"
688.PP
689Set the logon script for a user account\&.
690.SS "SAM SET HOMEDRIVE <NAME> <DRIVE>"
691.PP
692Set the home drive for a user account\&.
693.SS "SAM SET WORKSTATIONS <NAME> <WORKSTATIONS>"
694.PP
695Set the workstations a user account is allowed to log in from\&.
696.SS "SAM SET DISABLE <NAME>"
697.PP
698Set the "disabled" flag for a user account\&.
699.SS "SAM SET PWNOTREQ <NAME>"
700.PP
701Set the "password not required" flag for a user account\&.
702.SS "SAM SET AUTOLOCK <NAME>"
703.PP
704Set the "autolock" flag for a user account\&.
705.SS "SAM SET PWNOEXP <NAME>"
706.PP
707Set the "password do not expire" flag for a user account\&.
708.SS "SAM SET PWDMUSTCHANGENOW <NAME> [yes|no]"
709.PP
710Set or unset the "password must change" flag for a user account\&.
711.SS "SAM POLICY LIST"
712.PP
713List the available account policies\&.
714.SS "SAM POLICY SHOW <account policy>"
715.PP
716Show the account policy value\&.
717.SS "SAM POLICY SET <account policy> <value>"
718.PP
719Set a value for the account policy\&. Valid values can be: "forever", "never", "off", or a number\&.
720.SS "SAM PROVISION"
721.PP
722Only 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\&.
723.SS "IDMAP DUMP <local tdb file name>"
724.PP
725Dumps the mappings contained in the local tdb file specified\&. This command is useful to dump only the mappings produced by the idmap_tdb backend\&.
726.SS "IDMAP RESTORE [input file]"
727.PP
728Restore the mappings from the specified file or stdin\&.
729.SS "IDMAP SECRET <DOMAIN>|ALLOC <secret>"
730.PP
731Store 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\&.
732.SS "USERSHARE"
733.PP
734Starting 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\&.
735.PP
736To 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\&.
737.PP
738The usershare commands are:
739.RS 4
740net usershare add sharename path [comment] [acl] [guest_ok=[y|n]] \- to add or change a user defined share\&.
741.RE
742.RS 4
743net usershare delete sharename \- to delete a user defined share\&.
744.RE
745.RS 4
746net usershare info [\-l|\-\-long] [wildcard sharename] \- to print info about a user defined share\&.
747.RE
748.RS 4
749net usershare list [\-l|\-\-long] [wildcard sharename] \- to list user defined shares\&.
750.RE
751.SS "USERSHARE ADD sharename path [comment] [acl] [guest_ok=[y|n]]"
752.PP
753Add or replace a new user defined share, with name "sharename"\&.
754.PP
755"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"\&.
756.PP
757The optional "comment" parameter is the comment that will appear on the share when browsed to by a client\&.
758.PP
759The 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)\&.
760.PP
761The default if no "acl" is given is "Everyone:R", which means any authenticated user has read\-only access\&.
762.PP
763The 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\&.
764
765
766There is no separate command to modify an existing user defined share,
767just use the "net usershare add [sharename]" command using the same
768sharename as the one you wish to modify and specify the new options
769you wish\&. The Samba smbd daemon notices user defined share modifications
770at connect time so will see the change immediately, there is no need
771to restart smbd on adding, deleting or changing a user defined share\&.
772.SS "USERSHARE DELETE sharename"
773.PP
774Deletes 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\&.
775.SS "USERSHARE INFO [-l|--long] [wildcard sharename]"
776.PP
777Get info on user defined shares owned by the current user matching the given pattern, or all users\&.
778.PP
779net 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 (\'*\' matches one or more characters, \'?\' matches only one character)\&. If the \'\-l\' or \'\-\-long\' option is also given, it prints out info on user defined shares created by other users\&.
780.PP
781The 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\&.
782.SS "USERSHARE LIST [-l|--long] wildcard sharename"
783.PP
784List all the user defined shares owned by the current user matching the given pattern, or all users\&.
785.PP
786net 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 (\'*\' matches one or more characters, \'?\' matches only one character)\&. If the \'\-l\' or \'\-\-long\' option is also given, it includes the names of user defined shares created by other users\&.
787.SS "CONF"
788.PP
789Starting 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\&.
790.PP
791The deployment of this configuration data can be activated in two levels from the
792\fIsmb\&.conf\fR
793file: Share definitions from registry are activated by setting
794\fIregistry shares\fR
795to
796\(lqyes\(rq
797in the [global] section and global configuration options are activated by setting
798\m[blue]\fBinclude = registry\fR\m[]
799in the [global] section for a mixed configuration or by setting
800\m[blue]\fBconfig backend = registry\fR\m[]
801in the [global] section for a registry\-only configuration\&. See the
802\fBsmb.conf\fR(5)
803manpage for details\&.
804.PP
805The conf commands are:
806.RS 4
807net conf list \- Dump the complete configuration in smb\&.conf like
808format\&.
809.RE
810.RS 4
811net conf import \- Import configuration from file in smb\&.conf
812format\&.
813.RE
814.RS 4
815net conf listshares \- List the registry shares\&.
816.RE
817.RS 4
818net conf drop \- Delete the complete configuration from
819registry\&.
820.RE
821.RS 4
822net conf showshare \- Show the definition of a registry share\&.
823.RE
824.RS 4
825net conf addshare \- Create a new registry share\&.
826.RE
827.RS 4
828net conf delshare \- Delete a registry share\&.
829.RE
830.RS 4
831net conf setparm \- Store a parameter\&.
832.RE
833.RS 4
834net conf getparm \- Retrieve the value of a parameter\&.
835.RE
836.RS 4
837net conf delparm \- Delete a parameter\&.
838.RE
839.RS 4
840net conf getincludes \- Show the includes of a share definition\&.
841.RE
842.RS 4
843net conf setincludes \- Set includes for a share\&.
844.RE
845.RS 4
846net conf delincludes \- Delete includes from a share definition\&.
847.RE
848.SS "CONF LIST"
849.PP
850Print the configuration data stored in the registry in a smb\&.conf\-like format to standard output\&.
851.SS "CONF IMPORT [--test|-T] filename [section]"
852.PP
853This 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\&.
854.SS "CONF LISTSHARES"
855.PP
856List the names of the shares defined in registry\&.
857.SS "CONF DROP"
858.PP
859Delete the complete configuration data from registry\&.
860.SS "CONF SHOWSHARE sharename"
861.PP
862Show the definition of the share or section specified\&. It is valid to specify "global" as sharename to retrieve the global configuration options from registry\&.
863.SS "CONF ADDSHARE sharename path [writeable={y|N} [guest_ok={y|N} [comment]]] "
864.PP
865Create a new share definition in registry\&. The sharename and path have to be given\&. The share name may
866\fInot\fR
867be "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\&.
868.SS "CONF DELSHARE sharename"
869.PP
870Delete a share definition from registry\&.
871.SS "CONF SETPARM section parameter value"
872.PP
873Store a parameter in registry\&. The section may be global or a sharename\&. The section is created if it does not exist yet\&.
874.SS "CONF GETPARM section parameter"
875.PP
876Show a parameter stored in registry\&.
877.SS "CONF DELPARM section parameter"
878.PP
879Delete a parameter stored in registry\&.
880.SS "CONF GETINCLUDES section"
881.PP
882Get the list of includes for the provided section (global or share)\&.
883.PP
884Note 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\&.
885.PP
886Further 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\&.
887.SS "CONF SETINCLUDES section [filename]+"
888.PP
889Set 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\&.
890.SS "CONF DELINCLUDES section"
891.PP
892Delete the list of includes from the provided section (global or share)\&.
893.SS "DOM"
894.PP
895Starting 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\&.
896.PP
897In 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\&.
898.PP
899The client side support for remote join is implemented in the net dom commands which are:
900.RS 4
901net dom join \- Join a remote computer into a domain\&.
902.RE
903.RS 4
904net dom unjoin \- Unjoin a remote computer from a domain\&.
905.RE
906.SS "DOM JOIN domain=DOMAIN ou=OU account=ACCOUNT password=PASSWORD reboot"
907.PP
908Joins a computer into a domain\&. This command supports the following additional parameters:
909.sp
910.RS 4
911.ie n \{\
912\h'-04'\(bu\h'+03'\c
913.\}
914.el \{\
915.sp -1
916.IP \(bu 2.3
917.\}
918\fIDOMAIN\fR
919can 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
920\fIDOMAIN\fR
921parameter cannot be NULL\&.
922.RE
923.sp
924.RS 4
925.ie n \{\
926\h'-04'\(bu\h'+03'\c
927.\}
928.el \{\
929.sp -1
930.IP \(bu 2.3
931.\}
932\fIOU\fR
933can be set to a RFC 1779 LDAP DN, like
934\fIou=mymachines,cn=Users,dc=example,dc=com\fR
935in order to create the machine account in a non\-default LDAP containter\&. This optional parameter is only supported when joining Active Directory Domains\&.
936.RE
937.sp
938.RS 4
939.ie n \{\
940\h'-04'\(bu\h'+03'\c
941.\}
942.el \{\
943.sp -1
944.IP \(bu 2.3
945.\}
946\fIACCOUNT\fR
947defines 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\&.
948.RE
949.sp
950.RS 4
951.ie n \{\
952\h'-04'\(bu\h'+03'\c
953.\}
954.el \{\
955.sp -1
956.IP \(bu 2.3
957.\}
958\fIPASSWORD\fR
959defines the password for the domain account defined with
960\fIACCOUNT\fR\&.
961.RE
962.sp
963.RS 4
964.ie n \{\
965\h'-04'\(bu\h'+03'\c
966.\}
967.el \{\
968.sp -1
969.IP \(bu 2.3
970.\}
971\fIREBOOT\fR
972is an optional parameter that can be set to reboot the remote machine after successful join to the domain\&.
973.sp
974.RE
975.PP
976Note 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\&.
977.PP
978Example: net dom join \-S xp \-U XP\e\eadministrator%secret domain=MYDOM account=MYDOM\e\eadministrator password=topsecret reboot\&.
979.PP
980This 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\&.
981.SS "DOM UNJOIN account=ACCOUNT password=PASSWORD reboot"
982.PP
983Unjoins a computer from a domain\&. This command supports the following additional parameters:
984.sp
985.RS 4
986.ie n \{\
987\h'-04'\(bu\h'+03'\c
988.\}
989.el \{\
990.sp -1
991.IP \(bu 2.3
992.\}
993\fIACCOUNT\fR
994defines 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\&.
995.RE
996.sp
997.RS 4
998.ie n \{\
999\h'-04'\(bu\h'+03'\c
1000.\}
1001.el \{\
1002.sp -1
1003.IP \(bu 2.3
1004.\}
1005\fIPASSWORD\fR
1006defines the password for the domain account defined with
1007\fIACCOUNT\fR\&.
1008.RE
1009.sp
1010.RS 4
1011.ie n \{\
1012\h'-04'\(bu\h'+03'\c
1013.\}
1014.el \{\
1015.sp -1
1016.IP \(bu 2.3
1017.\}
1018\fIREBOOT\fR
1019is an optional parameter that can be set to reboot the remote machine after successful unjoin from the domain\&.
1020.sp
1021.RE
1022.PP
1023Note 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\&.
1024.PP
1025Example: net dom unjoin \-S xp \-U XP\e\eadministrator%secret account=MYDOM\e\eadministrator password=topsecret reboot\&.
1026.PP
1027This 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\&.
1028.SS "HELP [COMMAND]"
1029.PP
1030Gives usage information for the specified command\&.
1031.SH "VERSION"
1032.PP
1033This man page is complete for version 3 of the Samba suite\&.
1034.SH "AUTHOR"
1035.PP
1036The 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\&.
1037.PP
1038The net manpage was written by Jelmer Vernooij\&.
Note: See TracBrowser for help on using the repository browser.