1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
6 <refentrytitle>net</refentrytitle>
7 <manvolnum>8</manvolnum>
12 <refname>net</refname>
13 <refpurpose>Tool for administration of Samba and remote
20 <command>net</command>
21 <arg choice="req"><ads|rap|rpc></arg>
22 <arg choice="opt">-h</arg>
23 <arg choice="opt">-w workgroup</arg>
24 <arg choice="opt">-W myworkgroup</arg>
25 <arg choice="opt">-U user</arg>
26 <arg choice="opt">-I ip-address</arg>
27 <arg choice="opt">-p port</arg>
28 <arg choice="opt">-n myname</arg>
29 <arg choice="opt">-s conffile</arg>
30 <arg choice="opt">-S server</arg>
31 <arg choice="opt">-l</arg>
32 <arg choice="opt">-P</arg>
33 <arg choice="opt">-d debuglevel</arg>
34 <arg choice="opt">-V</arg>
39 <title>DESCRIPTION</title>
41 <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
42 <manvolnum>7</manvolnum></citerefentry> suite.</para>
44 <para>The Samba net utility is meant to work just like the net utility
45 available for windows and DOS. The first argument should be used
46 to specify the protocol to use when executing a certain command.
47 ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3)
48 clients and RPC can be used for NT4 and Windows 2000. If this
49 argument is omitted, net will try to determine it automatically.
50 Not all commands are available on all protocols.
56 <title>OPTIONS</title>
62 <term>-w target-workgroup</term>
64 Sets target workgroup or domain. You have to specify
65 either this option or the IP address or the name of a server.
70 <term>-W workgroup</term>
72 Sets client workgroup or domain
84 <term>-I ip-address</term>
86 IP address of target server to use. You have to
87 specify either this option or a target workgroup or
95 Port on the target server to connect to (usually 139 or 445).
96 Defaults to trying 445 first, then 139.
100 &stdarg.netbios.name;
104 <term>-S server</term>
106 Name of target server. You should specify either
107 this option or a target workgroup or a target IP address.
114 When listing data, give more information on each item.
121 Make queries to the external server using the machine account of the local server.
125 &stdarg.server.debug;
130 <title>COMMANDS</title>
133 <title>CHANGESECRETPW</title>
135 <para>This command allows the Samba machine account password to be set from an external application
136 to a machine account password that has already been stored in Active Directory. DO NOT USE this command
137 unless you know exactly what you are doing. The use of this command requires that the force flag (-f)
138 be used also. There will be NO command prompt. Whatever information is piped into stdin, either by
139 typing at the command line or otherwise, will be stored as the literal machine password. Do NOT use
140 this without care and attention as it will overwrite a legitimate machine password without warning.
141 YOU HAVE BEEN WARNED.
149 <para>The <command>NET TIME</command> command allows you to view the time on a remote server
150 or synchronise the time on the local server with the time on the remote server.</para>
155 <para>Without any options, the <command>NET TIME</command> command
156 displays the time on the remote server.
162 <title>TIME SYSTEM</title>
164 <para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.</para>
169 <title>TIME SET</title>
170 <para>Tries to set the date and time of the local server to that on
171 the remote server using <command>/bin/date</command>. </para>
176 <title>TIME ZONE</title>
178 <para>Displays the timezone in hours from GMT on the remote computer.</para>
184 <title>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [createupn=UPN] [createcomputer=OU] [options]</title>
187 Join a domain. If the account already exists on the server, and
188 [TYPE] is MEMBER, the machine will attempt to join automatically.
189 (Assuming that the machine has been created in server manager)
190 Otherwise, a password will be prompted for, and a new account may
194 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
199 [UPN] (ADS only) set the principalname attribute during the join. The default
200 format is host/netbiosname@REALM.
204 [OU] (ADS only) Precreate the computer account in a specific OU. The
205 OU string reads from top to bottom without RDNs, and is delimited by
206 a '/'. Please note that '\' is used for escape by both the shell
207 and ldap, so it may need to be doubled or quadrupled to pass through,
208 and it is not used as a delimiter.
213 <title>[RPC] OLDJOIN [options]</title>
215 <para>Join a domain. Use the OLDJOIN option to join the domain
216 using the old style of domain joining - you need to create a trust
217 account in server manager first.</para>
221 <title>[RPC|ADS] USER</title>
224 <title>[RPC|ADS] USER</title>
226 <para>List all users</para>
231 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
233 <para>Delete specified user</para>
238 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
240 <para>List the domain groups of the specified user.</para>
245 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
247 <para>Rename specified user.</para>
252 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
254 <para>Add specified user.</para>
259 <title>[RPC|ADS] GROUP</title>
262 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
263 <para>List user groups.</para>
267 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
269 <para>Delete specified group.</para>
274 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
276 <para>Create specified group.</para>
282 <title>[RAP|RPC] SHARE</title>
285 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
287 <para>Enumerates all exported resources (network shares) on target server.</para>
292 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
294 <para>Adds a share from a server (makes the export active). Maxusers
295 specifies the number of users that can be connected to the
296 share simultaneously.</para>
301 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
303 <para>Delete specified share.</para>
308 <title>[RPC|RAP] FILE</title>
311 <title>[RPC|RAP] FILE</title>
313 <para>List all open files on remote server.</para>
318 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
320 <para>Close file with specified <replaceable>fileid</replaceable> on
321 remote server.</para>
326 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
329 Print information on specified <replaceable>fileid</replaceable>.
330 Currently listed are: file-id, username, locks, path, permissions.
336 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
339 List files opened by specified <replaceable>user</replaceable>.
340 Please note that <command>net rap file user</command> does not work
341 against Samba servers.
349 <title>SESSION</title>
352 <title>RAP SESSION</title>
354 <para>Without any other options, SESSION enumerates all active SMB/CIFS
355 sessions on the target server.</para>
360 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
362 <para>Close the specified sessions.</para>
367 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
369 <para>Give a list with all the open files in specified session.</para>
376 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
378 <para>List all servers in specified domain or workgroup. Defaults
379 to local domain.</para>
384 <title>RAP DOMAIN</title>
386 <para>Lists all domains and workgroups visible on the
387 current network.</para>
392 <title>RAP PRINTQ</title>
395 <title>RAP PRINTQ LIST <replaceable>QUEUE_NAME</replaceable></title>
397 <para>Lists the specified print queue and print jobs on the server.
398 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all
399 queues are listed.</para>
404 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
406 <para>Delete job with specified id.</para>
413 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
416 Validate whether the specified user can log in to the
417 remote server. If the password is not specified on the commandline, it
426 <title>RAP GROUPMEMBER</title>
429 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
431 <para>List all members of the specified group.</para>
436 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
438 <para>Delete member from group.</para>
443 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
445 <para>Add member to group.</para>
452 <title>RAP ADMIN <replaceable>command</replaceable></title>
454 <para>Execute the specified <replaceable>command</replaceable> on
455 the remote server. Only works with OS/2 servers.
463 <title>RAP SERVICE</title>
466 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
468 <para>Start the specified service on the remote server. Not implemented yet.</para>
475 <title>RAP SERVICE STOP</title>
477 <para>Stop the specified service on the remote server.</para>
486 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
489 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
495 <title>LOOKUP</title>
498 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
501 Lookup the IP address of the given host with the specified type (netbios suffix).
502 The type defaults to 0x20 (workstation).
508 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
510 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
515 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
517 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
518 Defaults to local realm.</para>
523 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
525 <para>Give IP's of Domain Controllers for specified <replaceable>
526 DOMAIN</replaceable>. Defaults to local domain.</para>
531 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
533 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
534 or workgroup. Defaults to local domain.</para>
543 <para>Samba uses a general caching interface called 'gencache'. It
544 can be controlled using 'NET CACHE'.</para>
546 <para>All the timeout parameters support the suffixes:
549 <member>s - Seconds</member>
550 <member>m - Minutes</member>
551 <member>h - Hours</member>
552 <member>d - Days</member>
553 <member>w - Weeks</member>
559 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
561 <para>Add specified key+data to the cache with the given timeout.</para>
566 <title>CACHE DEL <replaceable>key</replaceable></title>
568 <para>Delete key from the cache.</para>
573 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
575 <para>Update data of existing cache entry.</para>
580 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
582 <para>Search for the specified pattern in the cache data.</para>
587 <title>CACHE LIST</title>
590 List all current items in the cache.
596 <title>CACHE FLUSH</title>
598 <para>Remove all the current items from the cache.</para>
605 <title>GETLOCALSID [DOMAIN]</title>
607 <para>Prints the SID of the specified domain, or if the parameter is
608 omitted, the SID of the local server.</para>
613 <title>SETLOCALSID S-1-5-21-x-y-z</title>
615 <para>Sets SID for the local server to the specified SID.</para>
620 <title>GETDOMAINSID</title>
622 <para>Prints the local machine SID and the SID of the current
628 <title>SETDOMAINSID</title>
630 <para>Sets the SID of the current domain.</para>
635 <title>GROUPMAP</title>
637 <para>Manage the mappings between Windows group SIDs and UNIX groups.
638 Common options include:</para>
641 <listitem><para>unixgroup - Name of the UNIX group</para></listitem>
642 <listitem><para>ntgroup - Name of the Windows NT group (must be
643 resolvable to a SID</para></listitem>
644 <listitem><para>rid - Unsigned 32-bit integer</para></listitem>
645 <listitem><para>sid - Full SID in the form of "S-1-..."</para></listitem>
646 <listitem><para>type - Type of the group; either 'domain', 'local',
647 or 'builtin'</para></listitem>
648 <listitem><para>comment - Freeform text description of the group</para></listitem>
652 <title>GROUPMAP ADD</title>
655 Add a new group mapping entry:
657 net groupmap add {rid=int|sid=string} unixgroup=string \
658 [type={domain|local}] [ntgroup=string] [comment=string]
665 <title>GROUPMAP DELETE</title>
667 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
669 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
674 <title>GROUPMAP MODIFY</title>
676 <para>Update en existing group entry.</para>
680 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \
681 [comment=string] [type={domain|local}]
687 <title>GROUPMAP LIST</title>
689 <para>List existing group mapping entries.</para>
691 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
699 <title>MAXRID</title>
701 <para>Prints out the highest RID currently in use on the local
702 server (by the active 'passdb backend').
708 <title>RPC INFO</title>
710 <para>Print information about the domain of the remote server,
711 such as domain name, domain sid and number of users and groups.
717 <title>[RPC|ADS] TESTJOIN</title>
719 <para>Check whether participation in a domain is still valid.</para>
724 <title>[RPC|ADS] CHANGETRUSTPW</title>
726 <para>Force change of domain trust password.</para>
731 <title>RPC TRUSTDOM</title>
734 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
736 <para>Add a interdomain trust account for <replaceable>DOMAIN</replaceable>.
737 This is in fact a Samba account named <replaceable>DOMAIN$</replaceable>
738 with the account flag <constant>'I'</constant> (interdomain trust account).
739 If the command is used against localhost it has the same effect as
740 <command>smbpasswd -a -i DOMAIN</command>. Please note that both commands
741 expect a appropriate UNIX account.
747 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
749 <para>Remove interdomain trust account for
750 <replaceable>DOMAIN</replaceable>. If it is used against localhost
751 it has the same effect as <command>smbpasswd -x DOMAIN$</command>.
757 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
760 Establish a trust relationship to a trusting domain.
761 Interdomain account must already be created on the remote PDC.
767 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
768 <para>Abandon relationship to trusted domain</para>
773 <title>RPC TRUSTDOM LIST</title>
775 <para>List all current interdomain trust relationships.</para>
780 <title>RPC RIGHTS</title>
782 <para>This subcommand is used to view and manage Samba's rights assignments (also
783 referred to as privileges). There are three options currently available:
784 <parameter>list</parameter>, <parameter>grant</parameter>, and
785 <parameter>revoke</parameter>. More details on Samba's privilege model and its use
786 can be found in the Samba-HOWTO-Collection.</para>
794 <title>RPC ABORTSHUTDOWN</title>
796 <para>Abort the shutdown of a remote server.</para>
801 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
803 <para>Shut down the remote server.</para>
809 Reboot after shutdown.
816 Force shutting down all applications.
821 <term>-t timeout</term>
823 Timeout before system will be shut down. An interactive
824 user of the system can use this time to cancel the shutdown.
829 <term>-C message</term>
830 <listitem><para>Display the specified message on the screen to
831 announce the shutdown.</para></listitem>
838 <title>RPC SAMDUMP</title>
840 <para>Print out sam database of remote server. You need
841 to run this against the PDC, from a Samba machine joined as a BDC. </para>
845 <title>RPC VAMPIRE</title>
847 <para>Export users, aliases and groups from remote server to
848 local server. You need to run this against the PDC, from a Samba machine joined as a BDC.
854 <title>RPC GETSID</title>
856 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename>. </para>
861 <title>ADS LEAVE</title>
863 <para>Make the remote host leave the domain it is part of. </para>
868 <title>ADS STATUS</title>
870 <para>Print out status of machine account of the local machine in ADS.
871 Prints out quite some debug info. Aimed at developers, regular
872 users should use <command>NET ADS TESTJOIN</command>.</para>
877 <title>ADS PRINTER</title>
880 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
883 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the
884 server name defaults to the local host.</para>
889 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
891 <para>Publish specified printer using ADS.</para>
896 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
898 <para>Remove specified printer from ADS directory.</para>
905 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
907 <para>Perform a raw LDAP search on a ADS server and dump the results. The
908 expression is a standard LDAP search expression, and the
909 attributes are a list of LDAP fields to show in the results.</para>
911 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
917 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
920 Perform a raw LDAP search on a ADS server and dump the results. The
921 DN standard LDAP DN, and the attributes are a list of LDAP fields
922 to show in the result.
925 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
930 <title>ADS WORKGROUP</title>
932 <para>Print out workgroup name for specified kerberos realm.</para>
937 <title>SAM CREATEBUILTINGROUP <NAME></title>
940 (Re)Create a BUILTIN group.
941 Only a wellknown set of BUILTIN groups can be created with this command.
942 This is the list of currently recognized group names: Administrators,
943 Users, Guests, Power Users, Account Operators, Server Operators, Print
944 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
947 This command requires a running Winbindd with idmap allocation properly
948 configured. The group gid will be allocated out of the winbindd range.
954 <title>SAM CREATELOCALGROUP <NAME></title>
957 Create a LOCAL group (also known as Alias).
959 This command requires a running Winbindd with idmap allocation properly
960 configured. The group gid will be allocated out of the winbindd range.
966 <title>SAM DELETELOCALGROUP <NAME></title>
969 Delete an existing LOCAL group (also known as Alias).
976 <title>SAM MAPUNIXGROUP <NAME></title>
979 Map an existing Unix group and make it a Domain Group, the domain group
980 will have the same name.
986 <title>SAM UNMAPUNIXGROUP <NAME></title>
989 Remove an existing group mapping entry.
995 <title>SAM ADDMEM <GROUP> <MEMBER></title>
998 Add a member to a Local group. The group can be specified only by name,
999 the member can be specified by name or SID.
1005 <title>SAM DELMEM <GROUP> <MEMBER></title>
1008 Remove a member from a Local group. The group and the member must be
1015 <title>SAM LISTMEM <GROUP></title>
1018 List Local group members. The group must be specified by name.
1024 <title>SAM LIST <users|groups|localgroups|builtin|workstations> [verbose]</title>
1027 List the specified set of accounts by name. If verbose is specified,
1028 the rid and description is also provided for each account.
1034 <title>SAM SHOW <NAME></title>
1037 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1044 <title>SAM SET HOMEDIR <NAME> <DIRECTORY></title>
1047 Set the home directory for a user account.
1053 <title>SAM SET PROFILEPATH <NAME> <PATH></title>
1056 Set the profile path for a user account.
1062 <title>SAM SET COMMENT <NAME> <COMMENT></title>
1065 Set the comment for a user or group account.
1071 <title>SAM SET FULLNAME <NAME> <FULL NAME></title>
1074 Set the full name for a user account.
1080 <title>SAM SET LOGONSCRIPT <NAME> <SCRIPT></title>
1083 Set the logon script for a user account.
1089 <title>SAM SET HOMEDRIVE <NAME> <DRIVE></title>
1092 Set the home drive for a user account.
1098 <title>SAM SET WORKSTATIONS <NAME> <WORKSTATIONS></title>
1101 Set the workstations a user account is allowed to log in from.
1107 <title>SAM SET DISABLE <NAME></title>
1110 Set the "disabled" flag for a user account.
1116 <title>SAM SET PWNOTREQ <NAME></title>
1119 Set the "password not required" flag for a user account.
1125 <title>SAM SET AUTOLOCK <NAME></title>
1128 Set the "autolock" flag for a user account.
1134 <title>SAM SET PWNOEXP <NAME></title>
1137 Set the "password do not expire" flag for a user account.
1143 <title>SAM SET PWDMUSTCHANGENOW <NAME> [yes|no]</title>
1146 Set or unset the "password must change" flag for a user account.
1152 <title>SAM POLICY LIST</title>
1155 List the available account policies.
1161 <title>SAM POLICY SHOW <account policy></title>
1164 Show the account policy value.
1170 <title>SAM POLICY SET <account policy> <value></title>
1173 Set a value for the account policy.
1174 Valid values can be: "forever", "never", "off", or a number.
1180 <title>SAM PROVISION</title>
1183 Only available if ldapsam:editposix is set and winbindd is running.
1184 Properly populates the ldap tree with the basic accounts (Administrator)
1185 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1191 <title>IDMAP DUMP <local tdb file name></title>
1194 Dumps the mappings contained in the local tdb file specified.
1195 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1201 <title>IDMAP RESTORE [input file]</title>
1204 Restore the mappings from the specified file or stdin.
1210 <title>IDMAP SECRET <DOMAIN>|ALLOC <secret></title>
1213 Store a secret for the specified domain, used primarily for domains
1214 that use idmap_ldap as a backend. In this case the secret is used
1215 as the password for the user DN used to bind to the ldap server.
1221 <title>USERSHARE</title>
1223 <para>Starting with version 3.0.23, a Samba server now supports the ability for
1224 non-root users to add user defined shares to be exported using the "net usershare"
1229 To set this up, first set up your smb.conf by adding to the [global] section:
1231 usershare path = /usr/local/samba/lib/usershares
1233 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
1234 set the group owner to the UNIX group who should have the ability to create usershares,
1235 for example a group called "serverops".
1237 Set the permissions on /usr/local/samba/lib/usershares to 01770.
1239 (Owner and group all access, no access for others, plus the sticky bit,
1240 which means that a file in that directory can be renamed or deleted only
1241 by the owner of the file).
1243 Finally, tell smbd how many usershares you will allow by adding to the [global]
1244 section of smb.conf a line such as :
1246 usershare max shares = 100.
1248 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
1249 can create user defined shares on demand using the commands below.
1252 <para>The usershare commands are:
1255 <member>net usershare add sharename path [comment] [acl] [guest_ok=[y|n]] - to add or change a user defined share.</member>
1256 <member>net usershare delete sharename - to delete a user defined share.</member>
1257 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
1258 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
1264 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
1267 Add or replace a new user defined share, with name "sharename".
1271 "path" specifies the absolute pathname on the system to be exported.
1272 Restrictions may be put on this, see the global smb.conf parameters:
1273 "usershare owner only", "usershare prefix allow list", and
1274 "usershare prefix deny list".
1278 The optional "comment" parameter is the comment that will appear
1279 on the share when browsed to by a client.
1282 <para>The optional "acl" field
1283 specifies which users have read and write access to the entire share.
1284 Note that guest connections are not allowed unless the smb.conf parameter
1285 "usershare allow guests" has been set. The definition of a user
1286 defined share acl is: "user:permission", where user is a valid
1287 username on the system and permission can be "F", "R", or "D".
1288 "F" stands for "full permissions", ie. read and write permissions.
1289 "D" stands for "deny" for a user, ie. prevent this user from accessing
1291 "R" stands for "read only", ie. only allow read access to this
1292 share (no creation of new files or directories or writing to files).
1296 The default if no "acl" is given is "Everyone:R", which means any
1297 authenticated user has read-only access.
1301 The optional "guest_ok" has the same effect as the parameter of the
1302 same name in smb.conf, in that it allows guest access to this user
1303 defined share. This parameter is only allowed if the global parameter
1304 "usershare allow guests" has been set to true in the smb.conf.
1307 There is no separate command to modify an existing user defined share,
1308 just use the "net usershare add [sharename]" command using the same
1309 sharename as the one you wish to modify and specify the new options
1310 you wish. The Samba smbd daemon notices user defined share modifications
1311 at connect time so will see the change immediately, there is no need
1312 to restart smbd on adding, deleting or changing a user defined share.
1316 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
1319 Deletes the user defined share by name. The Samba smbd daemon
1320 immediately notices this change, although it will not disconnect
1321 any users currently connected to the deleted share.
1327 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1330 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1334 net usershare info on its own dumps out info on the user defined shares that were
1335 created by the current user, or restricts them to share names that match the given
1336 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1337 If the '-l' or '--long' option is also given, it prints out info on user defined
1338 shares created by other users.
1342 The information given about a share looks like:
1347 usershare_acl=Everyone:F
1350 And is a list of the current settings of the user defined share that can be
1351 modified by the "net usershare add" command.
1357 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
1360 List all the user defined shares owned by the current user matching the given pattern, or all users.
1364 net usershare list on its own list out the names of the user defined shares that were
1365 created by the current user, or restricts the list to share names that match the given
1366 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1367 If the '-l' or '--long' option is also given, it includes the names of user defined
1368 shares created by other users.
1378 <para>Starting with version 3.2.0, a Samba server can be configured by data
1379 stored in registry. This configuration data can be edited with the new "net
1384 The deployment of this configuration data can be activated in two levels from the
1385 <emphasis>smb.conf</emphasis> file: Share definitions from registry are
1386 activated by setting <parameter>registry shares</parameter> to
1387 <quote>yes</quote> in the [global] section and global configuration options are
1388 activated by setting <smbconfoption name="include">registry</smbconfoption> in
1389 the [global] section.
1390 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
1391 <manvolnum>5</manvolnum></citerefentry> manpage for details.
1394 <para>The conf commands are:
1396 <member>net conf list - Dump the complete configuration in smb.conf like
1398 <member>net conf import - Import configuration from file in smb.conf
1400 <member>net conf listshares - List the registry shares.</member>
1401 <member>net conf drop - Delete the complete configuration from
1403 <member>net conf showshare - Show the definition of a registry share.</member>
1404 <member>net conf addshare - Create a new registry share.</member>
1405 <member>net conf delshare - Delete a registry share.</member>
1406 <member>net conf setparm - Store a parameter.</member>
1407 <member>net conf getparm - Retrieve the value of a parameter.</member>
1408 <member>net conf delparm - Delete a parameter.</member>
1413 <title>CONF LIST</title>
1416 Print the configuration data stored in the registry in a smb.conf-like format to
1422 <title>CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
1425 This command imports configuration from a file in smb.conf format.
1426 If a section encountered in the input file is present in registry,
1427 its contents is replaced. Sections of registry configuration that have
1428 no counterpart in the input file are not affected. If you want to delete these,
1429 you will have to use the "net conf drop" or "net conf delshare" commands.
1430 Optionally, a section may be specified to restrict the effect of the
1431 import command to that specific section. A test mode is enabled by specifying
1432 the parameter "-T" on the commandline. In test mode, no changes are made to the
1433 registry, and the resulting configuration is printed to standard output instead.
1438 <title>CONF LISTSHARES</title>
1441 List the names of the shares defined in registry.
1446 <title>CONF DROP</title>
1449 Delete the complete configuration data from registry.
1454 <title>CONF SHOWSHARE <replaceable>sharename</replaceable></title>
1457 Show the definition of the share or section specified. It is valid to specify
1458 "global" as sharename to retrieve the global configuration options from
1464 <title>CONF ADDSHARE <replaceable>sharename</replaceable> <replaceable>path</replaceable> [<replaceable>writeable={y|N}</replaceable> [<replaceable>guest_ok={y|N}</replaceable> [<replaceable>comment</replaceable>]]] </title>
1466 <para>Create a new share definition in registry.
1467 The sharename and path have to be given. The share name may
1468 <emphasis>not</emphasis> be "global". Optionally, values for the very
1469 common options "writeable", "guest ok" and a "comment" may be specified.
1470 The same result may be obtained by a sequence of "net conf setparm"
1476 <title>CONF DELSHARE <replaceable>sharename</replaceable></title>
1479 Delete a share definition from registry.
1484 <title>CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
1487 Store a parameter in registry. The section may be global or a sharename.
1488 The section is created if it does not exist yet.
1493 <title>CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1496 Show a parameter stored in registry.
1501 <title>CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1504 Delete a parameter stored in registry.
1518 <title>HELP [COMMAND]</title>
1520 <para>Gives usage information for the specified command.</para>
1527 <title>VERSION</title>
1529 <para>This man page is complete for version 3.0 of the Samba
1534 <title>AUTHOR</title>
1536 <para>The original Samba software and related utilities
1537 were created by Andrew Tridgell. Samba is now developed
1538 by the Samba Team as an Open Source project similar
1539 to the way the Linux kernel is developed.</para>
1541 <para>The net manpage was written by Jelmer Vernooij.</para>