恩山无线论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 690|回复: 10

[N1盒子] 【已解决】flippy固件 中的网络共享Samba怎么挂载?有教程吗

[复制链接]
发表于 2020-7-27 09:27 | 显示全部楼层 |阅读模式
本帖最后由 aasdxdffff 于 2020-9-17 07:09 编辑

已解决:https://www.yuque.com/hardhead/zbu01r/otx0ni
我的恩山、我的无线 The best wifi forum is right here.
发表于 2020-7-27 09:46 | 显示全部楼层
我之前也是找了很多方法都有问题,后来在一个帖子里找到的设置方法
1、设置共享用户密码,刚开始口令文件是不存在的,先touch,再增加一个用户,ssh输入以下命令:
touch /etc/samba/smbpasswd
smbpasswd  -a root
然后输两遍要设置的SMB密码
2、修改samba模板,把字符集设置一下,启用root用户访问。
在invalidusers = root前加#
下面的允许用户填root,目录填你的共享目录的路径,只读和允许匿名不要勾选,后面的权限保持默认的0666和0777
3、重启N1或启动项里重启samba4

点评

有没有图片,我刚入门,不很清楚里面门道  详情 回复 发表于 2020-7-27 09:54
我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2020-7-27 09:54 | 显示全部楼层
本帖最后由 aasdxdffff 于 2020-7-27 10:00 编辑
叶非叶 发表于 2020-7-27 09:46
我之前也是找了很多方法都有问题,后来在一个帖子里找到的设置方法
1、设置共享用户密码,刚开始口令文件是 ...

有没有图片,我刚入门,不很清楚里面门道
QQ拼音截图20200727095814.png
samba 设置的模板
[global]
        netbios name = |NAME|
        interfaces = |INTERFACES|
        server string = |DESCRIPTION|
        unix charset = UTF-8
        workgroup = |WORKGROUP|

        ## This global parameter allows the Samba admin to limit what interfaces on a machine will serve SMB requests.
        bind interfaces only = yes

        ## time for inactive connections to-be closed in minutes
        deadtime = 15

        ## disable core dumps
        enable core files = no

        ## set security (auto, user, domain, ads)
        security = user

        ## This parameter controls whether a remote client is allowed or required to use SMB encryption.
        ## It has different effects depending on whether the connection uses SMB1 or SMB2 and newer:
    ## If the connection uses SMB1, then this option controls the use of a Samba-specific extension to the SMB protocol introduced in Samba 3.2 that makes use of the Unix extensions.
        server min protocol = NT1
        client min protocol = NT1
        ## If the connection uses SMB2 or newer, then this option controls the use of the SMB-level encryption that is supported in SMB version 3.0 and above and available in Windows 8 and newer.
        ## (default/auto,desired,required,off)
        #smb encrypt = default

        ## set invalid users
        #invalid users = root

        ## map unknow users to guest
        map to guest = Bad User

        ## allow client access to accounts that have null passwords.
        null passwords = yes

        ## The old plaintext passdb backend. Some Samba features will not work if this passdb backend is used. (NOTE: enabled for size reasons)
        ## (tdbsam,smbpasswd,ldapsam)
        passdb backend = smbpasswd

        ## Set location of smbpasswd ('smbd -b' will show default compiled location)
        #smb passwd file = /etc/samba/smbpasswd

        ## LAN/WAN options (IPTOS_LOWDELAY TCP_NODELAY) WAN (IPTOS_THROUGHPUT)
        socket options = IPTOS_LOWDELAY TCP_NODELAY

        ## If this integer parameter is set to a non-zero value, Samba will read from files asynchronously when the request size is bigger than this value.
        ## Note that it happens only for non-chained and non-chaining reads and when not using write cache.
        ## The only reasonable values for this parameter are 0 (no async I/O) and 1 (always do async I/O).
        ## (1/0)
        #aio read size = 0
        #aio write size = 0

        ## If Samba has been built with asynchronous I/O support, Samba will not wait until write requests are finished before returning the result to the client for files listed in this parameter.
        ## Instead, Samba will immediately return that the write request has been finished successfully, no matter if the operation will succeed or not.
        ## This might speed up clients without aio support, but is really dangerous, because data could be lost and files could be damaged.
        #aio write behind = /*.tmp/

        ## lower CPU useage if supported and aio is disabled (aio read size = 0 ; aio write size = 0)
        ## currently broken (NOTE: see https://bugzilla.samba.org/show_bug.cgi?id=14095 )
        ## (no, yes)
        #use sendfile = yes

        ## samba will behave as previous versions of Samba would and will fail the lock request immediately if the lock range cannot be obtained.
        #blocking locks = No

        ## disable loading of all printcap printers by default (iprint, cups, lpstat)
        load printers = No
        printcap name = /dev/null

        ## Enabling this parameter will disable Samba's support for the SPOOLSS set of MS-RPC's.
        disable spoolss = yes

        ## This parameters controls how printer status information is interpreted on your system.
        ## (BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX, SOFTQ)
        printing = bsd

        ## Disable that nmbd is acting as a WINS server for unknow netbios names
        #dns proxy = No

        ## win/unix user mapping backend
        #idmap config * : backend = tdb

        ## Allows the server name that is advertised through MDNS to be set to the hostname rather than the Samba NETBIOS name.
        ## This allows an administrator to make Samba registered MDNS records match the case of the hostname rather than being in all capitals.
        ## (netbios, mdns)
        mdns name = mdns

        ## Clients that only support netbios won't be able to see your samba server when netbios support is disabled.
        #disable netbios = Yes

        ## Setting this value to no will cause nmbd never to become a local master browser.
        #local master = no

        ## (auto, yes) If this is set to yes, on startup, nmbd will force an election, and it will have a slight advantage in winning the election. It is recommended that this parameter is used in conjunction with domain master = yes, so that nmbd can guarantee becoming a domain master.
        #preferred master = yes

        ## (445 139) Specifies which ports the server should listen on for SMB traffic.
        ## 139 is netbios/nmbd
        #smb ports = 445 139

        ## This is a list of files and directories that are neither visible nor accessible.
        ## Each entry in the list must be separated by a '/', which allows spaces to be included in the entry. '*' and '?' can be used to specify multiple files or directories as in DOS wildcards.
        veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/

        ## If a directory that is to be deleted contains nothing but veto files this deletion will fail unless you also set the delete veto files parameter to yes.
        delete veto files = yes

