標籤:
一般Mac共用通過配置wins,smb即可實現。注意在同一個工作群組!
參考:http://computers.tutsplus.com/tutorials/how-to-set-up-an-smb-server-in-os-x-and-windows-8--mac-46276
無奈配置後,各種折騰,xp始終無法訪問共用資源。(win7居然可以訪問,也只聽見蛋碎的聲音)。
解決辦法: 安裝samba3, 關閉wins smb服務。通過自己配置的samba開共用
1.從App Store中安裝 Xcode6.2
2.下載Xcode 命令列工具
3.下載並安裝MacPorts (http://www.cnblogs.com/iclk/p/4342096.html)
4.安裝samba3
sudo port install samba3
5.配置samba
sudo smbpasswd -a username
vim /opt/local/etc/samba3/smb.conf
如果沒有smb.conf,則根據smb.conf.sample 拷貝一份
[chulk]comment = chulkpath = /Users/chulkavailable = yesguest ok = yescreate mask = 644directory mask = 755read only = no
6.配置自啟動
vim /Library/LaunchDaemons/org.samba.smbd.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.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>
7.關閉Apple‘s WINS services
sudo launchctl stop com.apple.netbiosdsudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.netbiosd.plist
8. samba加入自啟動
sudo launchctl load /Library/LaunchDaemons/org.samba.smbd.plist
參考 http://hints.macworld.com/article.php?story=20120401160655922
samba server on Mac OS X Lion Server