Why am I getting [mount error(22): Invalid argument] while trying to mount SMB network drive?
- by Steve_
Disclaimer: I am very new to Linux :)
Anyway, onward:
I have a fresh instance of Ubuntu Server (12.04.1 LTS) running on my network and I want to mount a network drive to the server so I can access the contents. The network drive is a SAMBA compatible drive running Darwin OS.
If I run the following command:
smbclient -L //192.168.0.2 -U myuser
It prompts me for the password and then displays output similar to:
Domain=[SERVER01] OS=[Darwin] Server=[@(#)PROGRAM:smbd PROJECT:smbx-105.4.0]
Sharename Type Comment
--------- ---- -------
Comp Staff's Public Folder Disk
CompRaid03 Disk
Dropbox Disk
Groups Disk
IPC$ IPC
Public Disk
Users Disk
compstaff Disk
However, when I try and mount the CompRaid03 share, using this command:
sudo mount -t cifs //192.168.0.2/CompRaid03 /mnt/myshare -o username=myuser
I get the same password prompt, but after putting the correct password in, I received this error:
mount error(22): Invalid argument
dmesg | tail returns:
[23576.037373] CIFS VFS: cifs_mount failed w/return code = -22
I don't understand what is wrong with this command. I've managed to mount a share on my current (Windows 8) machine using basically the same command but with a different IP address and share name (obviously). I've spent a good few hours trying to solve this and got no where. Any help or pointers would be greatly appreciated.
Thanks
Steve
EDIT
As suggested I've also trued using "user=" instead of "username=":
sudo mount -t cifs //192.168.0.2/CompRaid03 /mnt/svnrepo -o user=myuser
This results in the same "Invalid argument" error.