sharectl - configure and manage file sharing service sharectl
-
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 and SMB. The command sets the client and server operational properties, takes and restores configuration snapshots, and gets status of the pro- tocol service. The get and set subcommands (see below) require root privileges. An authorized user can use sharectl to set global values for NFS and SMB properties in the Solaris server management facility. See nfs(4) and smb(4). Interaction with Location Profiles The nfsmapid_domain property is managed in Location profiles (refer to netcfg(1M)) for more information about location profiles). These pro- files are either fixed, meaning the network configuration is being man- aged in the traditional way, or reactive, meaning the network configu- ration is being managed automatically, reacting to changes in the net- work environment according to policy rules specified in the profiles. When a fixed location (there can currently be only one, the Default- Fixed location) is active, changes made to the SMF repository, includ- ing those made by sharectl, will be applied to the location when it is disabled, and thus will be restored if that location is later re- enabled. When a reactive location is active, changes should not be applied directly to the SMF repository; these changes will not be preserved in the location profile, and will thus be lost if the location is dis- abled, or if the system's network configuration, as managed by svc:/network/physical:default and svc:/network/location:default, is refreshed or restarted. Changes should instead be applied to the loca- tion itself, using the netcfg(1M) command; this will save the change to the location profile repository, and will also apply it to the SMF repository (if the change is made to the currently active location). The nfsmapid_domain setting is stored in the nfsv4-domain property of a location profile. 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. set [-p property=value]... protocol Set properties for the specified file sharing protocol. status [protocol] Display status of the specified protocol, or, if no protocol is specified, of all file-sharing protocols. EXAMPLES Example 1 Getting Properties The following command gets the properties for the NFS protocol. % sharectl get nfs servers=1024 lockd_listen_backlog=32 lockd_servers=1024 lockd_retransmit_timeout=5 grace_period=90 server_versmin=2 server_versmax=4 client_versmin=2 client_versmax=4 server_delegation=on nfsmapid_domain=oracle.com server_numeric_stringid=true max_connections=-1 protocol=ALL listen_backlog=32 device= resvport=off 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 2 Setting a Property Note in the preceding example that the minimum version of the server NFS protocol (server_versmin) is set to 2. The following command sets the minimum version number to version 3. % sharectl set -p server_versmin=3 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 Setting Property for SMB Server The following command sets the value of the server_signing_required property for the SMB protocol. % sharectl set -p server_signing_required=true smb Example 5 Setting Property for SMB Client The following command sets the value of the client_signing_required property for the SMB protocol. % sharectl set -p client_signing_required=true smb Example 6 Setting Tracing of RPC Calls for autofs The following command expands each RPC call to autofs and logs it to the location specified for that service in automountd(1M). # sharectl set trace=1 autofs Example 7 Requiring Client to Use a Reserved Port for NFS Calls Shared With AUTH_SYS The following command requires client to use a reserved port for NFS calls shared with AUTH_SYS. # sharectl set -p resvport=on nfs 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 attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |system/core-os | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ SEE ALSO automount(1M), automountd(1M), lockd(1M), mountd(1M), netcfg(1M), nfsd(1M), nfsmapid(1M), nfs(4), smb(4), user_attr(4), attributes(5), rbac(5), smf(5), standards(5) SunOS 5.11 19 May 2015 sharectl(1M)
© Lightnetics 2024