Ubuntu(Linux) mount error(22):解決辦法


錯誤log

執行命令

sudo mount -t cifs //ip/sharename /tmp/1 -o username=11,password=tmp

錯誤提示

mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

解決辦法

查看root cause:

tail -f /var/log/kern.log

提示:

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.

提示里面已經指明解決方法,沒有指定cifs共享的版本,cifs分為smb1.0/2.0/3.0/3.1。

解決辦法

sudo mount -t cifs //ip/sharename /tmp/1 -o username=11,password=tmm,vers=1.0


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM