zoukankan      html  css  js  c++  java
  • openwrt 设置samba服务器与pc共享文件

    1,安装samba36-server和luci-app-samba

    opkg install samba36-server luci-app-samba 

    Openwrt的samba配置是先读取/etc/config/samba,结合/etc/samba/smb.conf.template文件,生成 配置文件/etc/samba/smb.conf,用户只需修改/etc/config/samba和/etc/samba /smb.conf.template文件,然后设置samba用户与密码。

    2,编辑/etc/config/samba如下

    config samba
            option 'name'                   'OpenWrt'
            option 'workgroup'              'WORKGROUP'
            option 'description'            'OpenWrt'
            option 'homes'                  '1'
    config sambashare
            option 'name'                   'openwrt'      ###在pc共享文件夹显示的共享名字
            option 'path'                   '/usr/lib'    ##共享路径
            option 'writable'               'yes'      ##可写
            option 'read_only'              'no'
            option 'create_mask'            '0777'

    3,修改/etc/samba/smb.conf.template,注释掉root那行,使之跳过身份验证

    root@OpenWrt:~# vim /etc/config/samba
    [global]
            netbios name = |NAME|
            display charset = |CHARSET|
            interfaces = |INTERFACES|
            server string = |DESCRIPTION|
            unix charset = utf-8
            workgroup = |WORKGROUP|
            browseable = yes
            deadtime = 30
            domain master = yes
            encrypt passwords = true
            enable core files = no
            guest account = nobody
            guest ok = yes
    #       invalid users = root
            local master = yes
            load printers = no
            map to guest = Bad User
            max protocol = SMB2
            min receivefile size = 16384
            null passwords = yes
            obey pam restrictions = yes
            os level = 20
            passdb backend = smbpasswd
            preferred master = yes
            printable = no
            security = user
            smb encrypt = disabled
            smb passwd file = /etc/samba/smbpasswd
            socket options = TCP_NODELAY IPTOS_LOWDELAY
            syslog = 2
            use sendfile = yes
            writeable = yes
    4.重启samba

    /etc/init.d/samba restart

    5, pc添加网络驱动器映射

    -->

    完成后就可以同步浏览和修改openwrt上的数据了

  • 相关阅读:
    MS CRM 2011 C#中获取Web Resource
    MS CRM 2011 Form与Web Resource在JScript中的相互调用
    MS CRM 2011 JScript操作lookup control
    MS CRM 2011 导出Ribbon的定义
    MS CRM 2011 为64位Outlook安装Silverlight
    MS CRM 2011 JScript getValue 与 setValue方法
    MS CRM 2011 在JScript中同步和异步使用REST Endpoint
    C#实现全局快捷键(系统热键)响应(转)
    程序隐藏启动的C#实现经验
    WinForm程序启动时不显示主窗体
  • 原文地址:https://www.cnblogs.com/thinkinglife/p/5232503.html
Copyright © 2011-2022 走看看