1sharectl(1M) System Administration Commands sharectl(1M)
2
3
4
6 sharectl - configure and manage file sharing service
7
9 sharectl [-h]
10
11
12 sharectl status [-h] [protocol]
13
14
15 sharectl get [-h] [-p property]... protocol
16
17
18 sharectl set [-h] [-p property=value]... protocol
19
20
22 The sharectl command operates on file-sharing protocols, such as NFS.
23 The command sets the client and server operational properties, takes
24 and restores configuration snapshots, and gets status of the protocol
25 service.
26
27
28 The get and set subcommands (see below) require root privileges or that
29 you assume the Primary Administrator role. A non-privileged user can
30 change the Solaris CIFS client's persistent settings when granted the
31 SMBFS Management rights profile in the /etc/user_attr file. See
32 user_attr(4) and rbac(5). An authorized user can use sharectl to set
33 global values for Solaris CIFS server properties in the Solaris server
34 management facility. See smb(4).
35
37 The following options are supported:
38
39 -h
40
41 Displays usage message.
42
43
44 -p property[=value]
45
46 Specifies a property. See "Subcommands," below.
47
48
49 Subcommands
50 sharectl supports the subcommands described below. The form of a
51 sharectl command is:
52
53 # sharectl subcommand [option]
54
55
56
57 get [-p property] protocol
58
59 Get the property values for the specified protocol. If no -p option
60 is provided, get all the properties for the specified protocol. For
61 NFS, properties correspond to entries in the /etc/default/nfs file.
62 See nfs(4).
63
64
65 set [-p property=value]... protocol
66
67 Set properties for the specified file sharing protocol.
68
69
70 status [protocol]
71
72 Display status of the specified protocol, or, if no protocol is
73 specified, of all file-sharing protocols.
74
75
77 Example 1 Setting a Property
78
79
80 The following command sets the minimum version of the server NFS proto‐
81 col to version 3.
82
83
84 % sharectl -p server_versmin=3 nfs
85
86
87
88 Example 2 Getting Properties
89
90
91 The following command gets the properties for the NFS protocol.
92
93
94 % sharectl get nfs
95 lockd_listen_backlog=32
96 lockd_servers=20
97 lockd_retransmit_timeout=5
98 grace_period=90
99 nfsmapid_domain=sun.com
100 servers=16
101 server_versmin=2
102 server_versmax=4
103 max_connections=-1
104
105
106
107
108 The following command gets the value of the grace_period property for
109 the NFS protocol.
110
111
112 % sharectl get -p grace_period nfs
113 grace_period=90
114
115
116
117 Example 3 Obtaining Status
118
119
120 The following command obtains the status of all file-sharing protocols
121 on a system.
122
123
124 % sharectl status
125 nfs enabled
126
127
128
129 Example 4 Configuring Global Settings
130
131
132 The following command shows how an authorized user can use sharectl
133 commands to configure global settings for the ex.com environment in the
134 service management facility (SMF). See nsmbrc(4) for a description of
135 the example environment, ex.com. See smf(5) for a description of the
136 SMF.
137
138
139 # sharectl set -p section=default -p workgroup=SALES \
140 -p timeout=5 smbfs
141 # sharectl set -p section=FSERVER -p addr=fserv.ex.com smbfs
142 # sharectl set -p section=RSERVER -p workgroup=REMGROUP \
143 -p addr=rserv.ex.com smbfs
144 # sharectl set -p section=RSERVER:george -p timeout=30 smbfs
145 # sharectl set -p section="SSERV:*:POKY" -p addr=sserv.ex.com \
146 -p timeout=25 smbfs
147
148
149
150 Example 5 Displaying Current Settings
151
152
153 The following command shows how an authorized user can use the sharectl
154 get command to view the global settings for smbfs in the SMF. The val‐
155 ues shown are those set by the previous example.
156
157
158 % # sharectl get smbfs
159 [default]
160 workgroup=SALES
161 timeout=5
162 [FSERVER]
163 addr=fserv.ex.com
164 [RSERVER]
165 workgroup=REMGROUP
166 addr=rserv.ex.com
167 [RSERVER:george]
168 timeout=30
169 [SSERV:*:POKY]
170 addr=sserv.ex.com
171 timeout=25
172
173
174
176 0 Successful completion.
177
178
179 non-zero Command failed.
180
181
183 /usr/include/libshare.h Error codes used for exit status.
184
185
187 See attributes(5) for descriptions of the following attributes:
188
189
190
191
192 ┌─────────────────────────────┬─────────────────────────────┐
193 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
194 ├─────────────────────────────┼─────────────────────────────┤
195 │Availability │SUNWcsu │
196 ├─────────────────────────────┼─────────────────────────────┤
197 │Interface Stability │Committed │
198 └─────────────────────────────┴─────────────────────────────┘
199
201 sharemgr(1M), nfs(4), nsmbrc(4), user_attr(4), attributes(5), rbac(5),
202 smb(4), smf(5), standards(5)
203
204
205
206SunOS 5.11 16 Mar 2009 sharectl(1M)