samba server on Mac OS X Lion Server

來源:互聯網
上載者:User

標籤:

一般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

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.