remove Server App share with / in it
OS10.10.2; Server 4 in File Sharing
Accidentally add a share with '/' in the share name. How to remove it?
Mac Pro, OS X Yosemite (10.10.2), Server 4.0
Newsroom Update
Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >
Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >
OS10.10.2; Server 4 in File Sharing
Accidentally add a share with '/' in the share name. How to remove it?
Mac Pro, OS X Yosemite (10.10.2), Server 4.0
What happens when you try to remove it in the usual way?
Click on it. Nothing happens. That share point is only showing in Server app. Under System Pref./Sharing, it is not there.
What do you get from this: sudo sharing -l
that share is there:
List of Share Points
name: **Ready for Print / Programming
path: /Volumes/4TB/_CCC SafetyNet/**Ready for Print : Programming
afp: {
name: **Ready for Print / Programming
shared: 1
guest access: 1
inherit perms: 0
}
ftp: {
name: **Ready for Print / Programming
shared: 0
guest access: 0
}
smb: {
name: **Ready for Print / Programming
shared: 1
guest access: 1
}
The share has since be renamed but the reference in Server App is still there. So still trying to get rid of it.
This is a major known bug in the engine of the local Open Directory database as of OS X 10.9 and later. You cannot remove any records with slashes in their names. All APIs at all system levels are failing. Apple is ignoring this issue.
You can start the server in single user mode and manually remove the corresponding file with the share record in /var/db/dslocal/nodes/Default/sharepoints . There could be some risk that the database index gets out of sync, however.
Copy and paste into a Terminal window:
sudo sharing -r '**Ready for Print / Programming'
This does not work. Still in the Server app.
Restore the folder /var/db/dslocal from a backup that predates the unwanted change, then reboot.
remove Server App share with / in it