Cannot mount samba share: Mount error (22)

cifsmountsamba

I am trying to mount a password protected samba share.

When I access the share via smb://server/share in nautilus there is no password/user promt, it seems I am logged in as a guest and I can browse folders but I cannot access my files (which are in a subfolder that appears to be empty).

When I use nautilus GUI "connect to Server" prompt, I get back "Please verify your user details" although I am absolutely certain they are correct.

Note that I can access the share and my files without problem via

smbclient -U user //server/share

Also, using a MacOS machine I can also mount the shares without any problems.

So I try to mount the share via the commandline:

sudo mount -t cifs -o user=user //server/share  /mnt/sth

which produces

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

This seems to be a Kernel related bug: https://bugzilla.redhat.com/show_bug.cgi?id=832741.

So my question is: what's the simplest way to solve this? Did anyone experience something similar? Did a Kernel update solve it (at the redheat forums it seems to work for some but not for others). Am I doing something wrong?

I use linux mint xcfe 13, my Kernel version is 3.4.0.

EDIT: 20/2/2013, I still don't have a solution for this and appreciate any help.

Best Answer

Try adding sec=ntlm to your option flags for mount, eg sudo mount -t cifs -o user=user,sec=ntlm //server/share /mnt/sth. Solved the same problem for me.

Source: https://bbs.archlinux.org/viewtopic.php?id=160047

Related Question