找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
楼主: dragon5036

[N1盒子] 【N1盒子】关于samba共享的问题请教!

[复制链接]
 楼主| 发表于 2020-3-14 14:55 | 显示全部楼层
Bonperfect 发表于 2020-3-13 12:28
哈哈,设置好,重启N1就行了。我也被坑了好几天。

我设置好了,重启了,也不管用
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-3-14 14:56 | 显示全部楼层
[global]        netbios name = |NAME|         interfaces = |INTERFACES|        server string = |DESCRIPTION|        unix charset = |CHARSET|        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.        ## 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################################################################

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2020-3-14 14:57 | 显示全部楼层
dragon5036 发表于 2020-3-14 14:52
虚拟的对储存格式有要求吗?

没有,,,,,,
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2020-3-14 14:59 | 显示全部楼层
建议把自带的2个共享都禁用,安装docker版的,具体看

https://www.right.com.cn/forum/thread-3044904-1-1.html

7楼

如果挂载的硬盘路径不同,可以修改一下smb.conf文件
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-3-14 15:01 | 显示全部楼层
你懂地 发表于 2020-3-14 14:59
建议把自带的2个共享都禁用,安装docker版的,具体看

https://www.right.com.cn/forum/thread-3044904-1 ...

好的,多谢!就是在启动项里禁用ksmbd和samba4?

点评

是的,你原先启用的再停止一下。如果感觉docker里用下来没问题的话。也可以把这两个应用删除  详情 回复 发表于 2020-3-14 15:05
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2020-3-14 15:05 | 显示全部楼层
dragon5036 发表于 2020-3-14 15:01
好的,多谢!就是在启动项里禁用ksmbd和samba4?

是的,你原先启用的再停止一下。如果感觉docker里用下来没问题的话。也可以把这两个应用删除

点评

我禁用了!然后设置的都被我删除了  详情 回复 发表于 2020-3-14 15:07
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-3-14 15:07 | 显示全部楼层
你懂地 发表于 2020-3-14 15:05
是的,你原先启用的再停止一下。如果感觉docker里用下来没问题的话。也可以把这两个应用删除

我禁用了!然后设置的都被我删除了
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2020-3-14 15:51 | 显示全部楼层
dragon5036 发表于 2020-3-14 14:08
[global]
        netbios name = |NAME|
        server string = |DESCRIPTION|

[global]
        netbios name = |NAME|
        display charset = |CHARSET|
        interfaces = |INTERFACES|
        server string = |DESCRIPTION|
        unix charset = |CHARSET|
        workgroup = |WORKGROUP|
        bind interfaces only = yes
        deadtime = 30
        enable core files = no
        invalid users = root
        local master = yes
        map to guest = Bad User
        max protocol = SMB2
        min receivefile size = 16384
        null passwords = yes
        passdb backend = smbpasswd
        security = user
        smb passwd file = /etc/samba/smbpasswd
        socket options = TCP_NODELAY IPTOS_LOWDELAY
        use sendfile = yes

然后再给个权限你要共享的上级目录和当前目录
例如你要共享/mnt/sdb1,那sdb1要给,mnt也要给才行~
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2020-3-14 16:25 | 显示全部楼层
红色部分可以修改自己想要的名称,和挂载路径。
可以修改成

[N1]
path = /mnt

但这个统一的路径,打开后东西太多。
所以建议改成你硬盘的挂载路径、比如:

path = /mnt/sda1





#======================= Share Definitions =======================
[N1]
path = /mnt/sda1
guest ok = yes
guest only = no
read only = no
browseable = yes
inherit acls = yes
inherit permissions = no
ea support = no
store dos attributes = no
vfs objects =
printable = no
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
hide special files = yes
follow symlinks = yes
hide dot files = yes
read list =
write list =
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-3-14 16:48 | 显示全部楼层
你懂地 发表于 2020-3-14 16:25
红色部分可以修改自己想要的名称,和挂载路径。
可以修改成

老大,我快哭了!!现在不是想象中的简单了,容器里samba勾选不上,储存路径是要在putty里面改?电脑上也没有看到盘了,开始是有两个,现在电脑重启后一个都没有了!还有ip要不要改?




本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2020-3-14 16:59 | 显示全部楼层
在我的电脑,输入栏输入:

\\你的ip


试试

还不行的话,把你的挂载路径给我看看。或者告诉我。帮你改文件
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-3-14 19:44 | 显示全部楼层
你懂地 发表于 2020-3-14 16:59
在我的电脑,输入栏输入:

\\你的ip

老大,帮我看下,这个是docker里挂的镜像samba的参数,你看下最下面的ip好像不是我n1的IP啊,我的光猫是192.168.1.1主路由是196.168.2.1,n1旁路由是196.168.2.2,这镜像的设置好像跟应用里完全不一样啊!还有我刷的f大29+的固件,我只插了一个U盘怎么是sda5了,我把挂载点截图了,你帮我看看!那个文件我修改了!用记事本修改的!


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2020-3-14 20:16 | 显示全部楼层
这个IP地址是内网的IP,不需要理会。

这个挂载点是自动分配的,可能U盘和移动硬盘有区别,我硬盘显示sda1。换个U盘就显示其它的挂载点了
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-3-14 20:54 | 显示全部楼层
你懂地 发表于 2020-3-14 20:16
这个IP地址是内网的IP,不需要理会。

这个挂载点是自动分配的,可能U盘和移动硬盘有区别,我硬盘显示sda ...

真心谢谢你,让我把这个共享弄好了,现在全部设备都能连接上,之前U盘是sda1,自从刷29+后就是sda5了,明天我再插个U盘看看!现在全部都可以连上,只是传输速度有点慢!这个搞定了,再研究下air2弄下离线下载看看!生命在于折腾
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2022-2-17 19:11 | 显示全部楼层
我也遇到这样的问题,挂了U盘共享不了,搞了2天搞不好,就放那了,算了,没有那个能力, 固件刷了非常多也不知道怎么弄了后来
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

欢迎大家光临恩山无线论坛上一条 /1 下一条

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-9-22 21:17

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com

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