Mac-Osx

Samba 共享不適用於 osx 使用者,但適用於 Windows 使用者?

  • November 5, 2018

在 linux 機器上使用 webmin 我設置了一些 samba 共享。我可以使用任何 Windows 機器正常訪問它們,但是當我使用 osx 連接到伺服器時,finder 會提示我輸入使用者名和密碼,然後告訴我沒有骰子。是否需要為 osx 設置一些特定的東西才能訪問共享與 Windows?

注意在我輸入我的憑據後,它會向我顯示共享,但是當我選擇其中任何一個時,它會給我一個連接到伺服器消息的一般錯誤。

我的 smb.conf 如下:

[global]
   log file = /var/log/samba/samba.log
   guest account = nobody
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   add group script = /usr/sbin/groupadd '%g'
   admin users = root
   obey pam restrictions = yes
   delete group script = /usr/sbin/groupdel '%g'
   socket options = TCP_NODELAY
   add user to group script = /usr/sbin/usermod -G '%g' '%u'
   encrypt passwords = yes
   passdb backend = tdbsam
   passwd program = /usr/bin/passwd %u
   wins support = true
   dns proxy = no
   netbios name = FILESERVER
   server string = Company FileServer
   unix password sync = yes
   workgroup = OfficeWG
   os level = 20
   add user script = /usr/sbin/useradd -m '%u' -g users -G users
   auto services = global
   security = share
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   delete user script = /usr/sbin/userdel -r '%u'
   max log size = 1000
   pam password change = yes

[officemain]
   writeable = yes
   path = /mainstorage/officemain

[homes]
   browseable = no
   comment = Home Directory
   writeable = yes
   path = /mainstorage/home/%S

[markshome]
   browseable = no
   comment = Marks Home Folder
   writeable = yes
   path = /mainstorage/home/markepstien

我已清除 samba 日誌並嘗試重新連接。以下是日誌的內容。我看到它說密碼不正確,但我可以使用 Windows 機器上的使用者/密碼正常連接。

[2013/05/06 14:57:52.261776,  0] printing/print_cups.c:108(cups_connect)
 Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:52.263770,  0] printing/print_cups.c:108(cups_connect)
 Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:52.264188,  0] printing/print_cups.c:108(cups_connect)
 Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:52.266115,  0] printing/print_cups.c:108(cups_connect)
 Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:52.268249,  0] printing/print_cups.c:108(cups_connect)
 Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:52.271604,  0] printing/print_cups.c:108(cups_connect)
 Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:55.265867,  0] printing/print_cups.c:108(cups_connect)
 Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:55.267877,  0] printing/print_cups.c:108(cups_connect)
 Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:55.268336,  0] printing/print_cups.c:108(cups_connect)
 Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:55.270168,  0] printing/print_cups.c:108(cups_connect)
 Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:55.272388,  0] printing/print_cups.c:108(cups_connect)
 Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:55.275714,  0] printing/print_cups.c:108(cups_connect)
 Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:58:02.073941,  1] smbd/service.c:678(make_connection_snum)
 create_connection_server_info failed: NT_STATUS_WRONG_PASSWORD
[2013/05/06 14:58:02.076238,  1] smbd/service.c:678(make_connection_snum)
 create_connection_server_info failed: NT_STATUS_WRONG_PASSWORD
[2013/05/06 14:58:08.104229,  0] param/loadparm.c:8445(check_usershare_stat)
 check_usershare_stat: file /var/lib/samba/usershares/ owned by uid 0 is not a regular file

問題出在您的security = share設置中。我遇到過類似的情況,我的 OS X 客戶端無法連接到我的 Samba 共享。我通過使用解決了它security = user

我遇到了這個問題並通過確保共享目錄由 samba 使用者擁有並且該目錄的 mod 為 774 來解決它。

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