
由於某種原因,我可以使用 cifs 掛載我的 NAS,如下所示:
sudo mount -t cifs //10.0.0.210/data -o username=xxxxxxxxxxxxx,password=xxxxxxxxxxx,rw,nounix,iocharset=utf8,file_mode=0644,dir_mode=0755 /mnt/nas
但是當我將其輸入我的 fstab 時:
//10.0.0.210 /mnt/nas cifs username=xxxxxxxxxxxxx,password=xxxxxxxxxxxxx,rw,nounix,iocharset=utf8,file_mode=0644,dir_mode=0755
我運行這個:
sudo mount -a
我明白了:
mount: unknown filesystem type 'cifs'
這裡的任何幫助都會很棒。謝謝
答案1
手機可能未載入。
sudo modprobe cifs
*更新為模組名稱
答案2
我遇到了 CIFS 的這個問題和其他問題,似乎在 ubuntu 18.04 上您也應該安裝cifs-utils
以更好地支援 SMBv3,以獲得最佳安全性。
apt-get install cifs-utils
我還建議您將憑證放入文件中。例如/root/.smbfile
username=<user>
password=<password>
和chmod 600 /root/.smbfile
那你/etc/fstab
可以是這個
//10.0.0.210/data /mnt/nas cifs credentials=/root/.smbfile,nounix,iocharset=utf8,file_mode=0644,dir_mode=0755`