.\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples. .\"See Also: .\"man mdoc.samples for a complete listing of options .\"man mdoc for the short list of editing options .\"/usr/share/misc/mdoc.template .Dd Thu February 17 2017 \" DATE .Dt sharing 8 \" Program name and manual section number .Os "macOS" \" OS - 'Mac OS X' if it requires Mac OS X features else 'Darwin' .Sh NAME \" Section Header - required - don't modify .Nm sharing .\" The following lines are read in generating the apropos(man -k) database. Use only key .\" words here as the database is built based on the words here and in the .ND line. .\" Use .Nm macro to designate other names for the documented program. .Nd create share points for smb services. .Sh SYNOPSIS \" Section Header - required - don't modify .Nm .Op Fl a Ar [options] \" [-a ] .Op Fl e Ar [options] \" [-a ] .Op Fl r Ar \" [-r ] .Op Fl l \" [-l list share points] .Sh DESCRIPTION \" Section Header - required - don't modify .Pp \" Inserts a space A list of flags and their descriptions: .Bl -tag -width -indent \" Differs from above in tag removed .It Fl a Ar \"-a flag as a list item Add a new share point for the directory specified by . .It Fl e Ar Edit the share point record specified by . .It Fl r Ar Delete the share point record specified by . .It Fl l List all existing share point records. .El \" Ends the list .Pp The following options modify share point record attributes: .Bl -tag -width -indent \" Differs from above in tag removed .It Fl S Ar Use customized name when using share points with smb. .It Fl s Ar Use this option to enable and disable sharing via smb. By default a share point is enabled for smb protocol. To enable and disable services, use the following flags as required: \ 001 (enable sharing for smb). Specify 000 to turn off sharing of a share point altogether. .It Fl g Ar Use this option to enable and disable guest access for smb. By default guest access is enabled for smb. To enable and disable guest access services, use the following flags as required: \ 001 (enable guest for smb). Specify 000 to turn off guest access for a share point altogether. .It Fl n Ar Specify a to be used as the share point record name. By default the record name is the name of the directory pointed to by the share point record. This directory is specified by the when the record is created. .It Fl R Ar <0/1> Make share read only for smb. Specify 1 to enable read only. Specify 0 to disable read only. .It Fl E Ar <0/1> Make share encrypted for smb v3 and later. Specify 1 to enable encryption. Specify 0 to disable encryption. .It Fl f Ar Only used when listing share points and only json format is supported. .El \" Ends the list .Pp .Sh EXAMPLES .Bd -literal -offset indent /usr/sbin/sharing -a /SomePath/ShareThisDirectory .Ed This example shows how to create a share point for the directory "/SomePath/ShareThisDirectory": .Bd -literal -offset indent /usr/sbin/sharing -e ShareThisDirectory -S SP1 -g 001 .Ed This example shows how to edit the share point record created above, adding a customized name "SP1" for smb services, and enabling guest access for smb. .\" .Sh ENVIRONMENT \" May not be needed .\" .Bl -tag -width "ENV_VAR_1" -indent \" ENV_VAR_1 is width of the string ENV_VAR_1 .\" .It Ev ENV_VAR_1 .\" Description of ENV_VAR_1 .\" .It Ev ENV_VAR_2 .\" Description of ENV_VAR_2 .\" .El .Sh FILES \" File used or created by the topic of the man page .Bl -tag -width "/Users/joeuser/Library/really_long_file_name" -compact .It Pa /usr/sbin/sharing location of tool .El