SHARECTL(1M) Maintenance Commands SHARECTL(1M)

configure and manage file sharing services

sharectl subcommand [-h]

sharectl delsect section protocol

sharectl get [-p property]... protocol

sharectl set {-p property=value}... protocol

sharectl status [protocol]

The sharectl command operates on file sharing services. The command sets the client and server operational properties, takes and restores configuration snapshots, and gets status of the protocol service. Currently supported services are autofs(4), nfs(4), smb(4) and smbfs.

The set subcommand requires root privileges or that you assume the Primary Administrator role.

A non-privileged user can change the persistent settings when granted required authorizations, see appropriate sharing protocol man page.

The following options are supported where applicable:
Displays usage message. Supported for all subcommands.
Specifies a property. See Subcommands, below.

sharectl supports the subcommands described below:
sharectl delsect section protocol
Delete configuration section for the specified protocol. Currently only protocol that has configuration sections is smbfs (see nsmbrc(4) and EXAMPLES).
sharectl get [-p property]... protocol
Get the property values for the specified protocol. If no -p option is provided, get all the properties for the specified protocol. For NFS, properties correspond to entries in the /etc/default/nfs file. See nfs(4).
sharectl set {-p property=value}... protocol
Set properties for the specified file sharing protocol.
sharectl status [protocol]
Display status of the specified protocol, or, if no protocol is specified, of all file sharing protocols.

Error codes used for exit status.

Successful completion.
Command failed.

Example 1 Setting a Property
The following command sets the minimum version of the server NFS protocol to version 3.
# sharectl -p server_versmin=3 nfs
Example 2 Getting Properties
The following command gets the properties for the NFS protocol.
# sharectl get nfs

The following command gets the value of the grace_period property for the NFS protocol.

# sharectl get -p grace_period nfs
Example 3 Obtaining Status
The following command obtains the status of all file-sharing protocols on a system.
# sharectl status
nfs      enabled
Example 4 Configuring Global Settings
The following command shows how an authorized user can use sharectl commands to configure global settings for the environment in the service management facility (SMF). See nsmbrc(4) for a description of the example environment, See smf(5) for a description of the SMF.
# sharectl set -p section=default -p workgroup=SALES \
  -p timeout=5 smbfs
# sharectl set -p section=FSERVER -p smbfs
# sharectl set -p section=RSERVER -p workgroup=REMGROUP \
  -p smbfs
# sharectl set -p section=RSERVER:george -p timeout=30 smbfs
# sharectl set -p section="SSERV:*:POKY" -p \
  -p timeout=25 smbfs
Example 5 Displaying Current Settings
The following command shows how an authorized user can use the sharectl get command to view the global settings for smbfs in the SMF. The values shown are those set by the previous example.
# sharectl get smbfs


sharemgr(1M), autofs(4), nfs(4), nsmbrc(4), smb(4), user_attr(4), attributes(5), rbac(5), smf(5), standards(5)
December 16, 2016 OmniOS