source: branches/samba-3.0/docs/manpages/net.8@ 158

Last change on this file since 158 was 158, checked in by Paul Smedley, 17 years ago

Update source to 3.0.32

File size: 25.4 KB
Line 
1.\" Title: net
2.\" Author:
3.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
4.\" Date: 08/25/2008
5.\" Manual: System Administration tools
6.\" Source: Samba 3.0
7.\"
8.TH "NET" "8" "08/25/2008" "Samba 3\.0" "System Administration tools"
9.\" disable hyphenation
10.nh
11.\" disable justification (adjust text to left margin only)
12.ad l
13.SH "NAME"
14net - Tool for administration of Samba and remote CIFS servers.
15.SH "SYNOPSIS"
16.HP 1
17net {<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]
18.SH "DESCRIPTION"
19.PP
20This tool is part of the
21\fBsamba\fR(7)
22suite\.
23.PP
24The 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\.
25.SH "OPTIONS"
26.PP
27\-h|\-\-help
28.RS 4
29Print a summary of command line options\.
30.RE
31.PP
32\-w target\-workgroup
33.RS 4
34Sets target workgroup or domain\. You have to specify either this option or the IP address or the name of a server\.
35.RE
36.PP
37\-W workgroup
38.RS 4
39Sets client workgroup or domain
40.RE
41.PP
42\-U user
43.RS 4
44User name to use
45.RE
46.PP
47\-I ip\-address
48.RS 4
49IP address of target server to use\. You have to specify either this option or a target workgroup or a target server\.
50.RE
51.PP
52\-p port
53.RS 4
54Port on the target server to connect to (usually 139 or 445)\. Defaults to trying 445 first, then 139\.
55.RE
56.PP
57\-n <primary NetBIOS name>
58.RS 4
59This option allows you to override the NetBIOS name that Samba uses for itself\. This is identical to setting the
60\fInetbios name\fR
61parameter in the
62\fIsmb\.conf\fR
63file\. However, a command line setting will take precedence over settings in
64\fIsmb\.conf\fR\.
65.RE
66.PP
67\-s <configuration file>
68.RS 4
69The 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
70\fIsmb\.conf\fR
71for more information\. The default configuration file name is determined at compile time\.
72.RE
73.PP
74\-S server
75.RS 4
76Name of target server\. You should specify either this option or a target workgroup or a target IP address\.
77.RE
78.PP
79\-l
80.RS 4
81When listing data, give more information on each item\.
82.RE
83.PP
84\-P
85.RS 4
86Make queries to the external server using the machine account of the local server\.
87.RE
88.PP
89\-d|\-\-debuglevel=level
90.RS 4
91\fIlevel\fR
92is an integer from 0 to 10\. The default value if this parameter is not specified is 0\.
93.sp
94The 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\.
95.sp
96Levels 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\.
97.sp
98Note that specifying this parameter here will override the
99\fIlog level\fR
100parameter in the
101\fIsmb\.conf\fR
102file\.
103.RE
104.SH "COMMANDS"
105.SS "CHANGESECRETPW"
106.PP
107This 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\.
108.SS "TIME"
109.PP
110The
111NET TIME
112command 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\.
113.SS "TIME"
114.PP
115Without any options, the
116NET TIME
117command displays the time on the remote server\.
118.SS "TIME SYSTEM"
119.PP
120Displays the time on the remote server in a format ready for
121/bin/date\.
122.SS "TIME SET"
123.PP
124Tries to set the date and time of the local server to that on the remote server using
125/bin/date\.
126.SS "TIME ZONE"
127.PP
128Displays the timezone in hours from GMT on the remote computer\.
129.SS "[RPC|ADS] JOIN [TYPE] [\-U username[%password]] [createupn=UPN] [createcomputer=OU] [options]"
130.PP
131Join 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\.
132.PP
133[TYPE] may be PDC, BDC or MEMBER to specify the type of server joining the domain\.
134.PP
135[UPN] (ADS only) set the principalname attribute during the join\. The default format is host/netbiosname@REALM\.
136.PP
137[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\.
138.SS "[RPC] OLDJOIN [options]"
139.PP
140Join 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\.
141.SS "[RPC|ADS] USER"
142.SS "[RPC|ADS] USER"
143.PP
144List all users
145.SS "[RPC|ADS] USER DELETE target"
146.PP
147Delete specified user
148.SS "[RPC|ADS] USER INFO target"
149.PP
150List the domain groups of the specified user\.
151.SS "[RPC|ADS] USER RENAME oldname newname"
152.PP
153Rename specified user\.
154.SS "[RPC|ADS] USER ADD name [password] [-F user flags] [-C comment]"
155.PP
156Add specified user\.
157.SS "[RPC|ADS] GROUP"
158.SS "[RPC|ADS] GROUP [misc options] [targets]"
159.PP
160List user groups\.
161.SS "[RPC|ADS] GROUP DELETE name [misc. options]"
162.PP
163Delete specified group\.
164.SS "[RPC|ADS] GROUP ADD name [-C comment]"
165.PP
166Create specified group\.
167.SS "[RAP|RPC] SHARE"
168.SS "[RAP|RPC] SHARE [misc. options] [targets]"
169.PP
170Enumerates all exported resources (network shares) on target server\.
171.SS "[RAP|RPC] SHARE ADD name=serverpath [-C comment] [-M maxusers] [targets]"
172.PP
173Adds a share from a server (makes the export active)\. Maxusers specifies the number of users that can be connected to the share simultaneously\.
174.SS "SHARE DELETE sharename"
175.PP
176Delete specified share\.
177.SS "[RPC|RAP] FILE"
178.SS "[RPC|RAP] FILE"
179.PP
180List all open files on remote server\.
181.SS "[RPC|RAP] FILE CLOSE fileid"
182.PP
183Close file with specified
184\fIfileid\fR
185on remote server\.
186.SS "[RPC|RAP] FILE INFO fileid"
187.PP
188Print information on specified
189\fIfileid\fR\. Currently listed are: file\-id, username, locks, path, permissions\.
190.SS "[RAP|RPC] FILE USER user"
191.PP
192List files opened by specified
193\fIuser\fR\. Please note that
194net rap file user
195does not work against Samba servers\.
196.SS "SESSION"
197.SS "RAP SESSION"
198.PP
199Without any other options, SESSION enumerates all active SMB/CIFS sessions on the target server\.
200.SS "RAP SESSION DELETE|CLOSE CLIENT_NAME"
201.PP
202Close the specified sessions\.
203.SS "RAP SESSION INFO CLIENT_NAME"
204.PP
205Give a list with all the open files in specified session\.
206.SS "RAP SERVER \fIDOMAIN\fR"
207.PP
208List all servers in specified domain or workgroup\. Defaults to local domain\.
209.SS "RAP DOMAIN"
210.PP
211Lists all domains and workgroups visible on the current network\.
212.SS "RAP PRINTQ"
213.SS "RAP PRINTQ LIST QUEUE_NAME"
214.PP
215Lists the specified print queue and print jobs on the server\. If the
216\fIQUEUE_NAME\fR
217is omitted, all queues are listed\.
218.SS "RAP PRINTQ DELETE JOBID"
219.PP
220Delete job with specified id\.
221.SS "RAP VALIDATE \fIuser\fR [\fIpassword\fR]"
222.PP
223Validate whether the specified user can log in to the remote server\. If the password is not specified on the commandline, it will be prompted\.
224.sp
225.it 1 an-trap
226.nr an-no-space-flag 1
227.nr an-break-flag 1
228.br
229Note
230.PP
231Currently NOT implemented\.
232.SS "RAP GROUPMEMBER"
233.SS "RAP GROUPMEMBER LIST GROUP"
234.PP
235List all members of the specified group\.
236.SS "RAP GROUPMEMBER DELETE GROUP USER"
237.PP
238Delete member from group\.
239.SS "RAP GROUPMEMBER ADD GROUP USER"
240.PP
241Add member to group\.
242.SS "RAP ADMIN \fIcommand\fR"
243.PP
244Execute the specified
245\fIcommand\fR
246on the remote server\. Only works with OS/2 servers\.
247.sp
248.it 1 an-trap
249.nr an-no-space-flag 1
250.nr an-break-flag 1
251.br
252Note
253.PP
254Currently NOT implemented\.
255.SS "RAP SERVICE"
256.SS "RAP SERVICE START NAME [arguments...]"
257.PP
258Start the specified service on the remote server\. Not implemented yet\.
259.sp
260.it 1 an-trap
261.nr an-no-space-flag 1
262.nr an-break-flag 1
263.br
264Note
265.PP
266Currently NOT implemented\.
267
268.SS "RAP SERVICE STOP"
269.PP
270Stop the specified service on the remote server\.
271.sp
272.it 1 an-trap
273.nr an-no-space-flag 1
274.nr an-break-flag 1
275.br
276Note
277.PP
278Currently NOT implemented\.
279.SS "RAP PASSWORD \fIUSER\fR \fIOLDPASS\fR \fINEWPASS\fR"
280.PP
281Change password of
282\fIUSER\fR
283from
284\fIOLDPASS\fR
285to
286\fINEWPASS\fR\.
287.SS "LOOKUP"
288.SS "LOOKUP HOST HOSTNAME [TYPE]"
289.PP
290Lookup the IP address of the given host with the specified type (netbios suffix)\. The type defaults to 0x20 (workstation)\.
291.SS "LOOKUP LDAP [DOMAIN]"
292.PP
293Give IP address of LDAP server of specified
294\fIDOMAIN\fR\. Defaults to local domain\.
295.SS "LOOKUP KDC [REALM]"
296.PP
297Give IP address of KDC for the specified
298\fIREALM\fR\. Defaults to local realm\.
299.SS "LOOKUP DC [DOMAIN]"
300.PP
301Give IP\'s of Domain Controllers for specified
302\fI DOMAIN\fR\. Defaults to local domain\.
303.SS "LOOKUP MASTER DOMAIN"
304.PP
305Give IP of master browser for specified
306\fIDOMAIN\fR
307or workgroup\. Defaults to local domain\.
308.SS "CACHE"
309.PP
310Samba uses a general caching interface called \'gencache\'\. It can be controlled using \'NET CACHE\'\.
311.PP
312All the timeout parameters support the suffixes:
313.IP "" 4
314s \- Seconds
315.IP "" 4
316m \- Minutes
317.IP "" 4
318h \- Hours
319.IP "" 4
320d \- Days
321.IP "" 4
322w \- Weeks
323
324.SS "CACHE ADD key data time-out"
325.PP
326Add specified key+data to the cache with the given timeout\.
327.SS "CACHE DEL key"
328.PP
329Delete key from the cache\.
330.SS "CACHE SET key data time-out"
331.PP
332Update data of existing cache entry\.
333.SS "CACHE SEARCH PATTERN"
334.PP
335Search for the specified pattern in the cache data\.
336.SS "CACHE LIST"
337.PP
338List all current items in the cache\.
339.SS "CACHE FLUSH"
340.PP
341Remove all the current items from the cache\.
342.SS "GETLOCALSID [DOMAIN]"
343.PP
344Prints the SID of the specified domain, or if the parameter is omitted, the SID of the local server\.
345.SS "SETLOCALSID S\-1\-5\-21\-x\-y\-z"
346.PP
347Sets SID for the local server to the specified SID\.
348.SS "GETDOMAINSID"
349.PP
350Prints the local machine SID and the SID of the current domain\.
351.SS "SETDOMAINSID"
352.PP
353Sets the SID of the current domain\.
354.SS "GROUPMAP"
355.PP
356Manage the mappings between Windows group SIDs and UNIX groups\. Common options include:
357.sp
358.RS 4
359.ie n \{\
360\h'-04'\(bu\h'+03'\c
361.\}
362.el \{\
363.sp -1
364.IP \(bu 2.3
365.\}
366unixgroup \- Name of the UNIX group
367.RE
368.sp
369.RS 4
370.ie n \{\
371\h'-04'\(bu\h'+03'\c
372.\}
373.el \{\
374.sp -1
375.IP \(bu 2.3
376.\}
377ntgroup \- Name of the Windows NT group (must be resolvable to a SID
378.RE
379.sp
380.RS 4
381.ie n \{\
382\h'-04'\(bu\h'+03'\c
383.\}
384.el \{\
385.sp -1
386.IP \(bu 2.3
387.\}
388rid \- Unsigned 32\-bit integer
389.RE
390.sp
391.RS 4
392.ie n \{\
393\h'-04'\(bu\h'+03'\c
394.\}
395.el \{\
396.sp -1
397.IP \(bu 2.3
398.\}
399sid \- Full SID in the form of "S\-1\-\.\.\."
400.RE
401.sp
402.RS 4
403.ie n \{\
404\h'-04'\(bu\h'+03'\c
405.\}
406.el \{\
407.sp -1
408.IP \(bu 2.3
409.\}
410type \- Type of the group; either \'domain\', \'local\', or \'builtin\'
411.RE
412.sp
413.RS 4
414.ie n \{\
415\h'-04'\(bu\h'+03'\c
416.\}
417.el \{\
418.sp -1
419.IP \(bu 2.3
420.\}
421comment \- Freeform text description of the group
422.sp
423.RE
424.SS "GROUPMAP ADD"
425.PP
426Add a new group mapping entry:
427.sp
428.RS 4
429.nf
430net groupmap add {rid=int|sid=string} unixgroup=string \e
431 [type={domain|local}] [ntgroup=string] [comment=string]
432.fi
433.RE
434.sp
435
436.SS "GROUPMAP DELETE"
437.PP
438Delete a group mapping entry\. If more than one group name matches, the first entry found is deleted\.
439.PP
440net groupmap delete {ntgroup=string|sid=SID}
441.SS "GROUPMAP MODIFY"
442.PP
443Update en existing group entry\.
444.PP
445
446.sp
447.RS 4
448.nf
449net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \e
450 [comment=string] [type={domain|local}]
451.fi
452.RE
453.sp
454
455.SS "GROUPMAP LIST"
456.PP
457List existing group mapping entries\.
458.PP
459net groupmap list [verbose] [ntgroup=string] [sid=SID]
460.SS "MAXRID"
461.PP
462Prints out the highest RID currently in use on the local server (by the active \'passdb backend\')\.
463.SS "RPC INFO"
464.PP
465Print information about the domain of the remote server, such as domain name, domain sid and number of users and groups\.
466.SS "[RPC|ADS] TESTJOIN"
467.PP
468Check whether participation in a domain is still valid\.
469.SS "[RPC|ADS] CHANGETRUSTPW"
470.PP
471Force change of domain trust password\.
472.SS "RPC TRUSTDOM"
473.SS "RPC TRUSTDOM ADD DOMAIN"
474.PP
475Add a interdomain trust account for
476\fIDOMAIN\fR\. This is in fact a Samba account named
477\fIDOMAIN$\fR
478with the account flag
479\fB\'I\'\fR
480(interdomain trust account)\. If the command is used against localhost it has the same effect as
481smbpasswd \-a \-i DOMAIN\. Please note that both commands expect a appropriate UNIX account\.
482.SS "RPC TRUSTDOM DEL DOMAIN"
483.PP
484Remove interdomain trust account for
485\fIDOMAIN\fR\. If it is used against localhost it has the same effect as
486smbpasswd \-x DOMAIN$\.
487.SS "RPC TRUSTDOM ESTABLISH DOMAIN"
488.PP
489Establish a trust relationship to a trusting domain\. Interdomain account must already be created on the remote PDC\.
490.SS "RPC TRUSTDOM REVOKE DOMAIN"
491.PP
492Abandon relationship to trusted domain
493.SS "RPC TRUSTDOM LIST"
494.PP
495List all current interdomain trust relationships\.
496.SS "RPC RIGHTS"
497.PP
498This subcommand is used to view and manage Samba\'s rights assignments (also referred to as privileges)\. There are three options currently available:
499\fIlist\fR,
500\fIgrant\fR, and
501\fIrevoke\fR\. More details on Samba\'s privilege model and its use can be found in the Samba\-HOWTO\-Collection\.
502.SS "RPC ABORTSHUTDOWN"
503.PP
504Abort the shutdown of a remote server\.
505.SS "RPC SHUTDOWN [\-t timeout] [\-r] [\-f] [\-C message]"
506.PP
507Shut down the remote server\.
508.PP
509\-r
510.RS 4
511Reboot after shutdown\.
512.RE
513.PP
514\-f
515.RS 4
516Force shutting down all applications\.
517.RE
518.PP
519\-t timeout
520.RS 4
521Timeout before system will be shut down\. An interactive user of the system can use this time to cancel the shutdown\.
522.RE
523\'>
524.PP
525\-C message
526.RS 4
527Display the specified message on the screen to announce the shutdown\.
528.RE
529.SS "RPC SAMDUMP"
530.PP
531Print out sam database of remote server\. You need to run this against the PDC, from a Samba machine joined as a BDC\.
532.SS "RPC VAMPIRE"
533.PP
534Export 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\.
535.SS "RPC GETSID"
536.PP
537Fetch domain SID and store it in the local
538\fIsecrets\.tdb\fR\.
539.SS "ADS LEAVE"
540.PP
541Make the remote host leave the domain it is part of\.
542.SS "ADS STATUS"
543.PP
544Print out status of machine account of the local machine in ADS\. Prints out quite some debug info\. Aimed at developers, regular users should use
545NET ADS TESTJOIN\.
546.SS "ADS PRINTER"
547.SS "ADS PRINTER INFO [PRINTER] [SERVER]"
548.PP
549Lookup info for
550\fIPRINTER\fR
551on
552\fISERVER\fR\. The printer name defaults to "*", the server name defaults to the local host\.
553.SS "ADS PRINTER PUBLISH PRINTER"
554.PP
555Publish specified printer using ADS\.
556.SS "ADS PRINTER REMOVE PRINTER"
557.PP
558Remove specified printer from ADS directory\.
559.SS "ADS SEARCH \fIEXPRESSION\fR \fIATTRIBUTES\.\.\.\fR"
560.PP
561Perform 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\.
562.PP
563Example:
564\fBnet ads search \'(objectCategory=group)\' sAMAccountName\fR
565.SS "ADS DN \fIDN\fR \fI(attributes)\fR"
566.PP
567Perform 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\.
568.PP
569Example:
570\fBnet ads dn \'CN=administrator,CN=Users,DC=my,DC=domain\' SAMAccountName\fR
571.SS "ADS WORKGROUP"
572.PP
573Print out workgroup name for specified kerberos realm\.
574.SS "SAM CREATEBUILTINGROUP <NAME>"
575.PP
576(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\.
577.SS "SAM CREATELOCALGROUP <NAME>"
578.PP
579Create 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\.
580.SS "SAM DELETELOCALGROUP <NAME>"
581.PP
582Delete an existing LOCAL group (also known as Alias)\.
583.SS "SAM MAPUNIXGROUP <NAME>"
584.PP
585Map an existing Unix group and make it a Domain Group, the domain group will have the same name\.
586.SS "SAM UNMAPUNIXGROUP <NAME>"
587.PP
588Remove an existing group mapping entry\.
589.SS "SAM ADDMEM <GROUP> <MEMBER>"
590.PP
591Add a member to a Local group\. The group can be specified only by name, the member can be specified by name or SID\.
592.SS "SAM DELMEM <GROUP> <MEMBER>"
593.PP
594Remove a member from a Local group\. The group and the member must be specified by name\.
595.SS "SAM LISTMEM <GROUP>"
596.PP
597List Local group members\. The group must be specified by name\.
598.SS "SAM LIST <users|groups|localgroups|builtin|workstations> [verbose]"
599.PP
600List the specified set of accounts by name\. If verbose is specified, the rid and description is also provided for each account\.
601.SS "SAM SHOW <NAME>"
602.PP
603Show the full DOMAIN\e\eNAME the SID and the type for the corresponding account\.
604.SS "SAM SET HOMEDIR <NAME> <DIRECTORY>"
605.PP
606Set the home directory for a user account\.
607.SS "SAM SET PROFILEPATH <NAME> <PATH>"
608.PP
609Set the profile path for a user account\.
610.SS "SAM SET COMMENT <NAME> <COMMENT>"
611.PP
612Set the comment for a user or group account\.
613.SS "SAM SET FULLNAME <NAME> <FULL NAME>"
614.PP
615Set the full name for a user account\.
616.SS "SAM SET LOGONSCRIPT <NAME> <SCRIPT>"
617.PP
618Set the logon script for a user account\.
619.SS "SAM SET HOMEDRIVE <NAME> <DRIVE>"
620.PP
621Set the home drive for a user account\.
622.SS "SAM SET WORKSTATIONS <NAME> <WORKSTATIONS>"
623.PP
624Set the workstations a user account is allowed to log in from\.
625.SS "SAM SET DISABLE <NAME>"
626.PP
627Set the "disabled" flag for a user account\.
628.SS "SAM SET PWNOTREQ <NAME>"
629.PP
630Set the "password not required" flag for a user account\.
631.SS "SAM SET AUTOLOCK <NAME>"
632.PP
633Set the "autolock" flag for a user account\.
634.SS "SAM SET PWNOEXP <NAME>"
635.PP
636Set the "password do not expire" flag for a user account\.
637.SS "SAM SET PWDMUSTCHANGENOW <NAME> [yes|no]"
638.PP
639Set or unset the "password must change" flag for a user account\.
640.SS "SAM POLICY LIST"
641.PP
642List the available account policies\.
643.SS "SAM POLICY SHOW <account policy>"
644.PP
645Show the account policy value\.
646.SS "SAM POLICY SET <account policy> <value>"
647.PP
648Set a value for the account policy\. Valid values can be: "forever", "never", "off", or a number\.
649.SS "SAM PROVISION"
650.PP
651Only 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\.
652.SS "IDMAP DUMP <local tdb file name>"
653.PP
654Dumps the mappings contained in the local tdb file specified\. This command is useful to dump only the mappings produced by the idmap_tdb backend\.
655.SS "IDMAP RESTORE [input file]"
656.PP
657Restore the mappings from the specified file or stdin\.
658.SS "IDMAP SECRET <DOMAIN>|ALLOC <secret>"
659.PP
660Store 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\.
661.SS "USERSHARE"
662.PP
663Starting 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\.
664.PP
665To 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\.
666.PP
667The usershare commands are:
668.IP "" 4
669net usershare add sharename path [comment] [acl] [guest_ok=[y|n]] \- to add or change a user defined share\.
670.IP "" 4
671net usershare delete sharename \- to delete a user defined share\.
672.IP "" 4
673net usershare info [\-l|\-\-long] [wildcard sharename] \- to print info about a user defined share\.
674.IP "" 4
675net usershare list [\-l|\-\-long] [wildcard sharename] \- to list user defined shares\.
676
677.SS "USERSHARE ADD sharename path [comment] [acl] [guest_ok=[y|n]]"
678.PP
679Add or replace a new user defined share, with name "sharename"\.
680.PP
681"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"\.
682.PP
683The optional "comment" parameter is the comment that will appear on the share when browsed to by a client\.
684.PP
685The 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)\.
686.PP
687The default if no "acl" is given is "Everyone:R", which means any authenticated user has read\-only access\.
688.PP
689The 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\.
690
691
692There is no separate command to modify an existing user defined share,
693just use the "net usershare add [sharename]" command using the same
694sharename as the one you wish to modify and specify the new options
695you wish\. The Samba smbd daemon notices user defined share modifications
696at connect time so will see the change immediately, there is no need
697to restart smbd on adding, deleting or changing a user defined share\.
698.SS "USERSHARE DELETE sharename"
699.PP
700Deletes 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\.
701.SS "USERSHARE INFO [-l|--long] [wildcard sharename]"
702.PP
703Get info on user defined shares owned by the current user matching the given pattern, or all users\.
704.PP
705net 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\.
706.PP
707The 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\.
708.SS "USERSHARE LIST [-l|--long] wildcard sharename"
709.PP
710List all the user defined shares owned by the current user matching the given pattern, or all users\.
711.PP
712net 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\.
713.SS "HELP [COMMAND]"
714.PP
715Gives usage information for the specified command\.
716.SH "VERSION"
717.PP
718This man page is complete for version 3\.0 of the Samba suite\.
719.SH "AUTHOR"
720.PP
721The 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\.
722.PP
723The net manpage was written by Jelmer Vernooij\.
Note: See TracBrowser for help on using the repository browser.