brew install samba
I created directories for sharing at /Users/SharedFolder
I created my samba config at /usr/local/etc/smb.conf (default path)
# /usr/local/etc/smb.conf
[global]
server string = Samba Server Version %v
security = user
passdb backend = tdbsam:/usr/local/etc/passdb.tdb
map to guest = Bad user
[SharedFolder]
path = /Users/SharedFolder
valid users = share
write list = share
Create a user in System Preferences
-> Users & Groups
named share
. It can be a Sharing Only
user rather than Standard or Administrator.
Make sure that the share
user owns the SharedFolder
directory
Samba users must be real users on your system. You cannot make up fake users. That is why we created the share
. share
is explicitly for authenticating against our system over Samba
You can set a Samba password for the share
like so.
smbpasswd -a share
curl -s https://gist.githubusercontent.com/oceanyeo/949a91fee4f81675817848ceba4e4bc7/raw/setup.sh | bash