smbclient 失败并显示消息“协议协商失败:NT_STATUS_INSUFFICIENT_RESOURCES”,这是什么意思以及如何解决?

Cal*_*ius 10 samba

我正在尝试使用 smbclient 访问 Windows 共享,但无论凭据正确或不正确,我都会收到此 NT_STATUS_INSUFFICIENT_RESOURCES 错误。

该命令是关于列出股票:

smbclient -L //computer.domain -U domain/username
Run Code Online (Sandbox Code Playgroud)

它要求输入密码,但之后失败。

如果尝试在其上打开共享,则会发生同样的情况:

smbclient //computer.domain/sharename -U domain/username
Run Code Online (Sandbox Code Playgroud)

我环顾了网络,没有发现任何相关内容。其他 Samba 客户端失败并显示类似的无意义错误消息。

我可以从 Windows 7 访问共享。

我还可以从 Linux 访问其他共享,但存储在该特定计算机上的共享除外。

那么如何使用 smbclient 访问这个有问题的 Windows 共享呢?是否可以?如果没有,是否有解决方法?

(我使用的是 Ubuntu Server 12.04)

Joh*_*son 6

问题

在客户端

sudo mount -t cifs -o uid=user,gid=user,username=user,password=password //192.168.0.100/shared /mnt/smb
mount: Cannot allocate memory

smbclient -L pc -U user%password
protocol negotiation failed: NT_STATUS_INSUFFICIENT_RESOURCES

dmesg | tail
…
[49474.230547] CIFS VFS: cifs_mount failed w/return code = -12
Run Code Online (Sandbox Code Playgroud)

解决方案

重启LanmanServer即可解决问题

在服务器中

net stop LanmanServer /y && net start LanmanServer
These workstations have sessions on this server:

192.168.0.100
These workstations have sessions with open files on this server:

192.168.0.100
The following services are dependent on the Server service.
Stopping the Server service will also stop these services.

   HomeGroup Listener
   Computer Browser

The HomeGroup Listener service is stopping.
The HomeGroup Listener service was stopped successfully.

The Computer Browser service is stopping..
The Computer Browser service was stopped successfully.

The Server service is stopping.
The Server service was stopped successfully.

The Server service is starting.
The Server service was started successfully.
Run Code Online (Sandbox Code Playgroud)
net start Browser
The requested service has already been started.
Run Code Online (Sandbox Code Playgroud)
net start HomeGroupListener
The HomeGroup Listener service is starting.
The HomeGroup Listener service was started successfully.
Run Code Online (Sandbox Code Playgroud)

此后smbclient在客户端不返回错误

smbclient -L pc -U user%password
Domain=[PC] OS=[Windows 7 Ultimate 7601 Service Pack 1] Server=[Windows 7 Ultimate 6.1]
…
Run Code Online (Sandbox Code Playgroud)

客户

客户是

cat /etc/issue
Ubuntu 13.04 \n \l

sudo dmidecode | grep -A2 "Base Board"
   Manufacturer: Intel Corporation
   Product Name: 440BX Desktop Reference Platform
Run Code Online (Sandbox Code Playgroud)

服务器

服务器是

ver
Microsoft Windows [Version 6.1.7601]

dmidecode | grep -A2 "Base Board"
   Manufacturer: ASUSTeK COMPUTER INC.
   Product Name: P8Z77-M PRO
Run Code Online (Sandbox Code Playgroud)