Mount cifs fails with mount failed: No such file or directory

I am trying to mount a samba share on my OpenWRT router but I have the same error:

mount: mounting //192.168.0.254/Disque dur on /mnt/freebox failed: No such file or directory

I tried:

mount -t cifs "//FREEBOX/Disque dur" -o username=freebox,password="" /root/freebox

mount -t cifs "//192.168.0.254/Disque dur" -o username=freebox,password="" /root/freebox

mount -t cifs //FREEBOX -o username=freebox,password="" /root/freebox

mount -t cifs -o username=freebox,rw,iocharset=utf8,file_mode=0777,dir_mode=0777 "//FREEBOX/Disque dur" /root/freebox

mount -t cifs -o username=freebox,rw,iocharset=utf8,file_mode=0777,dir_mode=0777 "//192.168.0.254/Disque dur" /root/freebox

mount -t cifs -o user=freebox "//192.168.0.254/Disque dur" /mnt/freebox

mount -t cifs -o user=freebox "\192.168.0.254\Disque dur" /mnt/freebox

mount -t cifs -o user=freebox,sec=ntlm "//192.168.0.254/Disque dur" /mnt/freebox

mount -t cifs -v -o domain=WORKGROUP,sec=krb5 "//192.168.0.254/Disque dur" /mnt/freebox

mount -t cifs -o user=freebox,vers=1.0 "//192.168.0.254/Disque dur" /mnt/freebox

mount -t cifs -o user=freebox,vers=2.0 "//192.168.0.254/Disque dur" /mnt/freebox

mount -t cifs -o user=freebox,vers=3.0 "//192.168.0.254/Disque dur" /mnt/freebox

mount -t cifs -o user=freebox,vers=1.0,sec=ntlm "//192.168.0.254/Disque dur" /mnt/freebox

mount -t cifs -o user=freebox,vers=2.0,sec=ntlm "//192.168.0.254/Disque dur" /mnt/freebox

mount -t cifs -o user=freebox,vers=3.0,sec=ntlm "//192.168.0.254/Disque dur" /mnt/freebox

mount -t cifs -o user=freebox,vers=1.0,sec=krb5 "//192.168.0.254/Disque dur" /mnt/freebox

mount -t cifs -o user=freebox,vers=2.0,sec=krb5 "//192.168.0.254/Disque dur" /mnt/freebox

mount -t cifs -o user=freebox,vers=3.0,sec=krb5 "//192.168.0.254/Disque dur" /mnt/freebox

The only time it works is only on Windows with:

net use J: "\192.168.0.254\Disque dur" /PERSISTENT:NO

I think the space between Disque and dur should be the problem

Does this directory exist?

the mtn directory exist but not freebox

It has to exist before running the mount command

I tried:

mount -t cifs -o user=freebox "//192.168.0.254/Disque\040dur" /mnt/freebox
and
mount -t cifs -o user=freebox //192.168.0.254/Disque\040dur /mnt/freebox

Same things

mkdir /mnt/freebox

So I did:

mkdir /mnt/freebox
mount -t cifs -o user=freebox "//192.168.0.254/Disque dur" /mnt/freebox

and I have now:

mount: mounting //192.168.0.254/Disque dur on /mnt/freebox failed: No such device

Can you try a share name without spaces?

There could be a bug in the current cifs implementation, but it needs to be proven first by trying a mount without spaces.

So I tried:

mkdir /mnt/MyPC
mount -t cifs -o user=Tom60 "//TOM-PC-FIX/Users" /mnt/MyPC
mount -t cifs -o user=Tom60 "//192.168.1.171/Users" /mnt/MyPC
mount -t cifs -o user=Tom60 //TOM-PC-FIX/Users /mnt/MyPC
mount -t cifs -o user=Tom60 //192.168.1.171/Users /mnt/MyPC

and:

mount: mounting //192.168.1.171/Users on /mnt/MyPC failed: No such device

Ok, back to basics: did you install the cifs modules: opkg list | grep cifs ?

1 Like

Okay, so opkg list | grep cifs cmd return nothings.

I follow https://openwrt.org/docs/guide-user/services/nas/cifs.client and I tried again:

mount -t cifs //TOM-PC-FIX/Users /mnt/MyPC -o user=Tom60,password=****,vers=2.0

and that work !

Now with the space:

mount -t cifs "//192.168.0.254/Disque dur" /mnt/freebox -o user=freebox,vers=2.0
mount -t cifs //192.168.0.254/Disque\040dur /mnt/freebox -o user=freebox,vers=2.0

I got:

mount: mounting //192.168.0.254/Disque dur on /mnt/freebox failed: Host is down

Okay, I did:

mount -t cifs "//192.168.0.254/Disque dur" /mnt/freebox -o user=freebox,sec=ntlm,vers=1.0

And now it's mounted!

Thank you all.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.