'\" te .\" Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. .TH sharectl 1M "19 May 2015" "SunOS 5.11" "System Administration Commands" .SH NAME sharectl \- configure and manage file sharing service .SH SYNOPSIS .LP .nf \fBsharectl\fR [\fB-h\fR] .fi .LP .nf \fBsharectl\fR status [\fB-h\fR] [\fIprotocol\fR] .fi .LP .nf \fBsharectl\fR get [\fB-h\fR] [\fB-p\fR \fIproperty\fR]... \fIprotocol\fR .fi .LP .nf \fBsharectl\fR set [\fB-h\fR] [\fB-p\fR \fIproperty\fR=\fIvalue\fR]... \fIprotocol\fR .fi .SH DESCRIPTION .sp .LP The \fBsharectl\fR 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 protocol service. .sp .LP The \fBget\fR and \fBset\fR subcommands (see below) require root privileges. An authorized user can use \fBsharectl\fR to set global values for NFS and SMB properties in the Solaris server management facility. See \fBnfs\fR(4) and \fBsmb\fR(4). .SS "Interaction with Location Profiles" .sp .LP The \fBnfsmapid_domain\fR property is managed in Location profiles (refer to \fBnetcfg\fR(1M)) for more information about location profiles). These profiles are either fixed, meaning the network configuration is being managed in the traditional way, or reactive, meaning the network configuration is being managed automatically, reacting to changes in the network environment according to policy rules specified in the profiles. .sp .LP When a fixed location (there can currently be only one, the \fBDefaultFixed\fR location) is active, changes made to the SMF repository, including those made by \fBsharectl\fR, will be applied to the location when it is disabled, and thus will be restored if that location is later re-enabled. .sp .LP 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 disabled, or if the system's network configuration, as managed by \fBsvc:/network/physical:default\fR and \fBsvc:/network/location:default\fR, is refreshed or restarted. Changes should instead be applied to the location itself, using the \fBnetcfg\fR(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). .sp .LP The \fBnfsmapid_domain\fR setting is stored in the \fBnfsv4-domain\fR property of a location profile. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .mk .na \fB\fB-h\fR\fR .ad .sp .6 .RS 4n Displays usage message. .RE .sp .ne 2 .mk .na \fB\fB-p\fR \fIproperty\fR[=\fIvalue\fR]\fR .ad .sp .6 .RS 4n Specifies a property. See "Subcommands," below. .RE .SS "Subcommands" .sp .LP \fBsharectl\fR supports the subcommands described below. The form of a \fBsharectl\fR command is: .sp .in +2 .nf # \fBsharectl \fIsubcommand\fR [\fIoption\fR]\fR .fi .in -2 .sp .sp .ne 2 .mk .na \fB\fBget\fR [\fB-p\fR\ \fIproperty\fR] \fIprotocol\fR\fR .ad .sp .6 .RS 4n Get the property values for the specified protocol. If no \fB-p\fR option is provided, get all the properties for the specified protocol. .RE .sp .ne 2 .mk .na \fB\fBset\fR [\fB-p\fR\ \fIproperty\fR=\fIvalue\fR]... \fIprotocol\fR\fR .ad .sp .6 .RS 4n Set properties for the specified file sharing protocol. .RE .sp .ne 2 .mk .na \fB\fBstatus\fR [\fIprotocol\fR]\fR .ad .sp .6 .RS 4n Display status of the specified protocol, or, if no protocol is specified, of all file-sharing protocols. .RE .SH EXAMPLES .LP \fBExample 1 \fRGetting Properties .sp .LP The following command gets the properties for the NFS protocol. .sp .in +2 .nf % \fBsharectl get nfs\fR 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 .fi .in -2 .sp .sp .LP The following command gets the value of the grace_period property for the NFS protocol. .sp .in +2 .nf % \fBsharectl get -p grace_period nfs\fR grace_period=90 .fi .in -2 .sp .LP \fBExample 2 \fRSetting a Property .sp .LP Note in the preceding example that the minimum version of the server NFS protocol (\fBserver_versmin\fR) is set to \fB2\fR. The following command sets the minimum version number to version 3. .sp .in +2 .nf % \fBsharectl set -p server_versmin=3 nfs\fR .fi .in -2 .sp .LP \fBExample 3 \fRObtaining Status .sp .LP The following command obtains the status of all file-sharing protocols on a system. .sp .in +2 .nf % \fBsharectl status\fR nfs enabled .fi .in -2 .sp .LP \fBExample 4 \fRSetting Property for SMB Server .sp .LP The following command sets the value of the \fBserver_signing_required\fR property for the SMB protocol. .sp .in +2 .nf % \fBsharectl set -p server_signing_required=true smb\fR .fi .in -2 .sp .LP \fBExample 5 \fRSetting Property for SMB Client .sp .LP The following command sets the value of the \fBclient_signing_required\fR property for the SMB protocol. .sp .in +2 .nf % \fBsharectl set -p client_signing_required=true smb\fR .fi .in -2 .sp .LP \fBExample 6 \fRSetting Tracing of RPC Calls for \fBautofs\fR .sp .LP The following command expands each RPC call to \fBautofs\fR and logs it to the location specified for that service in \fBautomountd\fR(1M). .sp .in +2 .nf # \fBsharectl set trace=1 autofs\fR .fi .in -2 .sp .LP \fBExample 7 \fRRequiring Client to Use a Reserved Port for NFS Calls Shared With \fBAUTH_SYS\fR .sp .LP The following command requires client to use a reserved port for NFS calls shared with \fBAUTH_SYS\fR. .sp .in +2 .nf # \fBsharectl set -p resvport=on nfs\fR .fi .in -2 .sp .SH EXIT STATUS .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 12n .rt Successful completion. .RE .sp .ne 2 .mk .na \fB\fInon-zero\fR\fR .ad .RS 12n .rt Command failed. .RE .SH FILES .sp .ne 2 .mk .na \fB\fB/usr/include/libshare.h\fR\fR .ad .RS 27n .rt Error codes used for exit status. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitysystem/core-os _ Interface StabilityCommitted .TE .SH SEE ALSO .sp .LP \fBautomount\fR(1M), \fBautomountd\fR(1M), \fBlockd\fR(1M), \fBmountd\fR(1M), \fBnetcfg\fR(1M), \fBnfsd\fR(1M), \fBnfsmapid\fR(1M), \fBnfs\fR(4), \fBsmb\fR(4), \fBuser_attr\fR(4), \fBattributes\fR(5), \fBrbac\fR(5), \fBsmf\fR(5), \fBstandards\fR(5)