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

Last change on this file since 125 was 44, checked in by Paul Smedley, 18 years ago

Update source to 3.0.25b

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