如何解决linux mount cifs 挂window 网盘问题

2025-03-24 23:01:48
推荐回答(3个)
回答1:

  在centos mount cifs 挂window 网盘容易出现问题如下:

回答2:

基本步骤:例如:

sudo mkdir /mnt/windowsshare
sudo mount -t cifs -o username=guest,password=,rw,nobrl,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777 //192.168.0.2/shareddocs /mnt/windowsshare


你遇到的是什么问题?

回答3:

一、挂载时,用户/密码错误

mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

对应/var/log/message记录

Oct 12 16:20:01 localhost kernel: Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
Oct 12 16:20:01 localhost kernel: CIFS VFS: Send error in SessSetup = -13
Oct 12 16:20:01 localhost kernel: CIFS VFS: cifs_mount failed w/return code = -13

二、没有分享目录

Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

对应/var/log/message记录

Oct 12 16:20:06 localhost kernel: CIFS VFS: cifs_mount failed w/return code = -6
Oct 12 16:20:17 localhost kernel: CIFS VFS: cifs_mount failed w/return code = -6
Oct 12 16:20:17 localhost kernel: CIFS VFS: cifs_mount failed w/return code = -6

目前遇到的问题就是这些
补充一句,格式一定要写正确:mount -t cifs -o username=administrator,password=**** //192.168.1.1/分享目录 /linux/share