# mount.cifs error(2) on gentoo (no error on debian)

## qeef

Dear Gentooists,

I would like to ask you for help. My mount command does not work for me on my gentoo, but works on my debian pc.

```
mount.cifs -o user=myusername,domain=MYDOMAIN //function/path/to/source/ /my/mountpoint/
```

mount error:

```
mount error(2): No such file or directory

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

I know that you will need some additional information from me to help, just say what, because in fact, I don't know..

Thanks for help,

qeef

----------

## qeef

no, there is no problem such as kernel without cifs support or not installed cifs-utils. I would like to debug my system, but I don't exactly know how to do it.

----------

## diablo465

any updates on this issue? I am having EXACTLY the same problem (the command also works in my UBUNTU).

----------

## vaxbrat

You will need to post your samba versions (gentoo and debian) and specify where the share is that you are trying to mount.  If it's a Windows server, there are many many issues that can prevent this from working on one system versus another.  Also specify which Windows version you are trying to work with.

----------

## diablo465

 *vaxbrat wrote:*   

> You will need to post your samba versions (gentoo and debian) and specify where the share is that you are trying to mount.  If it's a Windows server, there are many many issues that can prevent this from working on one system versus another.  Also specify which Windows version you are trying to work with.

 

I don't think this is related to samba as the working ubuntu/debian hasn't got samba installed. 

mount.cifs version  in gentoo is 6.1 while in debian/ubuntu it is 6.0.

The share I am trying to connect is a windows server in the Uni. please indicate how to check its type/properties (e.g., what command should be used).

other info of my gentoo system:

```
ae429-1105 etc # lsmod |egrep 'fuse|cifs'

 fuse                   72589  5 

 cifs                  312131  0
```

```
ae429-1105 etc # systemctl -t service -a |grep Samba

nmbd.service                         loaded active   running Samba NetBIOS                     name server

smbd.service                         loaded active   running Samba SMB/CIFS     server

winbindd.service                     loaded inactive dead    Samba Winbind daemon
```

----------

## vaxbrat

It is very much related to samba since the underlying authentication mechanisms (kerberos, ntlanman and/or ntlmv2) used to talk to the domain are tied to samba.  At one point mount.cifs was actually part of the samba packaging.  Your working debian/ubuntu versions will have these dependencies installed in spite of not having samba proper.

The way mount.cifs negotiates credentials with the windows server will vary depending on the amount of security that has been piled onto the Windows side and the type of domain being run.  The version of Windows being run matters because there have been jumps in the various protocols and encryption mechanisms involved going from the old windows 95 and NT days to XP and Server 2003 and now Win 7 and Server 2008 or later.

If you can get onto the windows server doing the share, go into the control panel and choose the system icon.  That will tell you right off which version of windows and service pack is being run.  That's a start, but you will probably have to get someone who does domain admin for the Uni to go over the specifics of the domain and whatever group security policy has been set up and pushed out.

This matter may be as simple as the fact that your ubuntu and debian systems have been "joined" to the active directory while your gentoo box has not.  There are books written on the subject (O'Reilly's Samba book and one from Bruce Perens are two good ones) if you find yourself getting into a quagmire.

The bad news is that this stuff can be a huge pile of failure and frustration.  Politics often get involved when you have an environment where the Windows guys go off and do crap without telling the Linux and Unix folks and vice versa.  The good news is that it will make you a very marketable sysadmin if you can get good at it.

----------

## diablo465

I have a solution to work around this problem.

first mount the smb network using file manager (e.g., nautilus)

Then access the mount at:

```
/run/user/{UID}/gvfs/
```

Problem solved

----------

