linux通過cifs掛載windows共享目錄
1、在linux上執行以下命令:
[root@localhost ~]# mount -t cifs -o username=shenhb,password=111111,iocharset=gb2312 //192.168.4.211/book /opt/xdata
mount: //192.168.2.193/xshare 寫保護,將以只讀方式掛載
mount: 無法以只讀方式掛載 //192.168.2.193/xshare
[root@localhost ~]#
查看windows上該文件的讀寫屬性
如果刪除windows上的共享文件夾,回報上面的錯誤;
2、在我自己的win10家庭版中,只要通過如下方式共享的文件夾,
都可以直接如下命令進行掛載通過
[root@localhost ~]# mount -t cifs -o username=shenhb,password=111111,iocharset=gb2312 //192.168.4.211/cnblog /opt/blog
[root@localhost ~]#
3、掛載排錯,進入/var/log/目錄下
[root@localhost log]# dmesg | tail
[1081636.387748] SELinux: initialized (dev cifs, type cifs), uses genfs_contexts
[1081703.840696] CIFS: Unknown mount option "name
[1082181.268033] CIFS: Unknown mount option "name=shenhb"
[1083317.917733] CIFS: Unknown mount option "name=administrator"
[1083352.414715] CIFS: Unknown mount option "name=administrator"
[1083363.541997] CIFS VFS: Malformed UNC in devname.
[1083388.012203] CIFS: Unknown mount option "name=administrator"
[1083941.242988] CIFS VFS: Malformed UNC in devname.
[1084528.124106] CIFS VFS: Malformed UNC in devname.
[1084543.261517] CIFS: Unknown mount option "passwd=CFund#111"
指定的參數名稱錯誤了,應該是username
?
?
?
?
linux通過cifs掛載windows共享目錄