1、Windows创建共享目录,一定要添加Guest(Windows来宾用户)用户,并设置读写权限 2、在Linux系统中创建挂在目录,如:/shareLinux 3、使用Linux挂载命令 mou
1、Windows创建共享目录,一定要添加Guest(Windows来宾用户)用户,并设置读写权限
2、在Linux系统中创建挂在目录,如:/shareLinux
3、使用Linux挂载命令
mount -t cifs //192.168.xx.xx/shareLinux /shareLinux -o username="xxx",password="xxx"
如果是win10命令需要添加vers=2.0,如
mount -t cifs //192.168.xx.xx/shareLinux /shareLinux -o vers=2.0,username="xx",password="xx"
4、Linux提示 mount: block device //192.168.xx.xx/share/yasi is write-protected, mounting read-only
mount: cannot mount block device //192.168.xx.xx/share/yasi read-only 需要安装 cifs-utils
命令:sudo apt-get install cifs-utils
5、Linux提示 mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) 用户连接异常:可能是密码错误,如果确认密码没有问题,可以在Windows的共享设置中关闭密码保护共享
5、mount 在挂载时默认用户时root,并且不能修改目录权限,如果需要挂载给其它用户可以在加载命令中加入uid="xx" ,如
mount -t cifs //192.168.xx.xx/shareLinux /shareLinux -o vers=2.0,username="xx",password="xx" uid="xx"