Ubuntu 15.10(全新安装)
我已将 fstab 设置为:
//192.168.0.2/Music /home/pst007x/Music/ServerMusic cifs auto,credentials=/home/pst007x/.smbcredentials,defaults 0 0
当我启动系统时,共享驱动器的图标出现在 Nautilus 中,但是当我单击它时出现错误:
安装:只有 root 可以将 //192.168.0.2/Music 挂载到 /home/pst007x/Music/ServerMusic
如果我运行:
sudo mount -a
网络驱动器可以访问,但由于需要 root 权限,我无法卸载。
pst007x@pst007x-Serval-Professional:~$ groups
pst007x adm cdrom sudo dip plugdev lpadmin sambashare
pst007x@pst007x-Serval-Professional:~$ id
uid=1000(pst007x) gid=1000(pst007x) groups=1000(pst007x),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),128(sambashare)
pst007x@pst007x-Serval-Professional:~$
运行 DMSG 时出现以下错误:
[ 6.862055] CIFS VFS: Error connecting to socket. Aborting operation. [ 6.862102] CIFS VFS: cifs_mount failed w/return code = -101
有任何想法吗?
答案1
我使用以下方法解决了这个问题:
终端:
sudo gedit /etc/fstab
然后添加以下内容:
//192.168.0.2/Music /home/pst007x/Music/ServerMusic cifs _netdev,comment=systemd.automount,auto,owner,credentials=/home/pst007x/.smbcredential,uid=1000,gid=1000,iocharset=utf8,sec=ntlm 0 0