# can not use mount.cifs "Unable to find suitable address"

## diablo465

I am using gentoo with systemd.

```
localhost linux # mount.cifs //file.aaa.edu.au/abcd /home/ging/Hdrive -o username=username,domain=abc,rw,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777

Password for username@//file.aaa.edu.au/abc:  **********

Unable to find suitable address.
```

The same command is working in ubuntu

here are some other information.

```

localhost linux # rc-update

            alsasound |      default                 

             bootmisc | boot                         

                devfs |                       sysinit

                dmesg |                       sysinit

                 fsck | boot                         

             hostname | boot                         

              hwclock | boot                         

              keymaps | boot                         

            killprocs |              shutdown        

                local |      default                 

           localmount | boot                         

             loopback | boot                         

              modules | boot                         

             mount-ro |              shutdown        

                 mtab | boot                         

               net.lo | boot                         

             netmount |      default                 

              numlock |      default                 

               procfs | boot                         

                 root | boot                         

                samba |      default          sysinit

            savecache |              shutdown        

                 swap | boot                         

            swapfiles | boot                         

               sysctl | boot                         

                sysfs |                       sysinit

            syslog-ng |      default                 

         termencoding | boot                         

         tmpfiles.dev |                       sysinit

       tmpfiles.setup | boot                         

                 udev |                       sysinit

           udev-mount |                       sysinit

              urandom | boot                         

           vixie-cron |      default                 

                  xdm |      default
```

```
localhost linux # lsmod

Module                  Size  Used by

ppp_mppe                6155  2 

sha256_generic         10052  0 

cifs                  408173  0 

fscache                30752  1 cifs

ppp_async               7066  1 

crc_ccitt               1275  1 ppp_async

ppp_generic            23284  6 ppp_mppe,ppp_async

slhc                    4882  1 ppp_generic

fuse                   72589  2 

ath9k                 156064  0 

ath9k_common            1839  1 ath9k

ath9k_hw              412646  2 ath9k_common,ath9k

ath                    15638  3 ath9k_common,ath9k,ath9k_hw

vboxnetflt             15634  0 

vboxnetadp             17702  0 

vboxdrv              1809437  3 vboxnetadp,vboxnetflt

```

----------

## gerdesj

 *diablo465 wrote:*   

> I am using gentoo with systemd.
> 
> ```
> localhost linux # mount.cifs //file.aaa.edu.au/abcd /home/ging/Hdrive -o username=username,domain=abc,rw,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777
> 
> ...

 

Please try this:

```

#mount -t cifs -o dom=<DOMAIN>,user=<username>,pass=<password> //<system>.example.edu.au/<share> /<mountpoint> 

```

Substitute your settings.  You should not be typing any <> in your settings, I've just used them to show a user supplied field.  This mount command has an added bonus because it can be used nearly directly in /etc/fstab - it should be pretty obvious how (the -o bit is the options field in fstab).  If that works, then add in your other settings and see how it goes.  If you leave out the pass=<password> bit it will prompt for it.

There are some other tests to try and narrow down the problem.  In my experience, snags with connecting to the world of Windows generally boil down to DNS and time keeping.

#dig <FULLY_QUALIFIED_DOMAIN_NAME> 

should return the IPs of all DCs - if not fix up your /etc/resolv.conf perhaps via NetworkManager or whatever you use to config your network.

If you have the rest of Samba installed you can try

#net ads info 

Set up OpenNTP and point it at your DCs for time or to whatever they sync to.  If you can't play with the DCs, you *may* get some information with w32tm /monitor in a cmd prompt on a Windows PC that is a domain member. 

Cheers

Jon

----------

## diablo465

Thanks very much Jon, I have narrowed down the snag a bit by reducing the CIFS items in the kernel down to the following ones. 

```

File Systems --->

    [*] Network File Systems --->

        [M] CIFS support (advanced network filesystem, SMBFS successor)--->

            [*] CIFS Statistics

                [*] Extended Statistics

            [*] CIFS Extended Attributes

                [*] CIFS POSIX Extentions

```

Then I get some update:

```

ae429-1105 Hcifs # mount -t cifs  -o username=user,domain=AB,rw,iocharset=utf8,file_mode=0777,dir_mode=0777 --verbose //file.abc.edu.au/user /home/directory/path 

Password for user@//file.abc.edu.au/user:  **********

mount.cifs kernel mount options: ip=123..456.78.90,unc=\\file.abc.edu.au\user,iocharset=utf8,file_mode=0777,dir_mode=0777,user=uqczhan2,,domain=UQ,pass=********

mount error(2): No such file or directory

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

```

  It is certified that the mountpoint is accessible.

Also the relevant modules and services has been enabled, i.e.,

```

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

     fuse                   72589  5 

     cifs                  312131  0
```

and

```

    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

```

As the same command is working in ubuntu/debian, i assume there is no problem about the server.

The version of non-working and working mount.cifs in gentoo and debian/ubuntu are 6.1 and 6.0, respectively.

----------

## diablo465

Now 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

----------

## Logicien

This is a workaround of your original problem, not a solution. The path of your shares should be seen by the command

```
smbtree -N
```

----------

## krinn

Try also this ancien greek command only priests knows :

rc-update del net.lo boot

----------

