Friday, October 29, 2010

CIFS VFS No username specified cifs_mount failed code = -22

I wanted to use a credentials file instead of plain text user and password in fstab. I did that before in Ubuntu but for some reason in one of my servers I was getting the below:
# mount /mnt/mymount
mount: wrong fs type, bad option, bad superblock on \\windowsbox\shared,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount. helper program)
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

From system logs:
# dmesg|tail
[8628151.305806]  CIFS VFS: No username specified
[8628151.306141]  CIFS VFS: cifs_mount failed w/return code = -22

Solution

This was related to smbs not being installed:
# apt-get install smbfs
# which mount.cifs

5 comments:

Alexander said...

Thx man! Helped me a lot.

Chris Lambert said...

Ditto!

Chris Lambert said...
This comment has been removed by the author.
shib said...

For centos, install cifs-utils
# yum install cifs-utils

Craig said...

Thanks!

Followers