# [SOLVED] Cannot mount samba share with cifs

## cajzell

Hello,

I have a ASUS Wireless Router called RT-N66U where I can attach a USB disc and share it via samba. I have done so and am trying to connect to it from a computer running gentoo, but despite many attempts, I do not seem to be able to mount it. This is what happens:

```
/usr/bin/smbclient -L RT-N66U

Enter root's password: 

Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.37]

        Sharename       Type      Comment

        ---------       ----      -------

        testmapp (at sdb1) Disk      sdb1's testmapp in SanDisk Cruzer Blade

        IPC$            IPC       IPC Service (RT-N66U)

Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.37]

        Server               Comment

        ---------            -------

        RT-N66U              RT-N66U

        Workgroup            Master

        ---------            -------

        WORKGROUP            

```

I think I should mount this with

```
mount -t cifs -o username=testuser,password=testpassword //RT-N66U/testmapp /mnt/usbshare/
```

But I always get this

```
Retrying with upper case share name

mount error(6): No such device or address

Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

```

I have tried a few permutations of the path, like //RT-N66U/sdb1/testmapp and have also escaped all the "/"-signs, but it always gives me the above response. I looked at the man mount.cifs, but I didn't find anything relevant.

```
modinfo cifs

filename:       /lib/modules/3.7.9-gentoo/kernel/fs/cifs/cifs.ko

version:        2.0

description:    VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows

license:        GPL

author:         Steve French <sfrench@us.ibm.com>

srcversion:     A2FADCA1AC5C6A641387A4C

depends:        

intree:         Y

vermagic:       3.7.9-gentoo SMP mod_unload modversions 

parm:           CIFSMaxBufSize:Network buffer size (not including header). Default: 16384 Range: 8192 to 130048 (int)

parm:           cifs_min_rcv:Network buffers in pool. Default: 4 Range: 1 to 64 (int)

parm:           cifs_min_small:Small network buffers in pool. Default: 30 Range: 2 to 256 (int)

parm:           cifs_max_pending:Simultaneous requests to server. Default: 32767 Range: 2 to 32767. (int)

parm:           enable_oplocks:Enable or disable oplocks (bool). Default:y/Y/1 (bool)

```

Is the mount -t cifs command above correct?Last edited by cajzell on Sat Mar 02, 2013 9:38 pm; edited 1 time in total

----------

## eyoung100

Try:

```
mount -t cifs -o username=testuser,password=testpassword IPC$/testmap
```

----------

## cajzell

It didn't work, I got

```
mount -t cifs -o username=testuser,password=testpassword IPC$/testmap /mnt/ST3250823A/

mount.cifs: bad UNC (IPC$/testmapp)
```

Tried with "//" before IPC$ also.

----------

## imaginasys

Hi,

Try     //RT-N66U/IPC$/testmap

Also try to use IP address instead of RT-N66U.

Here an example of a share I use at work:

sudo mount -t cifs //ip3.gouv.qc.ca/347$/usagers/R03C01A/trebe03 /home/bernard/U -o credentials=/home/bernard/.ip3,iocharset=utf8,file_mode=0777,dir_mode=0777

The password file contains : 

```
username=testuser

password=testpassword

domain=ip3
```

If you're in a workgroup don't put  the 'domain' part.

I prefer to use a credential file to avoid problem with special character in passwords.  

Take a look at the manpage of "mount.cifs", il may have hints.

Regards,

             BT 

 :Mr. Green: 

----------

## eyoung100

imaginasys beat me to it

cifs looks for the FQSN - Fully Qualified Share Name.  I as going to do what he suggested next on the premise that your error changed from mount error 6 to mount.cifs error

----------

## cajzell

Hello and thanks for your help.

I did as imaginasys said, but I got:

```
mount -t cifs -o username=testuser,password=testpassword,domain=ip3 //192.168.1.1/IPC$/testmapp /mnt/ST3250823A/

mount error(5): Input/output error

Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

```

I also tried without the domain=ip3 part and also with RT-N66U instead of IP.

Can it be that the router don't work well with cifs on the client side?

----------

## eyoung100

 *cajzell wrote:*   

> Hello and thanks for your help.
> 
> I did as imaginasys said, but I got:
> 
> ```
> ...

 

Unplug/umount the USB Disk and plug it in/mount it on a normal usb port

Tell us if it mounts...

----------

## imaginasys

 *cajzell wrote:*   

> mount -t cifs -o username=testuser,password=testpassword,domain=ip3 //192.168.1.1/IPC$/testmapp /mnt/ST3250823A/
> 
> I also tried without the domain=ip3 part and also with RT-N66U instead of IP...

 

Don't use the domain=ip3 part.  ip3 is my domain name at work!  :Exclamation: 

regards,

                 BT

 :Mr. Green: 

----------

## cajzell

I installed an app on iPad that could explore shares on samba and I was able to see it fine from there, so I guess there is no problem with mounting or anything similar.

Is there anything special with cifs in comparison with the old smbmount command that the server don't support?

----------

## cajzell

Eventually I found out how it was supposed to be called:

```
mount -t cifs -o username=testuser,password=testpassword //192.168.1.1/testmapp\ \(at\ sdb1\) /mnt/ST3250823A/
```

Thanks for your help, imaginasys and eyoung100.

----------

## imaginasys

Always beware of specials characters in share name or password!  :Mr. Green: 

You're welcome!

----------

