SAMBA 客户端:Ubuntu 14.04.5 LTS
SAMBA 服务器:Windows Server 2012 R2 Standard
我运行了以下命令smbclient -d3 -L //10.2.3.111/Files -A /home/acteam/.smbcredentials
并出现错误NT_STATUS_RESOURCE_NAME_NOT_FOUND
[acteam@irv-guen] - [~] - [2017-08-03 21:32:12]
[0] smbclient -d3 -L //10.2.3.111/Files -A /home/acteam/.smbcredentials lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[global]"
WARNING: The "syslog" option is deprecated
added interface eth0 ip=10.2.3.127 bcast=10.2.3.255 netmask=255.255.255.0
Client started (version 4.3.11-Ubuntu).
Connecting to 10.2.3.111 at port 445
Doing spnego session setup (blob length=120)
got OID=1.3.6.1.4.1.311.2.2.30
got OID=1.2.840.48018.1.2.2
got OID=1.2.840.113554.1.2.2
got OID=1.2.840.113554.1.2.2.3
got OID=1.3.6.1.4.1.311.2.2.10
got principal=not_defined_in_RFC4178@please_ignore
GENSEC backend 'gssapi_spnego' registered
GENSEC backend 'gssapi_krb5' registered
GENSEC backend 'gssapi_krb5_sasl' registered
GENSEC backend 'spnego' registered
GENSEC backend 'schannel' registered
GENSEC backend 'naclrpc_as_system' registered
GENSEC backend 'sasl-EXTERNAL' registered
GENSEC backend 'ntlmssp' registered
GENSEC backend 'ntlmssp_resume_ccache' registered
GENSEC backend 'http_basic' registered
GENSEC backend 'http_ntlm' registered
GENSEC backend 'krb5' registered
GENSEC backend 'fake_gssapi_krb5' registered
Got challenge flags:
Got NTLMSSP neg_flags=0x62898215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x62088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62088215
Domain=[TMGRID] OS=[Windows Server 2012 R2 Standard 9600] Server=[Windows Server 2012 R2 Standard 6.3]
Sharename Type Comment
--------- ---- -------
ADMIN$ Disk Remote Admin
C$ Disk Default share
Files Disk
IPC$ IPC Remote IPC
MappedDrive Disk
Connecting to 10.2.3.111 at port 139
Connecting to 10.2.3.111 at port 139
Connection to 10.2.3.111 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
NetBIOS over TCP disabled -- no workgroup available
在Windows Server端,NetBios已启用:
Windows Server 2012 R2 上启用了 TCP/IP 上的 NetBios
此 Windows 服务器未加入任何工作组。它使用域“tmgrid.local”
Windows Server 2012 R2系统
我已经参考了 ubuntuforums.org/showthread.php?t=2295552&p=13360352#post13360352,但该线程也没有解决。
答案1
我已经解决了这个问题,方法是修复〜/ .smbcredentials文件。
之前,〜/ .smbcredentials文件内容为:
username=TMGRID/AppControlTeam
password=************
我运行sudo mount
会导致错误信息
[acteam@irv-guen] - [~] - [2017-08-04 00:54:59]
[32] sudo mount -vvv -t cifs -o credentials=/home/acteam/.smbcredentials,sec=ntlm //10.2.3.111/Files /media/IRV-GUEN-WINF_Files
mount: fstab path: "/etc/fstab"
mount: mtab path: "/etc/mtab"
mount: lock path: "/etc/mtab~"
mount: temp path: "/etc/mtab.tmp"
mount: UID: 0
mount: eUID: 0
mount: spec: "//10.2.3.111/Files"
mount: node: "/media/IRV-GUEN-WINF_Files"
mount: types: "cifs"
mount: opts: "credentials=/home/acteam/.smbcredentials,sec=ntlm"
mount: external mount: argv[0] = "/sbin/mount.cifs"
mount: external mount: argv[1] = "//10.2.3.111/Files"
mount: external mount: argv[2] = "/media/IRV-GUEN-WINF_Files"
mount: external mount: argv[3] = "-v"
mount: external mount: argv[4] = "-o"
mount: external mount: argv[5] = "rw,credentials=/home/acteam/.smbcredentials,sec=ntlm"
mount.cifs kernel mount options: ip=10.2.3.111,unc=\\10.2.3.111\Files,sec=ntlm,user=TMGRID/AppControlTeam,pass=********
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
这/var/log/syslog是
Aug 4 00:59:03 irv-guen kernel: [50881.183164] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
Aug 4 00:59:03 irv-guen kernel: [50881.183171] CIFS VFS: Send error in SessSetup = -13
Aug 4 00:59:03 irv-guen kernel: [50881.183363] CIFS VFS: cifs_mount failed w/return code = -13
在我修改之后〜/ .smbcredentials文件内容至:
username=AppControlTeam
password=***********
domain=tmgrid.local
运行sudo mount
结果是
[acteam@irv-guen] - [~] - [2017-08-04 00:59:03]
[32] sudo mount -vv -t cifs -o credentials=/home/acteam/.smbcredentials,sec=ntlm //10.2.3.111/Files /media/IRV-GUEN-WINF_Files
domain=tmgrid.local
mount.cifs kernel mount options: ip=10.2.3.111,unc=\\10.2.3.111\Files,sec=ntlm,user=AppControlTeam,,domain=tmgrid.local,pass=********
现在我可以浏览已挂载的 Windows 共享文件夹
[acteam@irv-guen] - [~] - [2017-08-04 01:02:58]
[0] l /media/IRV-GUEN-WINF_Files
total 8.0K
drwxr-xr-x 2 root root 4.0K Aug 3 02:14 .
drwxr-xr-x 5 root root 4.0K Aug 4 00:53 ..
drwxr-xr-x 2 root root 0 Jul 10 02:11 Archive
drwxr-xr-x 2 root root 0 Jul 27 04:21 ExtractedDirectory
drwxr-xr-x 2 root root 0 Aug 3 02:14 GUEN_Linux
drwxr-xr-x 2 root root 0 Aug 2 06:58 GUEN_QA
drwxr-xr-x 2 root root 0 Jul 10 02:14 PackageDirectory
drwxr-xr-x 2 root root 0 Jul 31 01:46 SamplesForQATesting