Linux

升級到 RHEL7 後 smbclient 無法連接

  • October 27, 2018
smbclient //ERERYMJF/pwiwerp_Informatica -U 'PWI.kpp.com\a121212'

上述命令之前工作正常,但不適用於 RHEL7。我得到以下錯誤。

SPNEGO(gse_krb5) NEG_TOKEN_INIT failed: NT_STATUS_NO_MEMORY
session setup failed: NT_STATUS_NO_MEMORY

桑巴配置文件

[global]
       client use spnego = no
       client ntlmv2 auth = yes

       workgroup = SAMBA
       security = user

       passdb backend = tdbsam

       printing = cups
       printcap name = cups
       load printers = yes
       cups options = raw



[homes]
       comment = Home Directories
       valid users = %S, %D%w%S
       browseable = No
       read only = No
       inherit acls = Yes

[printers]
       comment = All Printers
       path = /var/tmp
       printable = Yes
       create mask = 0600
       browseable = No

[print$]
       comment = Printer Drivers
       path = /var/lib/samba/drivers
       write list = @printadmin root
       force group = @printadmin
       create mask = 0664
       directory mask = 0775

我們使用的是 4.7.1 版。

我使用了伺服器的完整名稱 - ERERYMJF - 即 ERERYMJF.xyz.com,它成功了!

smbclient //**ERERYMJF.xyz.com**/pwiwerp_Informatica -U 'PWI.kpp.com\a121212'

正如@roaima 提到的那樣,這不是一個好的解決方案,並且拋棄了 samba 周圍的安全性。但是,這似乎是現在唯一對我有用的解決方案。

我發現這個 AU Q&A 的標題是:Ubuntu 17.10 to access Windows Files Shares within workspace IT

SPNEGO(gse_krb5) NEG_TOKEN_INIT failed: NT_STATUS_NO_MEMORY
session setup failed: NT_STATUS_NO_MEMORY

顯示的解決方法也可能對您有用:

$ cat /etc/samba/smb.conf
...
client use spnego = no
client ntlmv2 auth = no
workgroup = WINWIRKGRP
...

引用自:https://unix.stackexchange.com/questions/454004