Debian

不支持 mount.cifs 操作,但 smbclient 按預期連接

  • January 21, 2016

在帶有版本的 Debian 8.2 上安裝 OSX 10.9.5 共享時mount.cifs。6.4:

mount error(95): Operation not supported

憑證不是問題。我可以通過smbclient. Mount 正確地從憑證文件中讀取域和使用者名。我以root身份執行,所以希望不是權限問題。

我能找到的唯一區別是/var/log/system.log文件共享主機上報告的標誌。使用列表訪問mount.cifs沒有標誌,smbclient列出了一些。但是mount.cifs它正在另一台機器(archlinux)上工作,也沒有標誌。

# smb client works fine
smbclient \\\\arnold\\T800 -A ~ni_tools/passwd/arnold 
  Domain=[ARNOLD] OS=[Darwin] Server=[@(#)PROGRAM:smbd  PROJECT:smbx-276.92.2]
  smb: \> 

# mount
sudo mount -t cifs //arnold/T800 test -o credentials=~ni_tools/passwd/arnold,iocharset=utf8,uid=1000,gid=1000,rw -vv
 domain=ARNOLD
 mount.cifs kernel mount options: ip=157.229.27.130,unc=\\arnold\T800,iocharset=utf8,uid=1000,gid=1000,user=lncd,,domain=ARNOLD,pass=********
 mount error(95): Operation not supported
 Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

# get more info
echo 1 > /proc/fs/cifs/traceSMB
echo 1 > /proc/fs/cifs/cifsFYI

# whats going on? I don't know 
dmesg |tail
 [278115.106815] | 0x00 0x00 0x00 0x00 0x01 0x01 0x00 0x01  |  _ _ _ _ _ _ _ _
 [278115.106821] | 0x00 0x61                                |  _ a            
 [278115.107104] /build/linux-x1KGLI/linux-3.16.7-ckt11/fs/cifs/connect.c: RFC1002 header 0x26
 [278115.107115] | 0x00 0x00 0x00 0x26 0xff 0x53 0x4d 0x42  |  _ _ _ & \xffffffff S M B
 [278115.107123] | 0x2b 0x00 0x00 0x00 0x00 0x80 0x01 0x48  |  + _ _ _ _ _ _ H
 [278115.107129] | 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00  |  _ _ _ _ _ _ _ _
 [278115.107135] | 0x00 0x00 0x00 0x00 0xff 0xff 0x5c 0x04  |  _ _ _ _ \xffffffff \xffffffff \ _
 [278115.107141] | 0x00 0x00 0x00 0x00 0x01 0x01 0x00 0x01  |  _ _ _ _ _ _ _ _
 [278115.107146] | 0x00 0x61                                |  _ a            
 [278115.107157] /build/linux-x1KGLI/linux-3.16.7-ckt11/fs/cifs/misc.c: checkSMB Length: 0x2a, smb_buf_length: 0x26

阿諾德:/var/log/system.log

###  Successful mount from archlinux ###
Dec 17 15:11:42 arnold.wpic.upmc.edu digest-service[54605]: digest-request: uid=0
Dec 17 15:11:42 arnold.wpic.upmc.edu digest-service[54605]: digest-request: init request
Dec 17 15:11:42 arnold.wpic.upmc.edu digest-service[54605]: digest-request: init return domain: ARNOLD server: ARNOLD indomain was: <NULL>
Dec 17 15:11:42 arnold.wpic.upmc.edu digest-service[54605]: digest-request: uid=0
Dec 17 15:11:42 arnold.wpic.upmc.edu digest-service[54605]: digest-request: od failed with 2 proto=ntlmv2
Dec 17 15:11:42 arnold.wpic.upmc.edu digest-service[54605]: digest-request: user=ARNOLD\lncd
Dec 17 15:11:42 arnold.wpic.upmc.edu digest-service[54605]: digest-request kdc: ok user=ARNOLD\lncd proto=ntlmv2 flags: 

###  FAILED MOUNT ATTEMPT ###
Dec 17 14:39:11 arnold.wpic.upmc.edu digest-service[54210]: digest-request: uid=0
Dec 17 14:39:11 arnold.wpic.upmc.edu digest-service[54210]: digest-request: init request
Dec 17 14:39:11 arnold.wpic.upmc.edu digest-service[54210]: digest-request: init return domain: ARNOLD server: ARNOLD indomain was: <NULL>
Dec 17 14:39:11 arnold.wpic.upmc.edu digest-service[54210]: digest-request: uid=0
Dec 17 14:39:11 arnold.wpic.upmc.edu digest-service[54210]: digest-request: init request
Dec 17 14:39:11 arnold.wpic.upmc.edu digest-service[54210]: digest-request: init return domain: ARNOLD server: ARNOLD indomain was: <NULL>
Dec 17 14:39:11 arnold.wpic.upmc.edu digest-service[54210]: digest-request: uid=0
Dec 17 14:39:11 arnold.wpic.upmc.edu digest-service[54210]: digest-request: init request
Dec 17 14:39:11 arnold.wpic.upmc.edu digest-service[54210]: digest-request: init return domain: ARNOLD server: ARNOLD indomain was: <NULL>
Dec 17 14:39:11 arnold.wpic.upmc.edu digest-service[54210]: digest-request: uid=0
Dec 17 14:39:11 arnold.wpic.upmc.edu digest-service[54210]: digest-request: od failed with 2 proto=ntlmv2
Dec 17 14:39:11 arnold.wpic.upmc.edu digest-service[54210]: digest-request: user=ARNOLD\lncd
Dec 17 14:39:11 arnold.wpic.upmc.edu digest-service[54210]: digest-request kdc: ok user=ARNOLD\lncd proto=ntlmv2 flags: 

### SMBCLIENT #####
Dec 17 14:57:48 arnold.wpic.upmc.edu digest-service[54353]: digest-request: uid=0
Dec 17 14:57:48 arnold.wpic.upmc.edu digest-service[54353]: digest-request: init request
Dec 17 14:57:48 arnold.wpic.upmc.edu digest-service[54353]: digest-request: init return domain: ARNOLD server: ARNOLD indomain was: <NULL>
Dec 17 14:57:48 arnold.wpic.upmc.edu digest-service[54353]: digest-request: uid=0
Dec 17 14:57:48 arnold.wpic.upmc.edu digest-service[54353]: digest-request: od failed with 2 proto=ntlmv2
Dec 17 14:57:48 arnold.wpic.upmc.edu digest-service[54353]: digest-request: user=WORKGROUP\lncd
Dec 17 14:57:48 arnold.wpic.upmc.edu digest-service[54353]: digest-request kdc: ok user=ARNOLD\lncd proto=ntlmv2 flags: NEG_KEYEX, ENC_128, NEG_NTLM2, NEG_ALWAYS_SIGN, NEG_NTLM, NEG_SIGN, NEG_TARGET, NEG_UNICODE

OSX 的 samba 伺服器 ( SMBX) 需要使用選項掛載nounix,sec=ntlmssp,noperm

https://stackoverflow.com/questions/26000289/debian-7-fstab-mount-cifs-invalid-argument

引用自:https://serverfault.com/questions/743808