mount.cifs は使用できません。マウントエラー(2):対応するファイルまたはディレクトリがありません。

mount.cifs は使用できません。マウントエラー(2):対応するファイルまたはディレクトリがありません。

注文するmount.cifsGentooシステムで実行できないことがわかりましたシステム

ae429-1105 etc # mount -t cifs //file.abc.edu.au/user /home/directory/path -o credentials=/etc/user,rw,iocharset=utf8,file_mode=0777,dir_mode=0777
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

マウントポイントの存在とアクセシビリティを確認しました。 /ホーム/ディレクトリ/パスと資格情報ファイル/etc/ユーザー。関連モジュールとサービスも有効になります。

 ae429-1105 etc # lsmod |egrep 'fuse|cifs'
 fuse                   72589  5 
 cifs                  312131  0

そして

ae429-1105 etc # systemctl -t service -a |grep Samba
nmbd.service                         loaded active   running Samba NetBIOS                     name server
smbd.service                         loaded active   running Samba SMB/CIFS     server
winbindd.service                     loaded inactive dead    Samba Winbind daemon

多くのユーザーがこの問題を発見しました。一例また参考にしてください私のUbuntu / debianシステムで同じコマンドを実行すると、正常にマウントできます。

問題の機械に関する追加情報:

ae429-1105 etc # mount.cifs --version
mount.cifs version: 6.1

debian/ubuntuにインストールされているmount.cifsのバージョンは6.0です。

ベストアンサー1

最新バージョンのWindowsで共有をマウントする場合は、バージョン3.0を強制するには、mountコマンドにvers =オプションを指定する必要があるかもしれません。私たちのファイルサーバーの1つが最近2012R2にアップグレードされ、その時点でインストールが機能しなくなりました。 vers=3.0 に設定すると問題が解決しました。ほとんどのSamba / CIFSエラーと同様に、「ファイルまたはディレクトリがありません」というメッセージはあまり役に立ちません。

たとえば、

# mount -t cifs //win2012r2/someshare -o cred=/home/foo/.cifs_user,vers=3.0 /mnt/tmp

..私のドメイン名、ユーザー名、およびパスワードは.cifs_userファイルに含まれています。

user=MyUser
password=MyPassword
domain=MyDomain

明らかに、smbmountは問題や特別なオプションなしでうまく機能するため、デフォルトでは最新バージョンのSMBプロトコルを使用しています。

デフォルトのプロトコルバージョンは1.0です。

mount.cifsのマニュアルページから:

vers=arg
       SMB protocol version. Allowed values are:

       · 1.0 - The classic CIFS/SMBv1 protocol.

       · 2.0 - The SMBv2.002 protocol. This was initially introduced in Windows Vista Service Pack 1, and Windows Server 2008. Note  that  the  initial  release
         version of Windows Vista spoke a slightly different dialect (2.000) that is not supported.

       · 2.1 - The SMBv2.1 protocol that was introduced in Microsoft Windows 7 and Windows Server 2008R2.

       · 3.0 - The SMBv3.0 protocol that was introduced in Microsoft Windows 8 and Windows Server 2012.

       · 3.02 or 3.0.2 - The SMBv3.0.2 protocol that was introduced in Microsoft Windows 8.1 and Windows Server 2012R2.

       · 3.1.1 or 3.11 - The SMBv3.1.1 protocol that was introduced in Microsoft Windows 10 and Windows Server 2016.

       · 3 - The SMBv3.0 protocol version and above.

       · default - Tries to negotiate the highest SMB2+ version supported by both the client and server.

       If no dialect is specified on mount vers=default is used.  To check Dialect refer to /proc/fs/cifs/DebugData

       Note too that while this option governs the protocol version used, not all features of each version are available.

       The default since v4.13.5 is for the client and server to negotiate the highest possible version greater than or equal to 2.1. In kernels prior to v4.13,
       the default was 1.0. For kernels between v4.13 and v4.13.5 the default is 3.0.

おすすめ記事