OpenWrt Forum Archive

Topic: mount.cifs and rc4

The content of this topic has been archived on 13 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I previously used cifsmount to mount samba shares with rc3, but can't get it to work with  rc4.

root@wif:~# insmod cifs
Using /lib/modules/2.4.30/cifs.o
insmod: A module named cifs already exists
root@wif:~# mount.cifs //serveur/partage /mnt/serveur/ -o username=sam
Password:
mount error 22 = Invalid argument
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

I've tried all the possibilities i could think of, but i always get this invalid argument message. Besides i'm nearly certain that I used this exact syntax with rc3 since it's the same as smbmount...

cifs appears busted in RC4, i don't know anyone who ever got it working.

i gave up and used shfs instead.

mout.cifs work in rc4

You should try passing options before argument, it is always better doing :

mount.cifs -o username=toto //server/share /mountpoint

In fact it does not work at all if you give options before argument. Please test before you give advice. sad

# mount.cifs -o username=user //server/share /mnt

Mounting the DFS root for domain not implemented yetNo ip address specified and hostname not found

# mount.cifs

Usage:  mount.cifs <remotetarget> <dir> -o <options>

# mount.cifs //server/share /mnt -o username=user
Password:
mount error 22 = Invalid argument
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

mount.cifs works for me. It has some weird behavior, but it works.

have you tried with IP?
mount.cifs -o username=user //<<yourip>>/share /mnt

=> mount have no wins client - so no wins adress resolution

Nico wrote:

CIFS use is described in the Wiki : http://wiki.openwrt.org/RemoteFileSystemHowTo

This is hosed.  I've been trying this all day and can't get it to work.  Tried a variety of syntax and user accounts and machines.

I have kmod-cifs installed,
cifsmount installed.

(also have aircrack installed from backports)

The shares I am trying to mount have "Everyone" with full access rights, but I still use accounts that have Administrative rights.

I've tried the \\\\servername\\share,   //servername/share,  //servername\\share...
mount,  mount.cifs,  etc.    created directory where the mount point will be, also tried without it.   Used IP address instead of names and I get the same result.

Can not get it to work.

Yes, I've read the Howto on mounting remote filesystems several times.  But I get two different errors:

