0

So I am trying to connect to a network drive that has data that I need. I followed the tutorial here.

I created a directory in the media directory called Z, then I installed the cifs-utils package, with the command

sudo apt-get install cifs-utils

After this I edited the /etc/nsswitch.conf file, to look like this (added the wins):

# /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

after this, I ran the command below to install a package.

sudo apt-get install libnss-winbind winbind

I made a backup of the /etc/fstab file, then entered the credentials to the drive in the form:

username=***
password=***

I then created a file that looks like this:

# /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

The problem is, when I now run:

sudo mount -a

I get this error:

mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

I'm thinking that maybe this example is deprecated, could anyone help me see where I went wrong?

2
  • What do you get when you with this command: sudo umount /media/Z ? May 4, 2018 at 20:35
  • I get this: umount: /media/Z: not mounted @L.D.James
    – pythonweb
    May 7, 2018 at 13:59

0

You must log in to answer this question.

Browse other questions tagged .