![smbclient 可以工作,但 mount.cifs 不能(NT_STATUS_MORE_PROCESSING_REQUIRED)](https://linux22.com/image/207103/smbclient%20%E5%8F%AF%E4%BB%A5%E5%B7%A5%E4%BD%9C%EF%BC%8C%E4%BD%86%20mount.cifs%20%E4%B8%8D%E8%83%BD%EF%BC%88NT_STATUS_MORE_PROCESSING_REQUIRED%EF%BC%89.png)
我正在尝试访问使用 SMBv1 的旧计算机上的文件共享。这是一台我无法物理访问的远程计算机,但我相信它运行的是 Windows XP。
我可以使用 很好地访问它smbclient '\\172.25.162.14\nda20' -N -m NT1 --option="client min protocol"=NT1
。但是,我无法使用 mount.cifs 挂载它。它只是坐在那里几分钟,然后最终显示:
> mount -t cifs -vvvv //172.25.162.14/nda20 /mnt/aa -o vers=1.0,guest
mount.cifs kernel mount options: ip=172.25.162.14,unc=\\172.25.162.14\nda20,vers=1.0,user=,pass=********
mount error(11): Resource temporarily unavailable
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
如果我启用调试:
echo 7 > /proc/fs/cifs/cifsFYI
echo 1 > /proc/fs/cifs/traceSMB
然后dmesg
显示如下:
[85673.032167] CIFS: fs/cifs/cifsfs.c: Devname: //172.25.162.14/nda20 flags: 0
[85673.032181] CIFS: VFS: Use of the less secure dialect vers=1.0 is not recommended unless required for access to very old servers
[85673.039302] CIFS: fs/cifs/connect.c: Anonymous login
[85673.039307] CIFS: fs/cifs/connect.c: file mode: 0755 dir mode: 0755
[85673.039310] CIFS: fs/cifs/connect.c: VFS: in mount_get_conns as Xid: 110 with uid: 0
[85673.039311] CIFS: fs/cifs/connect.c: UNC: \\172.25.162.14\nda20
[85673.039313] CIFS: fs/cifs/connect.c: Existing tcp session with server found
[85673.039314] CIFS: fs/cifs/connect.c: VFS: in cifs_get_smb_ses as Xid: 111 with uid: 0
[85673.039316] CIFS: fs/cifs/connect.c: Existing smb sess not found
[85673.039318] CIFS: fs/cifs/connect.c: Security Mode: 0x3 Capabilities: 0x8000e3fd TimeAdjust: -3600
[85673.039319] CIFS: fs/cifs/sess.c: sess setup type 4
[85673.039321] CIFS: fs/cifs/sess.c: rawntlmssp session setup negotiate phase
[85673.039327] 0000 d800 ....
[85673.039329] 53ff 424d 0073 0000 0000 c801 0000 0000 .SMBs...........
[85673.039330] 0000 0000 0000 0000 0000 6778 0000 000f ..........xg....
[85673.039332] ff0c 0000 5400 0a40 0100 0000 0000 2000 .....T@........
[85673.039332] 00 00 00 00 00 dc c0 00 80 9d 00 ...........
[85673.039334] 544e 4d4c 5353 0050 0001 0000 0225 a008 NTLMSSP.....%...
[85673.039335] 0000 0000 0000 0000 0000 0000 0000 0000 ................
[85673.039336] 4c00 6900 6e00 7500 7800 2000 7600 6500 .L.i.n.u.x. .v.e
[85673.039338] 7200 7300 6900 6f00 6e00 2000 3500 2e00 .r.s.i.o.n. .5..
[85673.039339] 3100 3000 2e00 3000 2d00 3100 3500 2d00 .1.0...0.-.1.5.-
[85673.039340] 6300 6c00 6f00 7500 6400 2d00 6100 6d00 .c.l.o.u.d.-.a.m
[85673.039341] 6400 3600 3400 0000 4300 4900 4600 5300 .d.6.4...C.I.F.S
[85673.039342] 2000 5600 4600 5300 2000 4300 6c00 6900 . .V.F.S. .C.l.i
[85673.039343] 6500 6e00 7400 2000 6600 6f00 7200 2000 .e.n.t. .f.o.r.
[85673.039344] 00 4c 00 69 00 6e 00 75 00 78 00 00 00 .L.i.n.u.x...
[85673.059537] 0000 fb00 53ff 424d 1673 0000 80c0 c801 .....SMBs.......
[85673.059538] 0000 0000 0000 0000 0000 0000 0000 6778 ..............xg
[85673.059540] 1000 000f ff04 fb00 0000 8600 d000 4e00 ...............N
[85673.059541] 4c54 534d 5053 0200 0000 0a00 0a00 3800 TLMSSP.........8
[85673.059543] 0000 2500 8a02 8ca2 0df2 4c5d 49de 000d ...%......]L.I..
[85673.059544] 0000 0000 0000 4400 4400 4200 0000 0500 .......D.D.B....
[85673.059546] 2801 000a 0000 530f 4300 4100 4400 4100 .(.....S.C.A.D.A
[85673.059547] 0200 0a00 5300 4300 4100 4400 4100 0100 .....S.C.A.D.A..
[85673.059548] 0a00 5300 4300 4100 4400 4100 0400 0a00 ...S.C.A.D.A....
[85673.059549] 5300 4300 4100 4400 4100 0300 0a00 5300 .S.C.A.D.A.....S
[85673.059550] 4300 4100 4400 4100 0600 0400 0100 0000 .C.A.D.A........
[85673.059551] 0000 0000 0000 0057 0069 006e 0064 006f ......W.i.n.d.o.
[85673.059553] 0077 0073 0020 0035 002e 0031 0000 0057 w.s. .5...1...W.
[85673.059554] 0069 006e 0064 006f 0077 0073 0020 0032 i.n.d.o.w.s. .2.
[85673.059555] 0030 0030 0030 0020 004c 0041 004e 0020 0.0.0. .L.A.N. .
[85673.059556] 4d 00 61 00 6e 00 61 00 67 00 65 00 72 00 00 M.a.n.a.g.e.r..
[85673.059576] 0000 fb00 53ff 424d 1673 0000 80c0 c801 .....SMBs.......
[85673.059578] 0000 0000 0000 0000 0000 0000 0000 6778 ..............xg
[85673.059579] 1000 000f ff04 fb00 0000 8600 d000 4e00 ...............N
[85673.059581] 4c54 534d 5053 0200 0000 0a00 0a00 3800 TLMSSP.........8
[85673.059582] 0000 2500 8a02 8ca2 0df2 4c5d 49de 000d ...%......]L.I..
[85673.059583] 0000 0000 0000 4400 4400 4200 .......D.D.B
[85673.059585] CIFS: Status code returned 0xc0000016 NT_STATUS_MORE_PROCESSING_REQUIRED
[85673.064232] CIFS: fs/cifs/netmisc.c: Mapping smb error code 0xc0000016 to POSIX err -5
[85673.064248] CIFS: fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[85673.064251] CIFS: fs/cifs/sess.c: rawntlmssp session setup challenge phase
[85673.064252] CIFS: fs/cifs/sess.c: UID = 4096
[85673.064254] CIFS: fs/cifs/sess.c: rawntlmssp session setup authenticate phase
[85673.064278] 0000 0c01 ....
[85673.064279] 53ff 424d 0073 0000 0000 c801 0000 0000 .SMBs...........
[85673.064281] 0000 0000 0000 0000 0000 6778 1000 0010 ..........xg....
[85673.064282] ff0c 0000 5400 0a40 0100 0000 0000 5400 [email protected]
[85673.064283] 00 00 00 00 00 dc c0 00 80 d1 00 ...........
[85673.064284] 544e 4d4c 5353 0050 0003 0000 0000 0000 NTLMSSP.........
[85673.064286] 0040 0000 0000 0000 0040 0000 0000 0000 @.......@.......
[85673.064287] 0040 0000 0000 0000 0040 0000 0000 0000 @.......@.......
[85673.064288] 0042 0000 0010 0010 0044 0000 0225 a088 B.......D...%...
[85673.064289] 0000 0000 fae3 63dc 6008 8a82 56b6 756d .......c.`...Vmu
[85673.064290] 58fd f5ac .X..
[85673.064291] 4c00 6900 6e00 7500 7800 2000 7600 6500 .L.i.n.u.x. .v.e
[85673.064292] 7200 7300 6900 6f00 6e00 2000 3500 2e00 .r.s.i.o.n. .5..
[85673.064294] 3100 3000 2e00 3000 2d00 3100 3500 2d00 .1.0...0.-.1.5.-
[85673.064295] 6300 6c00 6f00 7500 6400 2d00 6100 6d00 .c.l.o.u.d.-.a.m
[85673.064296] 6400 3600 3400 0000 4300 4900 4600 5300 .d.6.4...C.I.F.S
[85673.064297] 2000 5600 4600 5300 2000 4300 6c00 6900 . .V.F.S. .C.l.i
[85673.064298] 6500 6e00 7400 2000 6600 6f00 7200 2000 .e.n.t. .f.o.r.
[85673.064299] 00 4c 00 69 00 6e 00 75 00 78 00 00 00 .L.i.n.u.x...
[85791.774454] CIFS: fs/cifs/cifssmb.c: In echo request
[85791.774461] AllocMidQEntry: 5 callbacks suppressed
[85791.774464] CIFS: fs/cifs/transport.c: For smb_command 43
[85791.777750] __smb_send_rqst: 5 callbacks suppressed
[85791.777751] CIFS: fs/cifs/transport.c: Sending smb: smb_len=42
[85791.780928] 0000 2600 ...&
[85791.780930] 53ff 424d 002b 0000 0000 8001 0000 0000 .SMB+...........
[85791.780931] 0000 0000 0000 0000 ffff 6470 0000 0000 ..........pd....
[85791.780932] 0101 0100 6100 .....a
[85853.211229] CIFS: fs/cifs/cifssmb.c: In echo request
[85853.211234] CIFS: fs/cifs/transport.c: For smb_command 43
[85853.211239] CIFS: fs/cifs/transport.c: Sending smb: smb_len=42
[85853.211244] 0000 2600 ...&
[85853.211246] 53ff 424d 002b 0000 0000 8001 0000 0000 .SMB+...........
[85853.211248] 0000 0000 0000 0000 ffff 6470 0000 0000 ..........pd....
[85853.211250] 0101 0100 6100 .....a
[85859.356975] CIFS: VFS: \\172.25.162.14 has not responded in 180 seconds. Reconnecting...
[85859.361809] CIFS: fs/cifs/connect.c: cifs_reconnect: will retry 1 target(s)
[85859.361810] CIFS: fs/cifs/connect.c: Mark tcp session as need reconnect
[85859.361811] CIFS: fs/cifs/connect.c: cifs_reconnect: marking sessions and tcons for reconnect
[85859.361813] CIFS: fs/cifs/connect.c: cifs_reconnect: tearing down socket
[85859.361814] CIFS: fs/cifs/connect.c: State: 0x3 Flags: 0x0
[85859.361846] CIFS: fs/cifs/connect.c: Post shutdown state: 0x3 Flags: 0x0
[85859.361852] CIFS: fs/cifs/connect.c: cifs_reconnect: moving mids to private list
[85859.361854] CIFS: fs/cifs/connect.c: cifs_reconnect: issuing mid callbacks
[85859.361856] CIFS: fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[85859.361858] CIFS: fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[85859.361872] CIFS: fs/cifs/dns_resolve.c: dns_resolve_server_name_to_ip: probably server name is whole unc: \\172.25.162.14
[85859.361874] CIFS: fs/cifs/dns_resolve.c: dns_resolve_server_name_to_ip: unc is IP, skipping dns upcall: 172.25.162.14
[85859.361876] CIFS: fs/cifs/connect.c: generic_ip_connect: connecting to 172.25.162.14:445
[85859.361888] cifs_sync_mid_result: 4 callbacks suppressed
[85859.361890] CIFS: fs/cifs/transport.c: cifs_sync_mid_result: cmd=115 mid=16 state=8
[85859.361896] CIFS: fs/cifs/connect.c: Socket created
[85859.365253] CIFS: fs/cifs/connect.c: sndbuf 16384 rcvbuf 131072 rcvtimeo 0x6d6
[85859.365254] CIFS: fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[85859.365262] CIFS: VFS: \\172.25.162.14 Send error in SessSetup = -11
[85859.369030] CIFS: fs/cifs/connect.c: VFS: leaving cifs_get_smb_ses (xid = 111) rc = -11
[85859.369034] CIFS: fs/cifs/dfs_cache.c: __dfs_cache_find: search path: \172.25.162.14\nda20
[85859.369037] CIFS: fs/cifs/dfs_cache.c: get_dfs_referral: get an DFS referral for \172.25.162.14\nda20
[85859.369039] CIFS: fs/cifs/connect.c: VFS: leaving mount_put_conns (xid = 110) rc = 0
[85859.369040] CIFS: VFS: cifs_mount failed w/return code = -11
[86010.843369] CIFS: fs/cifs/connect.c: Received no data or error: -104
[86010.843375] CIFS: fs/cifs/connect.c: cifs_reconnect: will retry 1 target(s)
[86010.843376] CIFS: fs/cifs/connect.c: Mark tcp session as need reconnect
[86010.843377] CIFS: fs/cifs/connect.c: cifs_reconnect: marking sessions and tcons for reconnect
[86010.843378] CIFS: fs/cifs/connect.c: cifs_reconnect: tearing down socket
[86010.843379] CIFS: fs/cifs/connect.c: State: 0x3 Flags: 0x0
[86010.843381] CIFS: fs/cifs/connect.c: Post shutdown state: 0x3 Flags: 0x0
[86010.843392] CIFS: fs/cifs/connect.c: cifs_reconnect: moving mids to private list
[86010.843393] CIFS: fs/cifs/connect.c: cifs_reconnect: issuing mid callbacks
[86010.843396] CIFS: fs/cifs/dns_resolve.c: dns_resolve_server_name_to_ip: probably server name is whole unc: \\172.25.162.14
[86010.843398] CIFS: fs/cifs/dns_resolve.c: dns_resolve_server_name_to_ip: unc is IP, skipping dns upcall: 172.25.162.14
[86010.843400] CIFS: fs/cifs/connect.c: generic_ip_connect: connecting to 172.25.162.14:445
[86010.843407] CIFS: fs/cifs/connect.c: Socket created
[86010.843409] CIFS: fs/cifs/connect.c: sndbuf 16384 rcvbuf 131072 rcvtimeo 0x6d6
知道有什么问题吗?或者有什么提示可以找出来吗?
附加信息:
Debian 11
Linux VM-DMS-App-01 5.10.0-15-cloud-amd64 #1 SMP Debian 5.10.120-1 (2022-06-09) x86_64 GNU/Linux
mount.cifs version: 6.11
答案1
所以显然如果我指定它就有效username=root
。或者任何用户名 - 实际上它是什么并不重要!
但是省略用户名 arg 会导致挂起,尽管事实man mount.cifs
是:
username=arg|user=arg
specifies the username to connect as. If this is not given, then the environment variable USER is used.