"failed: Invalid argument"    when using mount -t cifs \\\\servername\\share /mount/point   (it does not matter if I specify the -o arguments or not  with the unc=//thisbusiness\\share, user(or username)=Administrator, pass(or password)=xyz, dom=workgroup (or domain name) )  same error.

Also following the notes on the HowTo->remotefilesystem say to use:  mount.cifs ...  None of this works!  Copy/pasted the text below:

fromtheHowTo wrote:

In RC4: with cifsmount installed mount.cifs //192.168.1.100/share /mnt/point -o user=xxx pass=xxx work. mount -t cifs comes back with an invalid argument.

NoahTernullo: the format that I found to work is:

mount.cifs \\\\fileserver\\share /mnt/point -o username=youname,password=yourpassword


Once mounted with mount.cifs. mount -t cifs returns: //192.168.1.77/HDD_1_1_1 on /mnt type cifs (rw,mand,nodiratime,unc=\\192.168.1.100\share,username=root,domain=,rsize=16384,wsize=16384)

Something isn't quite right but you can make it work'ish (no fstab, no style points.)

The other I get is some message that says Can not change into the directory  but I think that was relating to not having the directory made where I wanted to mount the filesystem.

This IS a native Windows 2003 domain, could there be some encryption crap going on somewhere (or lack there-of).

Maybe I am missing some more modules?   This is just driving me batty as I've been at it all day long, digging around - even got the MAN page for mount.cifs  which didn't help.

I even went as far as adding the computer/server names to the Host file.

Tried moving to shfs but trying to find an app that will run on Windows that will host an SHFS share seems to be impossible, either that or I am just getting burned out.

Thanks,
Ed.

A list of my installed packages on WhiteRussian RC5:

aircrack
base-files
base-files-brcm
bridge
busybox
cifsmount
dnsmasq
dropbear
haserl
htpdate
ipkg
iptables
iwlib
kernel
kmod-brcm-wl
kmod-cifs
kmod-diag
kmod-madwifi
kmod-ppp
kmod-pppoe
kmod-switch
kmod-wlcompat
lcd4linux
libelf
libncurses
libnetsnmp
libpcap
libpthread
madwifi-tools
mtd
ntpclient
nvram
ppp
ppp-mod-pppoe
snmpd
tcpdump
uclibc
webif
wificonf
wireless-tools
wl

Oh, I have a Linksys WRT54G V1.0

Maybe I should make this a new topic.

Drop the trailing slash from the mount dir.
mount.cifs //serveur/partage /mnt/serveur  -o username=sam

John_100 wrote:

Drop the trailing slash from the mount dir.
mount.cifs //serveur/partage /mnt/serveur  -o username=sam

My result:
Password:  <I enter the password>
mount error 22 = Invalid argument
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

Maybe if I change to JFFS?

Ok, it must be a syntax thing.  I get the same error on RC4.

This is what I get -

root@OpenWrt:/# mkdir /mnt/net
root@OpenWrt:/# mount.cifs //myserver/share /mnt/net -o user=Administrator
Password:
mount error 22 = Invalid argument
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
root@OpenWrt:/# ping myserver
PING myserver (192.168.1.2): 56 data bytes
64 bytes from 192.168.1.2: icmp_seq=0 ttl=128 time=5.0 ms
...

Regards,
Ed

did you try using an ip address as the server name, or using the ip= mount option?

Nico wrote:

did you try using an ip address as the server name, or using the ip= mount option?

Yes.  Same result.

I just checked it with RC5 and can confirm it's working against a debian samba server using the following syntax (the same one I already explained in the Wiki) :

root@ap:/# mount -t cifs //my-server/home /home -o unc=\\\\my-server\\home,ip=192.168.1.1,user=nico,pass=hidden,dom=mydomain

When using the mount command (and not mount.cifs), you'll have to pass the unc=, ip= and pass= options, since mount arguments are passed directly to the kernel which has no way to guess the server ip from its name or prompt you with a password.

(Last edited by Nico on 20 May 2006, 23:58)

Thank you for your time in reseaching this.  So, I need Samba to be installed?  Trying the command above yields the same result.  The text of the error is the same, but the message is consistent - mount error 22, invalid argument ...  which makes sense  - doesnt mount.cifs rely on mount?   I am wondering if this is an issue with windows 2003 A/D ....

If you're checking it against Samba, that's not really apples to apples.  Maybe I should just find a distro of linux to install!

root@OpenWrt:/# mount -t cifs //myserver/share /mnt/net -o \\\\myserver\\share,ip=192.168.1.2,user=Administrator,pass=mypassword

mount: Mounting //myserver/share on /mnt/net failed: Invalid argument

Thanks again,
Ed

Eddiie wrote:

root@OpenWrt:/# mount -t cifs //myserver/share /mnt/net -o \\\\myserver\\share,ip=192.168.1.2,user=Administrator,pass=mypassword

Please pass all options:

mount -t cifs //myserver/share /mnt/net -o unc=\\\\myserver\\share,ip=192.168.1.2,user=Administrator,pass=mypassword,dom=domain

Same same same result.

can I just verify some basic communciation by using tcpdump?

I do not see any connections to my windows server from the WRT device, other than port 22 (SSH) when using netstat -a on the windows box, command prompt.

what does logread says?

For this command-
mount -t cifs //myserver/share /mnt/net -o unc=\\\\myserver\\share,ip=192.168.1.2,user=Administrator,pass=mypassword,dom=domain

Log Read says -
May 20 23:31:01 (none) kern.err kernel:  CIFS VFS: Error connecting to IPv4 socket. Aborting operation
May 20 23:31:01 (none) kern.err kernel:  CIFS VFS: cifs_mount failed w/return code = -148

For this command -
mount.cifs //myserver/share /mnt/net -o user=Administrator

LogRead says -
May 20 23:33:59 (none) kern.err kernel:  CIFS VFS: Send error in SessSetup = -5
May 20 23:33:59 (none) kern.err kernel:  CIFS VFS: cifs_mount failed w/return code = -5

Any news on this one?

I am having the exact same problem Eddiie.  Have you resolved the issue?

I am running RC5 and trying to mount a Windows XP SP2 share.  Same result, same error message. 

root@bluebox #> mount.cifs //ghost/inc /mnt/video -o unc=\\\\ghost\\inc,ip=192.168.1.111,user=username,pass=password,dom=domain
unc name specified twice, ignoring second
mount error 22 = Invalid argument
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

logread:
May 31 21:26:19 (none) kern.err kernel:  CIFS VFS: Send error in SessSetup = -5
May 31 21:26:19 (none) kern.err kernel:  CIFS VFS: cifs_mount failed w/return code = -5

I am able to successfully connect to the windows box using smbclient.

Are there any similar alternatives to cifs that would allow a remote Windows filesystem to be mounted?

-Anthony

(Last edited by midblue on 1 Jun 2006, 02:34)

The discussion might have continued from here.