System Administration Commands sharectl(1M) NAME sharectl - configure and manage file sharing service SYNOPSIS sharectl [-h] sharectl status [-h] [protocol] sharectl get [-h] [-p property]... protocol sharectl set [-h] [-p property=value]... protocol DESCRIPTION The sharectl command operates on file-sharing protocols, such as NFS. The command sets the client and server opera- tional properties, takes and restores configuration snapshots, and gets status of the protocol service. The get and set subcommands (see below) require root privileges or that you assume the Primary Administrator role. OPTIONS The following options are supported: -h Displays usage message. -p property[=value] Specifies a property. See "Subcommands," below. Subcommands sharectl supports the subcommands described below. The form of a sharectl command is: # sharectl subcommand [option] 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). SunOS 5.11 Last change: 13 Jul 2006 1 System Administration Commands sharectl(1M) set [-p property=value]... protocol Set properties for the specified file sharing protocol. status [protocol] Display status of the specified protocol, or, if no pro- tocol is specified, of all file-sharing protocols. EXAMPLES 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 proto- col. % sharectl get nfs lockd_listen_backlog=32 lockd_servers=20 lockd_retransmit_timeout=5 grace_period=90 nfsmapid_domain=sun.com servers=16 server_versmin=2 server_versmax=4 max_connections=-1 The following command gets the value of the grace_period property for the NFS protocol. % sharectl get -p grace_period nfs grace_period=90 Example 3 Obtaining Status SunOS 5.11 Last change: 13 Jul 2006 2 System Administration Commands sharectl(1M) The following command obtains the status of all file-sharing protocols on a system. % sharectl status nfs enabled | Example 4 Using the sharectl Command to Configure an SMB Client | | This example shows how a privileged user can use sharectl | commands to configure global settings for the ex.com | environment in SMF: | | | # sharectl set -p section=default -p workgroup=SALES \ | -p timeout=5 smb/client | # sharectl set -p section=FSERVER -p addr=fserv.ex.com smb/client | # sharectl set -p section=RSERVER -p workgroup=REMGROUP \ | -p addr=rserv.ex.com smb/client | # sharectl set -p section=RSERVER:george -p charsets=koi8-r:cp866 \ | smb/client | # sharectl set -p section="SSERV:*:POKY" -p addr=sserv.ex.com \ | -p timeout=25 smb/client | | | | Example 5 Using the sharectl Command to Show Current Set- | tings for the SMB Client | | This example shows how a privileged user can use sharectl | get command to view the global settings for smb/client in | SMF. The values shown are those set by the previous example: | | | # sharectl get smb/client | [default] | workgroup=SALES | timeout=5 | [FSERVER] | addr=fserv.ex.com | [RSERVER] | workgroup=REMGROUP | addr=rserv.ex.com | [RSERVER:george] | charsets=koi8-r:cp866 | [SSERV:*:POKY] | addr=sserv.ex.com | timeout=25 EXIT STATUS 0 Successful completion. non-zero Command failed. FILES /usr/include/libshare.h Error codes used for exit status. ATTRIBUTES See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Availability | SUNWcsu | |_____________________________|_____________________________| | Interface Stability | Evolving | |_____________________________|_____________________________| SEE ALSO sharemgr(1M), nfs(4), attributes(5), standards(5) SunOS 5.11 Last change: 13 Jul 2006 3