On macOS 10.13 (and possibly earlier versions), the names of shares are controlled by
.plist files in
/private/var/db/dslocal/nodes/Default/sharepoints/, with one file per share.
To change the name of a share requires changing the
ftp_name keys in the .plist file, and renaming the file for good measure. There are various ways to do this, including using Xcode or TextWrangler to edit the .plist file, but it is fiddly because the sharepoint directory is only accessible by root.
The easiest way is probably to use a little script like this one to make the necessary changes:
# Usage: rename-share oldname newname
if [ ! -f "$OLDNAME".plist ] ; then
echo "No share named $OLDNAME found." 1>&2
if [ -z "$NEWNAME" ] ; then
echo "Must specify new name" 1>&2
mv "$OLDNAME".plist "$NEWNAME".plist
for key in ftp_name afp_name smb_name name ; do
defaults write /private/var/db/dslocal/nodes/Default/sharepoints/"$NEWNAME" $key -array "$NEWNAME"
To use it, save that to (say)
chmod a+x ~/bin/rename-share to make it executable, then use it like this (assuming that John Doe's public folder is currently shared as "Public"):
$ sudo ~/bin/rename-share "Public" "John Doe's Public Folder"