6253 F_GETLK doesn't always return lock owner
[illumos-gate.git] / usr / src / man / man1m / sharectl.1m
blob34dc693a5e38373a417b4e9f7bd5746b5625cd07
1 '\" te
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"
7 .SH NAME
8 sharectl \- configure and manage file sharing service
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBsharectl\fR  [\fB-h\fR]
13 .fi
15 .LP
16 .nf
17 \fBsharectl\fR  status [\fB-h\fR] [\fIprotocol\fR]
18 .fi
20 .LP
21 .nf
22 \fBsharectl\fR  get [\fB-h\fR] [\fB-p\fR \fIproperty\fR]... \fIprotocol\fR
23 .fi
25 .LP
26 .nf
27 \fBsharectl\fR  set [\fB-h\fR] [\fB-p\fR \fIproperty\fR=\fIvalue\fR]... \fIprotocol\fR
28 .fi
30 .SH DESCRIPTION
31 .sp
32 .LP
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.
36 .sp
37 .LP
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).
45 .SH OPTIONS
46 .sp
47 .LP
48 The following options are supported:
49 .sp
50 .ne 2
51 .na
52 \fB\fB-h\fR\fR
53 .ad
54 .sp .6
55 .RS 4n
56 Displays usage message.
57 .RE
59 .sp
60 .ne 2
61 .na
62 \fB\fB-p\fR \fIproperty\fR[=\fIvalue\fR]\fR
63 .ad
64 .sp .6
65 .RS 4n
66 Specifies a property. See "Subcommands," below.
67 .RE
69 .SS "Subcommands"
70 .sp
71 .LP
72 \fBsharectl\fR supports the subcommands described below. The form of a
73 \fBsharectl\fR command is:
74 .sp
75 .in +2
76 .nf
77 # \fBsharectl \fIsubcommand\fR [\fIoption\fR]\fR
78 .fi
79 .in -2
80 .sp
82 .sp
83 .ne 2
84 .na
85 \fB\fBget\fR [\fB-p\fR\ \fIproperty\fR] \fIprotocol\fR\fR
86 .ad
87 .sp .6
88 .RS 4n
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
92 \fBnfs\fR(4).
93 .RE
95 .sp
96 .ne 2
97 .na
98 \fB\fBset\fR [\fB-p\fR\ \fIproperty\fR=\fIvalue\fR]... \fIprotocol\fR\fR
99 .ad
100 .sp .6
101 .RS 4n
102 Set properties for the specified file sharing protocol.
106 .ne 2
108 \fB\fBstatus\fR [\fIprotocol\fR]\fR
110 .sp .6
111 .RS 4n
112 Display status of the specified protocol, or, if no protocol is specified, of
113 all file-sharing protocols.
116 .SH EXAMPLES
118 \fBExample 1 \fRSetting a Property
121 The following command sets the minimum version of the server NFS protocol to
122 version 3.
125 .in +2
127 % \fBsharectl -p server_versmin=3 nfs\fR
129 .in -2
133 \fBExample 2 \fRGetting Properties
136 The following command gets the properties for the NFS protocol.
139 .in +2
141 % \fBsharectl get nfs\fR
142 lockd_listen_backlog=32
143 lockd_servers=20
144 lockd_retransmit_timeout=5
145 grace_period=90
146 nfsmapid_domain=sun.com
147 servers=16
148 server_versmin=2
149 server_versmax=4
150 max_connections=-1
152 .in -2
157 The following command gets the value of the grace_period property for the NFS
158 protocol.
161 .in +2
163 % \fBsharectl get -p grace_period nfs\fR
164 grace_period=90
166 .in -2
170 \fBExample 3 \fRObtaining Status
173 The following command obtains the status of all file-sharing protocols on a
174 system.
177 .in +2
179 % \fBsharectl status\fR
180 nfs      enabled
182 .in -2
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
193 SMF.
196 .in +2
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
207 .in -2
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.
219 .in +2
221 % # \fBsharectl get smbfs\fR
222 [default]
223 workgroup=SALES
224 timeout=5
225 [FSERVER]
226 addr=fserv.ex.com
227 [RSERVER]
228 workgroup=REMGROUP
229 addr=rserv.ex.com
230 [RSERVER:george]
231 timeout=30
232 [SSERV:*:POKY]
233 addr=sserv.ex.com
234 timeout=25
236 .in -2
239 .SH EXIT STATUS
241 .ne 2
243 \fB\fB0\fR\fR
245 .RS 12n
246 Successful completion.
250 .ne 2
252 \fB\fInon-zero\fR\fR
254 .RS 12n
255 Command failed.
258 .SH FILES
260 .ne 2
262 \fB\fB/usr/include/libshare.h\fR\fR
264 .RS 27n
265 Error codes used for exit status.
268 .SH ATTRIBUTES
271 See \fBattributes\fR(5) for descriptions of the following attributes:
276 box;
277 c | c
278 l | l .
279 ATTRIBUTE TYPE  ATTRIBUTE VALUE
281 Interface Stability     Committed
284 .SH SEE ALSO
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),
289 \fBstandards\fR(5)