################ Filesystem and creation rules ################
        ## reported filesystem type (NTFS,Samba,FAT)
        #fstype = FAT

        ## Allows a user who has write access to the file (by whatever means, including an ACL permission) to modify the permissions (including ACL) on it.
        #dos filemode = Yes

        ## file/dir creating rules
        #create mask = 0666
        #directory mask = 0777
        #force group = root
        #force user = root
        #inherit owner = windows and unix
################################################################



点评

有没有ssh工具,没有的话装个XSHELL,然后用你路由器的地址登陆进去,输我上面的命令就行了  详情 回复 发表于 2020-7-27 10:16
我的恩山、我的无线 The best wifi forum is right here.
发表于 2020-7-27 10:16 | 显示全部楼层
aasdxdffff 发表于 2020-7-27 09:54
有没有图片,我刚入门,不很清楚里面门道

samba 设置的模板

有没有ssh工具,没有的话装个XSHELL,然后用你路由器的地址登陆进去,输我上面的命令就行了

点评

好像过了一会儿,又可以了。root能够登陆了,谢谢大佬  详情 回复 发表于 2020-7-27 15:40
[attachimg]403424[/attachimg] 这样设置对吗,用户创建了连接不了  详情 回复 发表于 2020-7-27 10:32
懂了,我先装一个试试  详情 回复 发表于 2020-7-27 10:17
我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2020-7-27 10:17 | 显示全部楼层
叶非叶 发表于 2020-7-27 10:16
有没有ssh工具,没有的话装个XSHELL,然后用你路由器的地址登陆进去,输我上面的命令就行了

懂了,我先装一个试试
我的恩山、我的无线 The best wifi forum is right here.
发表于 2020-7-27 10:24 | 显示全部楼层
这个版本的samba是简化版的,设置了用不了,我用37版本的能正常共享,而且39的不支持ntfs格式的硬盘共享了

点评

最新的40有问题是吗? 老版本怎么设置?  详情 回复 发表于 2020-7-27 10:29
我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2020-7-27 10:29 | 显示全部楼层
Skrillex 发表于 2020-7-27 10:24
这个版本的samba是简化版的,设置了用不了,我用37版本的能正常共享,而且39的不支持ntfs格式的硬盘共享了

最新的40有问题是吗?
老版本怎么设置?



QQ拼音截图20200727102542.png
我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2020-7-27 10:32 | 显示全部楼层
叶非叶 发表于 2020-7-27 10:16
有没有ssh工具,没有的话装个XSHELL,然后用你路由器的地址登陆进去,输我上面的命令就行了

QQ拼音截图20200727102542.png

这样设置对吗,用户创建了连接不了

我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2020-7-27 15:40 | 显示全部楼层
叶非叶 发表于 2020-7-27 10:16
有没有ssh工具,没有的话装个XSHELL,然后用你路由器的地址登陆进去,输我上面的命令就行了

好像过了一会儿,又可以了。root能够登陆了,谢谢大佬
我的恩山、我的无线 The best wifi forum is right here.
发表于 2020-8-30 11:52 来自手机 | 显示全部楼层
41+  ,samba4无法打开软链接目录?,实目录打开正常。

点评

网上查到的解决办法,smb.conf加入: 还有个问题,如果开启guest访客读写共享文件夹? 按教程设置了,PC_win7、手机还是只能读、不能写。  详情 回复 发表于 2020-9-6 12:29
我的恩山、我的无线 The best wifi forum is right here.
发表于 2020-9-6 12:29 | 显示全部楼层
本帖最后由 ccbcfan 于 2020-9-6 12:36 编辑
ccbcfan 发表于 2020-8-30 11:52
41+  ,samba4无法打开软链接目录?,实目录打开正常。

网上查到的解决办法,smb.conf加入:

  1.    follow symlinks = yes

  2.        wide links = yes

  3.       unix extensions = no
复制代码


还有个小问题,网络共享里设置的目录权限0666\0777无法保存,需手工去掉smb.conf中以下代码前的#,
才能开启guest访客读写共享文件夹。
  1. create mask = 0666
  2. directory mask = 0777
复制代码



我的恩山、我的无线 The best wifi forum is right here.
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )|网站地图

GMT+8, 2020-10-31 06:31

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表