2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
5 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH SHARECTL 1M "Mar 16, 2009"
8 sharectl \- configure and manage file sharing service
12 \fBsharectl\fR [\fB-h\fR]
17 \fBsharectl\fR status [\fB-h\fR] [\fIprotocol\fR]
22 \fBsharectl\fR get [\fB-h\fR] [\fB-p\fR \fIproperty\fR]... \fIprotocol\fR
27 \fBsharectl\fR set [\fB-h\fR] [\fB-p\fR \fIproperty\fR=\fIvalue\fR]... \fIprotocol\fR
33 The \fBsharectl\fR command operates on file-sharing protocols, such as NFS. The
34 command sets the client and server operational properties, takes and restores
35 configuration snapshots, and gets status of the protocol service.
38 The \fBget\fR and \fBset\fR subcommands (see below) require root privileges or
39 that you assume the Primary Administrator role. A non-privileged user can
40 change the Solaris CIFS client's persistent settings when granted the SMBFS
41 Management rights profile in the \fB/etc/user_attr\fR file. See
42 \fBuser_attr\fR(4) and \fBrbac\fR(5). An authorized user can use \fBsharectl\fR
43 to set global values for Solaris CIFS server properties in the Solaris server
44 management facility. See \fBsmb\fR(4).
48 The following options are supported:
56 Displays usage message.
62 \fB\fB-p\fR \fIproperty\fR[=\fIvalue\fR]\fR
66 Specifies a property. See "Subcommands," below.
72 \fBsharectl\fR supports the subcommands described below. The form of a
73 \fBsharectl\fR command is:
77 # \fBsharectl \fIsubcommand\fR [\fIoption\fR]\fR
85 \fB\fBget\fR [\fB-p\fR\ \fIproperty\fR] \fIprotocol\fR\fR
89 Get the property values for the specified protocol. If no \fB-p\fR option is
90 provided, get all the properties for the specified protocol. For NFS,
91 properties correspond to entries in the \fB/etc/default/nfs\fR file. See
98 \fB\fBset\fR [\fB-p\fR\ \fIproperty\fR=\fIvalue\fR]... \fIprotocol\fR\fR
102 Set properties for the specified file sharing protocol.
108 \fB\fBstatus\fR [\fIprotocol\fR]\fR
112 Display status of the specified protocol, or, if no protocol is specified, of
113 all file-sharing protocols.
118 \fBExample 1 \fRSetting a Property
121 The following command sets the minimum version of the server NFS protocol to
127 % \fBsharectl -p server_versmin=3 nfs\fR
133 \fBExample 2 \fRGetting Properties
136 The following command gets the properties for the NFS protocol.
141 % \fBsharectl get nfs\fR
142 lockd_listen_backlog=32
144 lockd_retransmit_timeout=5
146 nfsmapid_domain=sun.com
157 The following command gets the value of the grace_period property for the NFS
163 % \fBsharectl get -p grace_period nfs\fR
170 \fBExample 3 \fRObtaining Status
173 The following command obtains the status of all file-sharing protocols on a
179 % \fBsharectl status\fR
186 \fBExample 4 \fRConfiguring Global Settings
189 The following command shows how an authorized user can use \fBsharectl\fR
190 commands to configure global settings for the \fBex.com\fR environment in the
191 service management facility (SMF). See \fBnsmbrc\fR(4) for a description of the
192 example environment, \fBex.com\fR. See \fBsmf\fR(5) for a description of the
198 # \fBsharectl set -p section=default -p workgroup=SALES \e
199 -p timeout=5 smbfs\fR
200 # \fBsharectl set -p section=FSERVER -p addr=fserv.ex.com smbfs\fR
201 # \fBsharectl set -p section=RSERVER -p workgroup=REMGROUP \e
202 -p addr=rserv.ex.com smbfs\fR
203 # \fBsharectl set -p section=RSERVER:george -p timeout=30 smbfs\fR
204 # \fBsharectl set -p section="SSERV:*:POKY" -p addr=sserv.ex.com \e
205 -p timeout=25 smbfs\fR
211 \fBExample 5 \fRDisplaying Current Settings
214 The following command shows how an authorized user can use the \fBsharectl
215 get\fR command to view the global settings for \fBsmbfs\fR in the SMF. The
216 values shown are those set by the previous example.
221 % # \fBsharectl get smbfs\fR
246 Successful completion.
262 \fB\fB/usr/include/libshare.h\fR\fR
265 Error codes used for exit status.
271 See \fBattributes\fR(5) for descriptions of the following attributes:
279 ATTRIBUTE TYPE ATTRIBUTE VALUE
281 Interface Stability Committed
287 \fBsharemgr\fR(1M), \fBnfs\fR(4), \fBnsmbrc\fR(4), \fBuser_attr\fR(4),
288 \fBattributes\fR(5), \fBrbac\fR(5), \fBsmb\fR(4), \fBsmf\fR(5),