Sharing the database folders on a macOS server via Samba is only required if you intend to have clients running Windows, as Windows does not natively support connecting to NFS shares. However, the implementation of Samba that is natively bundled with macOS does not work with Harmony Server. Therefore, to make your macOS-based Harmony database server accessible from Windows clients, you must disable the implementation of Samba that is bundled with macOS, and then install and configure the open source implementation of Samba instead. The most straightforward way is to install the open source implementation of Samba is by using the MacPorts package manager.
After that, you will need to:
- Configure a Samba share for each database and scene data folder on your server, as well as for the Harmony installation itself.
- Creating a Samba username and password, which will be needed to access the Samba shares from a remote computer.
- Creating and activating launch daemons for Samba, so that it automatically runs in the background when the computer is running.
- Open the Apple menu and select System Preferences.
- Click on Sharing.
- In the list to the left, if File Sharing is unchecked, then SMB is implicitly disabled. If File Sharing is checked, select it.
- Click on Options.
- Make sure that Share files and folders using SMB is unchecked.
- Click on Done.
- Close the Sharing panel.
- First, make sure MacPorts is installed on your machine. To download and install MacPorts, go to https://www.macports.org.
-
Open a terminal and enter the following command to install the Xcode command line utilities, which are required by MacPorts to compile Samba:
$ sudo xcode-select --install
- A dialog will appear. Follow the instructions to confirm and proceed with the installation of the Xcode command line utilities.
-
In the terminal, type in the following command to install Samba using MacPorts:
$ sudo port install samba3
-
Confirm the installation of samba3 and its dependencies.
Once the installation is done, the binaries and configuration files for Samba will be installed in /opt/local.
NOTES- By default, this implementation of Sambe is not configured to run in the background as a service. The steps below will help you configure Samba and make it run as a background service that will launch on boot.
- The Samba binary directories will not be in your $PATH environment variable by default. Hence, unless you manually add the directories /opt/local/bin and /opt/local/sbin to your $PATH environment variable, the steps to configuring and testing Samba will require you to type the full path to each binary you run in the terminal.
-
In a terminal, open the Samba configuration file to configure Samba and add your database directories as Samba shares:
$ vi /opt/local/etc/samba3/smb.conf
- Add the following block to the file to set the global options for the Samba server:
[global]
encrypt passwords = yes
blocking locks = no
oplocks = no
level2 oplocks = no
follow symlinks = yes
unix extensions = no
wide links = yes
-
Add the following to make your Harmony configuration files and binaries accessible to the client:
[usa] comment = Harmony Binaries and Configuration browseable = yes read only = no guest ok = no create mask = 0777 directory mask = 0777 path = /Applications/Toon Boom Harmony 24 [Edition]/Harmony [Edition].app/Contents/tba
-
Add the following to make your Harmony Server database files accessible to the client:
-
On macOS 10.15 (Catalina) and later:
[USA_DB] comment = Harmony Database browseable = yes read only = no guest ok = no create mask = 0777 directory mask = 0777 path = /System/Volumes/Data/USA_DB
-
On macOS 10.14 (Mojave) and earlier:
[USA_DB] comment = Harmony Database browseable = yes read only = no guest ok = no create mask = 0777 directory mask = 0777 path = /USA_DB
-
-
If your server has a scene data folder, add a similar network share configuration to make them accessible to the client as well, where <scene data folder name> is the name of that folder, and ### is the number of that folder.
-
On macOS 10.15 (Catalina) and later:
[<scene data folder name>] comment = Harmony Scene Data ### browseable = yes read only = no guest ok = no create mask = 0777 directory mask = 0777 path = /System/Volumes/Data/<scene data folder name>
For example, if you have a scene data folder named usadata000, you would need to add the following:
[usadata000] comment = Harmony Scene Data 000 browseable = yes read only = no guest ok = no create mask = 0777 directory mask = 0777 path = /System/Volumes/Data/usadata000
-
On macOS 10.14 (Mojave) and earlier:
[<scene data folder name>] comment = Harmony Scene Data ### browseable = yes read only = no guest ok = no create mask = 0777 directory mask = 0777 path = /<scene data folder name>
.For example, if you have a scene data folder named usadata000, you would need to add the following:
[usadata000] comment = Harmony Scene Data 000 browseable = yes read only = no guest ok = no create mask = 0777 directory mask = 0777 path = /usadata000
-
- Save and quit.
-
Verify that Samba understands the parameters in its configuration file with the following command:
$ /opt/local/bin/testparm
-
A local user must be added to the list of users with access to the Samba shares. To do this, type in the following command, where <username> is replaced by the name of a user that has access to this computer:
$ sudo /opt/local/bin/smbpasswd -a <username>
For example, to give access to user usabatch, type in the following command:
$ sudo /opt/local/bin/smbpasswd -a usabatch
You will be prompted to assign a password to this new user, then to confirm it. This username and password will be used to connect to the Samba shares.
NOTES- The user you are adding to the list of Samba users must already exist as a regular macOS user account that has access to this computer.
- On Windows clients, when using the Configuration Wizard to configure Harmony database clients, you must enter this user's username and password in order to be able to connect to the database shares.
-
Enter the following command to create the Samba launch daemon:
$ sudo vi /Library/LaunchDaemons/org.samba.smdb.plist
-
Copy and paste the following text in the editor:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>org.samba.smbd</string> <key>OnDemand</key> <true/> <key>ProgramArguments</key> <array> <string>/opt/local/sbin/smbd</string> <string>-Fs</string> <string>/opt/local/etc/samba3/smb.conf</string> </array> <key>RunAtLoad</key> <true/> <key>ServiceDescription</key> <string>samba</string> </dict> </plist>
- Save and quit.
-
Enter the following command to create the NetBIOS name server daemon:
$ sudo vi /Library/LaunchDaemons/org.samba.nmdb.plist
-
Copy and paste the following text in the editor:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>org.samba.nmbd</string> <key>OnDemand</key> <false/> <key>ProgramArguments</key> <array> <string>/opt/local/sbin/nmbd</string> <string>-F</string> </array> <key>RunAtLoad</key> <true/> <key>ServiceDescription</key> <string>netbios</string> </dict> </plist>
- Save and quit.
-
For security reasons, the filemode for the launch daemons must be set so that only administrators can edit them, otherwise macOS will ignore them:
$ sudo chmod 644 /Library/LaunchDaemons/org.samba.smdb.plist
$ sudo chmod 644 /Library/LaunchDaemons/org.samba.nmdb.plist
-
Now enable both services:
$ sudo launchctl load /Library/LaunchDaemons/org.samba.smdb.plist
$ sudo launchctl load /Library/LaunchDaemons/org.samba.nmdb.plist
At this point, your Samba server should be fully operational and your network shares should be accessible from other computers on your local network.
-
You can test that access to your server using Samba is working by trying to get a list of your server’s Samba shares from another computer, using the method for that computer’s operating system:
- On macOS: By opening Finder, then selecting Go > Connect to Server in the top menu, and typing smb://<server name> in the address field.
- On Windows: By typing opening an Explorer window and typing \\<server name> in the address bar.
In both cases, <server name> is the hostname of your server.
-
When prompted for a username and password, type in the username and password you entered when you created a Samba user in the previous steps.
If you have sucessfully authenticated, you should then see a list of all the Samba shares you configured (i.e.: usa, USA_DB, usadata000, etc.).
- Try to select one of the available network shares, and see if you can access it.
Comments
0 comments
Article is closed for comments.