Ubuntu

現在無法從 OSX 機器訪問 Ubuntu 匿名 Samba 共享

  • April 28, 2016

我有一台 OSX 機器,它已作為訪客連接到我的 Ubuntu 機器上的 Samba 共享。它不再連接。當我在 Finder 中點擊“連接到伺服器…”並輸入smb://server/anonymous時,它會給出以下消息:

There was a problem connecting to the server “server”.
Check the server name or IP address, and then try again. 
If you continue to have problems, contact your system 
administrator.

但是,我可以在 Ubuntu 機器上以註冊使用者身份連接,但無法編輯文件,因為它們歸nobody使用者所有。

我沒有更改任何設置,只是一周左右沒有嘗試連接。任何想法可能導致這種突然的變化?

附加資訊:

smb.conf:

[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = server
security = user
map to guest = bad user
dns proxy = no
#===== Share Definitions =====
[Anonymous]
path = /mnt/raid1
browsable = yes
writable = yes
guest ok = yes
read only = no

在 Ubuntu 盒子上:

$ smbclient //server/anonymous -U nobody -N
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.3.8-Ubuntu]
smb: \>

和:

$ netstat -atn
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN
tcp6       0      0 :::139                  :::*                    LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN
tcp6       0      0 :::445                  :::*                    LISTEN

在 Mac 上:

$ mount_smbfs -N //nobody:@server/anonymous /test/
mount_smbfs: server rejected the connection: Authentication error

所以看起來我可以連接到 Ubuntu 機器上的共享,但不能連接到 Mac。

我也嘗試過與另一台 Mac 連接,但結果相同。

看來這是 Ubuntu smbd 版本 4.3.8 和 Mac OS X 版本 10.11 之間的一個已知錯誤。

https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1572301

目前還沒有簡單的解決方案,但應該在適當的時候修復。

引用自:https://serverfault.com/questions/773370