1 SHARECTL(1M)                 Maintenance Commands                 SHARECTL(1M)
   2 
   3 NAME
   4      sharectl - configure and manage file sharing services
   5 
   6 SYNOPSIS
   7      sharectl subcommand [-h]
   8      sharectl delsect section protocol
   9      sharectl get [-p property]... protocol
  10      sharectl set {-p property=value}... protocol
  11      sharectl status [protocol]
  12 
  13 DESCRIPTION
  14      The sharectl command operates on file sharing services. The command sets
  15      the client and server operational properties, takes and restores
  16      configuration snapshots, and gets status of the protocol service.
  17      Currently supported services are autofs(4), nfs(4), smb(4) and smbfs.
  18 
  19      The set subcommand requires root privileges or that you assume the
  20      Primary Administrator role.
  21 
  22      A non-privileged user can change the persistent settings when granted
  23      required authorizations, see appropriate sharing protocol man page.
  24 
  25    Options
  26      The following options are supported where applicable:
  27 
  28      -h      Displays usage message. Supported for all subcommands.
  29 
  30      -p property[=value]
  31              Specifies a property. See Subcommands, below.
  32 
  33    Subcommands
  34      sharectl supports the subcommands described below:
  35 
  36      sharectl delsect section protocol
  37              Delete configuration section for the specified protocol.
  38              Currently only protocol that has configuration sections is smbfs
  39              (see nsmbrc(4) and EXAMPLES).
  40 
  41      sharectl get [-p property]... protocol
  42              Get the property values for the specified protocol. If no -p
  43              option is provided, get all the properties for the specified
  44              protocol. For NFS, properties correspond to entries in the
  45              /etc/default/nfs file. See nfs(4).
  46 
  47      sharectl set {-p property=value}... protocol
  48              Set properties for the specified file sharing protocol.
  49 
  50      sharectl status [protocol]
  51              Display status of the specified protocol, or, if no protocol is
  52              specified, of all file sharing protocols.
  53 
  54 FILES
  55      /usr/include/libshare.h
  56              Error codes used for exit status.
  57 
  58 EXIT STATUS
  59      0       Successful completion.
  60 
  61      non-zero
  62              Command failed.
  63 
  64 EXAMPLES
  65      Example 1 Setting a Property
  66              The following command sets the minimum version of the server NFS
  67              protocol to version 3.
  68 
  69              # sharectl -p server_versmin=3 nfs
  70 
  71      Example 2 Getting Properties
  72              The following command gets the properties for the NFS protocol.
  73 
  74              # sharectl get nfs
  75              lockd_listen_backlog=32
  76              lockd_servers=256
  77              lockd_retransmit_timeout=5
  78              grace_period=90
  79              nfsmapid_domain=sun.com
  80              servers=1024
  81              server_versmin=2
  82              server_versmax=4
  83              max_connections=-1
  84 
  85              The following command gets the value of the grace_period property
  86              for the NFS protocol.
  87 
  88              # sharectl get -p grace_period nfs
  89              grace_period=90
  90 
  91      Example 3 Obtaining Status
  92              The following command obtains the status of all file-sharing
  93              protocols on a system.
  94 
  95              # sharectl status
  96              nfs      enabled
  97 
  98      Example 4 Configuring Global Settings
  99              The following command shows how an authorized user can use
 100              sharectl commands to configure global settings for the ex.com
 101              environment in the service management facility (SMF).  See
 102              nsmbrc(4) for a description of the example environment, ex.com.
 103              See smf(5) for a description of the SMF.
 104 
 105              # sharectl set -p section=default -p workgroup=SALES \
 106                -p timeout=5 smbfs
 107              # sharectl set -p section=FSERVER -p addr=fserv.ex.com smbfs
 108              # sharectl set -p section=RSERVER -p workgroup=REMGROUP \
 109                -p addr=rserv.ex.com smbfs
 110              # sharectl set -p section=RSERVER:george -p timeout=30 smbfs
 111              # sharectl set -p section="SSERV:*:POKY" -p addr=sserv.ex.com \
 112                -p timeout=25 smbfs
 113 
 114      Example 5 Displaying Current Settings
 115              The following command shows how an authorized user can use the
 116              sharectl get command to view the global settings for smbfs in the
 117              SMF. The values shown are those set by the previous example.
 118 
 119              # sharectl get smbfs
 120              [default]
 121              workgroup=SALES
 122              timeout=5
 123              [FSERVER]
 124              addr=fserv.ex.com
 125              [RSERVER]
 126              workgroup=REMGROUP
 127              addr=rserv.ex.com
 128              [RSERVER:george]
 129              timeout=30
 130              [SSERV:*:POKY]
 131              addr=sserv.ex.com
 132              timeout=25
 133 
 134 INTERFACE STABILITY
 135      Committed
 136 
 137 SEE ALSO
 138      sharemgr(1M), autofs(4), nfs(4), nsmbrc(4), smb(4), user_attr(4),
 139      attributes(5), rbac(5), smf(5), standards(5)
 140 
 141 illumos                        December 16, 2016                       illumos