• samba server on Mac OS X Lion Server


    一般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 = chulk
    path = /Users/chulk
    available = yes
    guest ok = yes
    create mask = 644
    directory mask = 755
    read 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.netbiosd
    sudo 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

  • 相关阅读:
    剑指 Offer 05. 替换空格
    28. 实现 strStr()
    67. 二进制求和
    排序算法之二快速排序
    排序算法之一冒泡排序
    将本地文件上传到GitHub
    spring data jpa 操作pipelinedb 的continuous view 与stream
    pipelinedb学习笔记
    PostgreSQL 、springboot 、spring data jpa 集成
    pipelineDB学习笔记-2. Stream (流)
  • 原文地址:https://www.cnblogs.com/iclk/p/4342370.html
Copyright © 2020-2023  润新知