投げ銭

★当サイトへの投げ銭(PayPal)★

LINK


(無償、寄付歓迎) logo
世界中で使われるISO標準オフィスソフト(MSオフィス互換)

★LibreOfficeの導入事例★
詳細について

人気の投稿(1ヶ月間)

Ad

Ad

投げ銭

★当サイトへの投げ銭(PayPal)★

2019年11月11日月曜日

【Raspbian Buster September 2019】古いタイプのSAMBAサーバーの共有フォルダをマウントする方法


■念の為、次のパッケージを導入しておいた。
(これらは不要かもしれないので、後に示すmount -t cifs コマンドでマウント可能か先に試してみること。)

# apt-get install samba-common smbclient samba-common-bin smbclient  cifs-utils



■Sambaサーバーに接続して、共有フォルダをマウントした。

Raspbian Buster September 2019 から、mount -t cifs を用いて、
CentOS 6のSAMBAサーバー(Ver. 3.6.23 43.el6_9)に接続するためには、
明示的に、vers=1.0と、sec=ntlmssp のオプションを付加しなければならなかった。

さもなければ、次のエラーが発生してサーバーへの接続に失敗した。
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
あるいは、次のエラーが発生して失敗した。
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

いずれの場合も、次のように、オプションを指定すると問題なく接続でき、マウントに成功した。
root@raspberrypi:/home/pi# mount -t cifs //my-file-server.example.com/SHARENAME /mnt -o user=USERNAME,pass=PASSWORD,vers=1.0,sec=ntlmssp


Raspbian Buster September 2019 では、カーネルにおいて、SMBはversion 3がデフォルトになったらしい。
そのため、SMB3や、SMB2.1をサポートしていない古いタイプのSAMBAサーバーに接続するには、
上記のようにオプションを指定する必要がある。

エラー発生後に、dmesgコマンドで調べると、次のログが記載され同様の説明が行われていた。
[174413.609298] No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
[174413.653627] CIFS VFS: cifs_mount failed w/return code = -22


<参考>

・Pi 3B+ Samba client mount issues... mount error(22)
< https://www.raspberrypi.org/forums/viewtopic.php?t=209698 > 2019年11月11日

・Access network Samba share from Pi client
< https://raspberrypi.stackexchange.com/questions/40974/access-network-samba-share-from-pi-client > 2019年11月11日

投げ銭

★当サイトへの投げ銭(PayPal)★

Ad

Ad