我尝试在 CentOS、Ubuntu 和 Debian 上挂载 samba 共享,但收到错误“CIFS VFS:未指定用户名”,尽管一切看起来都很好。
这是我的 /etc/fstab :
//1.2.3.4/share /mnt/share cifs rw,iocharset=utf8,uid=root,gid=root,credentials=/root/smbcredentials 0 0
我的/root/smbcredentials
username=...
password=...
和我的输出:
# mount /mnt/backups
mount: wrong fs type, bad option, bad superblock on //10.13.37.5/backups,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so.
# dmesg | tail
[ 1308.670814] CIFS VFS: No username specified
答案1
您需要安装cifs-utils
:
yum install cifs-utils # centos/redhat/older fedora
dnf install cifs-utils # newer fedora
apt install cifs-utils # debian/ubuntu