This is compiled from many sources and works with me.
- Install MacPorts (and XCode 4.1 before), there is a dmg for Lion at http://www.macports.org/install.php
- in Terminal > sudo port -d sync
- in Terminal > sudo port install samba3 I had to do it twice to go right
- in Terminal > sudo cp /opt/local/etc/samba3/smb.conf.sample \
/opt/local/etc/samba3/smb.conf to copy the sample-config-file - I like nano, that’s why I put in Terminal > sudo nano /opt/local/etc/samba3/smb.conf
Now you have to edit your shares: - in Terminal > sudo nano /Library/LaunchDaemons/org.samba.smbd.plist and paste the follow text in it:
- in Terminal > sudo nano /Library/LaunchDaemons/org.samba.nmbd.plist and paste the follow text in it:
- disable in System Preferences – Sharing – Options: SMB
- disable netbiosd-Daemon:
sudo launchctl stop com.apple.netbiosd
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.netbiosd.plist - start samba:
sudo launchctl load /Library/LaunchDaemons/org.samba.smbd.plist
sudo launchctl load /Library/LaunchDaemons/org.samba.nmbd.plist
[global]
workgroup = WORKGROUP
server string = myServer
|
[Music]
comment = Music
path = /Users/theUser/Music
available = yes
guest ok = yes
create mask = 644
directory mask = 755
read only = no
|
In nano to save press ^-X and y and enter the path which is given
<?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> <false/> <key>ProgramArguments</key> <array> <string>/opt/local/sbin/smbd</string> <string>-F</string> </array> <key>RunAtLoad</key> <true/> <key>ServiceDescription</key> <string>samba</string> </dict> </plist> |
<?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> |
Sometimes there is the need of a user and a password, for this type in terminal
>sudo smbpasswd -a <username>
You have to put in your password and that’s it!
To uninstall samba or macports see MacPort Guide
I found out, it is better to give the Server another name, not the sharing name in the Pref Panel
2 comments so far, add yours ▶