因此,我尝试连接到具有我需要的数据的网络驱动器。我按照教程这里。
我在媒体目录中创建了一个名为 Z 的目录,然后使用以下命令安装了 cifs-utils 包
sudo apt-get install cifs-utils
之后我编辑了 /etc/nsswitch.conf 文件,如下所示(添加了胜利):
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: ******
group: compat
shadow: compat
gshadow: files
hosts: files mdns4_minimal [NOTFOUND=return] wins dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
此后,我运行以下命令来安装包。
sudo apt-get install libnss-winbind winbind
我备份了 /etc/fstab 文件,然后以以下形式输入驱动器的凭据:
username=***
password=***
然后我创建了一个如下所示的文件:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=5cf6df9a-462a-42bb-aa94-2b29475d6578 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=f546dc20-4811-4f03-8296-fe9c9b549197 none swap sw 0 0
## Mount Windows (Z)
//IP_ADDRESS /media/Z cifs credentials=/home/my_username/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777 0 0
问题是,当我现在运行时:
sudo mount -a
我收到此错误:
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
我在想也许这个例子已经被弃用了,有人能帮我看看我哪里错了吗?