Citation :
Figure 2-4. Mac OS X sharing preferences
If you decide to install Samba yourself on Mac OS X, it's best not to stomp on the installation provided with the OS. Use the procedures detailed earlier in this chapter to install the software into /usr/local/samba or some other area unaffected by OS upgrades. (Remember to set up users with smbpasswd if you're using encrypted passwords, as described earlier in this chapter. This step is handled automatically with entries in /var/db/samba/hash if you're using the built-in server on Mac OS X.) Once you've got that working, you can edit the Samba startup item script to refer to your installation, like this:
#!/bin/sh
# Start Samba
. /etc/rc.common
if [ "${SMBSERVER:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Starting SMB server"
if [ -f /usr/local/samba/lib/smb.conf ]; then
/usr/local/samba/bin/smbd -D
/usr/local/samba/bin/nmbd -D
fi
fi
However, beware of OS updates, which can wipe out your changes. One solution is to make the script immutable, like this:
# chflags uchg /System/Library/StartupItems/Samba/Samba
|