指定用户名/密码时,Net use 返回“发生系统错误 67”

指定用户名/密码时,Net use 返回“发生系统错误 67”

我首先尝试使用服务器(Windows server 2012r2)上的资源管理器连接远程 samba 共享文件夹(Linux),并输入远程用户名和密码。它成功了,我可以看到远程文件。

然后我尝试在 powershell 中编写一个脚本。

$dest = '\\remote\shared'
$username = '.\username'
$password = 'password'
net use "$dest" $password /USER:$username

然而它总是给出错误

System error 67 has occurred.

The network name cannot be found.

net use $dest并没有给出任何错误。net use $dest /delete也没有返回任何错误。

相关内容