8960 libefi: import efichar.c for ucs2 support
[unleashed.git] / usr / src / man / man1m / sharectl.1m
blob74d260d4e7af8ab93f77ea3701bc63a2cecd724d
1 .\"
2 .\" The contents of this file are subject to the terms of the
3 .\" Common Development and Distribution License (the "License").
4 .\" You may not use this file except in compliance with the License.
5 .\"
6 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7 .\" or http://www.opensolaris.org/os/licensing.
8 .\" See the License for the specific language governing permissions
9 .\" and limitations under the License.
10 .\"
11 .\" When distributing Covered Code, include this CDDL HEADER in each
12 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13 .\" If applicable, add the following below this CDDL HEADER, with the
14 .\" fields enclosed by brackets "[]" replaced with your own identifying
15 .\" information: Portions Copyright [yyyy] [name of copyright owner]
16 .\"
17 .\"
18 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
19 .\" Copyright 2016 Nexenta Systems, Inc.
20 .\"
21 .Dd December 16, 2016
22 .Dt SHARECTL 1M
23 .Os
24 .Sh NAME
25 .Nm sharectl
26 .Nd configure and manage file sharing services
27 .Sh SYNOPSIS
28 .Nm
29 .Ar subcommand
30 .Op Fl h
31 .Nm
32 .Cm delsect
33 .Ar section protocol
34 .Nm
35 .Cm get
36 .Oo Fl p Ar property Oc Ns ...
37 .Ar protocol
38 .Nm
39 .Cm set
40 .Bro Fl p Ar property Ns = Ns Ar value Brc Ns ...
41 .Ar protocol
42 .Nm
43 .Cm status
44 .Op Ar protocol
45 .Sh DESCRIPTION
46 The
47 .Nm
48 command operates on file sharing services.
49 The command sets the client and server operational properties, takes and
50 restores configuration snapshots, and gets status of the protocol service.
51 Currently supported services are
52 .Xr autofs 4 ,
53 .Xr nfs 4 ,
54 .Xr smb 4
55 and smbfs.
56 .Pp
57 The
58 .Cm set
59 subcommand requires root privileges or that you assume the Primary Administrator
60 role.
61 .Pp
62 A non-privileged user can change the persistent settings when granted required
63 authorizations, see appropriate sharing protocol man page.
64 .Ss Options
65 The following options are supported where applicable:
66 .Bl -tag -width Ds
67 .It Fl h
68 Displays usage message.
69 Supported for all subcommands.
70 .It Fl p Ar property Ns Op = Ns Ar value
71 Specifies a property.
72 See
73 .Sx Subcommands ,
74 below.
75 .El
76 .Ss Subcommands
77 .Nm
78 supports the subcommands described below:
79 .Bl -tag -width Ds
80 .It Xo
81 .Nm
82 .Cm delsect
83 .Ar section protocol
84 .Xc
85 Delete configuration section for the specified protocol.
86 Currently only protocol that has configuration sections is
87 .Nm smbfs
88 .Po see
89 .Xr nsmbrc 4
90 and
91 .Sx EXAMPLES
92 .Pc .
93 .It Xo
94 .Nm
95 .Cm get
96 .Oo Fl p Ar property Oc Ns ...
97 .Ar protocol
98 .Xc
99 Get the property values for the specified protocol.
100 If no
101 .Fl p
102 option is provided, get all the properties for the specified protocol.
103 For NFS, properties correspond to entries in the
104 .Pa /etc/default/nfs
105 file.
107 .Xr nfs 4 .
108 .It Xo
110 .Cm set
111 .Bro Fl p Ar property Ns = Ns Ar value Brc Ns ...
112 .Ar protocol
114 Set properties for the specified file sharing protocol.
115 .It Xo
117 .Cm status
118 .Op Ar protocol
120 Display status of the specified protocol, or, if no protocol is specified, of
121 all file sharing protocols.
123 .Sh FILES
124 .Bl -tag -width Ds
125 .It Pa /usr/include/libshare.h
126 Error codes used for exit status.
128 .Sh EXIT STATUS
129 .Bl -tag -width Ds
130 .It Sy 0
131 Successful completion.
132 .It Sy non-zero
133 Command failed.
135 .Sh EXAMPLES
136 .Bl -tag -width Ds
137 .It Sy Example 1 No Setting a Property
138 The following command sets the minimum version of the server NFS protocol to
139 version 3.
140 .Bd -literal
141 # sharectl -p server_versmin=3 nfs
143 .It Sy Example 2 No Getting Properties
144 The following command gets the properties for the NFS protocol.
145 .Bd -literal
146 # sharectl get nfs
147 lockd_listen_backlog=32
148 lockd_servers=256
149 lockd_retransmit_timeout=5
150 grace_period=90
151 nfsmapid_domain=sun.com
152 servers=1024
153 server_versmin=2
154 server_versmax=4
155 max_connections=-1
158 The following command gets the value of the grace_period property for the NFS
159 protocol.
160 .Bd -literal
161 # sharectl get -p grace_period nfs
162 grace_period=90
164 .It Sy Example 3 No Obtaining Status
165 The following command obtains the status of all file-sharing protocols on a
166 system.
167 .Bd -literal
168 # sharectl status
169 nfs      enabled
171 .It Sy Example 4 No Configuring Global Settings
172 The following command shows how an authorized user can use
174 commands to configure global settings for the
175 .Pa ex.com
176 environment in the service management facility
177 .Pq SMF .
179 .Xr nsmbrc 4
180 for a description of the example environment,
181 .Pa ex.com .
183 .Xr smf 5
184 for a description of the SMF.
185 .Bd -literal
186 # sharectl set -p section=default -p workgroup=SALES \e
187   -p timeout=5 smbfs
188 # sharectl set -p section=FSERVER -p addr=fserv.ex.com smbfs
189 # sharectl set -p section=RSERVER -p workgroup=REMGROUP \e
190   -p addr=rserv.ex.com smbfs
191 # sharectl set -p section=RSERVER:george -p timeout=30 smbfs
192 # sharectl set -p section="SSERV:*:POKY" -p addr=sserv.ex.com \e
193   -p timeout=25 smbfs
195 .It Sy Example 5 No Displaying Current Settings
196 The following command shows how an authorized user can use the
197 .Nm sharectl Cm get
198 command to view the global settings for
199 .Nm smbfs
200 in the SMF.
201 The values shown are those set by the previous example.
202 .Bd -literal
203 # sharectl get smbfs
204 [default]
205 workgroup=SALES
206 timeout=5
207 [FSERVER]
208 addr=fserv.ex.com
209 [RSERVER]
210 workgroup=REMGROUP
211 addr=rserv.ex.com
212 [RSERVER:george]
213 timeout=30
214 [SSERV:*:POKY]
215 addr=sserv.ex.com
216 timeout=25
219 .Sh INTERFACE STABILITY
220 .Sy Committed
221 .Sh SEE ALSO
222 .Xr sharemgr 1M ,
223 .Xr autofs 4 ,
224 .Xr nfs 4 ,
225 .Xr nsmbrc 4 ,
226 .Xr smb 4 ,
227 .Xr user_attr 4 ,
228 .Xr attributes 5 ,
229 .Xr rbac 5 ,
230 .Xr smf 5 ,
231 .Xr standards 5