mount.cifs 操作不受支持,但 smbclient 可按预期连接

mount.cifs 操作不受支持,但 smbclient 可按预期连接

在 Debian 8.2 版本 6.4 上安装 OSX 10.9.5 共享时mount.cifs

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

答案1

OSX 的 samba 服务器(SMBX)需要安装选件nounix,sec=ntlmssp,noperm

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

相关内容