This could also be because of a protocol mismatch.
In 2017 Microsoft patched Windows Servers and advised to disable the SMB1 protocol.
From now on, mount.cifs might have problems with the protocol negotiation.
The error displayed is "Host is down.", but when you do debug with:
smbclient -L <server_ip> -U <username> -d 256
you will get the ...
On archlinux after a recent package update, I had to add vers=1.0 to my mount options. I'm connecting to an old centos 5 box and up until yesterday I could connect without explicitly stating a version number.
CIFS in linux kernel 4.13 now defaults to SMB 3.0 and in kernel 4.14 it tries 2.1 and higher. See this change log.
This apparently possible, according to this StackOverflow post.
Before posting the content of the answer, however, can I suggest that you're over-complicating this?
In situations like this where some crappy piece of code needs a user logged on to run (like Domino server, grumble) I've created a service account that's to always be logged in on a given server, ...
USB-stick at Fritz NAS showed "Host Down" for Ubuntu 17.10:
Defining the version (vers=1.0) worked - here's the full string:
sudo mount -t cifs -o vers=1.0,_netdev,username=<user>,password=<pwd>,uid=1000,gid=1000 //192.168.178.1/fritz.nas <local mountpoint>
I did find a way to do this. Hopefully this helps someone else looking for the same information.
On the server, open a powershell then enter this command:
Get-SmbSession | Select-Object -Property ClientComputerName,ClientUserName,Dialect
For more verbose output:
Get-SmbSession | Select-Object -Property *
I had exactly the same issue but with Samba 4 exports and Windows 7 clients. It is definitely client side error. After some thorough troubleshooting, I simply added the registry key and it worked like a charm after hitting the F5 button once.
Only had to add this registry key:
DirectoryCacheLifetime[DWORD] = 0
I have the same problem because my password contain comma symbol (i.e. "PASS,WORD"):
$ sudo mount -t cifs -o domain=mydomain,username=myuser,password=PASS,WORD //server/share localfolder
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
At first, you should try enable verbose mode (--verbose option):
$ sudo ...
By default, the samba (cifs) package on some distributions doesn't use the hosts file to resolve the name. Instead, it uses the NetBIOS name to resolve to the IP. There are two ways to go about this:
Set samba to use the hosts file for resolution.
In your smb.conf file, find and modify or create the following line:
name resolve order = ...
Not sure why the problem is happening, but as a workaround, have you tried to put something like touch /mnt/windowsbox/keepalive.txt or echo "I am still alive." >/mnt/windowsbox/keepalive.txt to be run via cron every minute? That way the connection should stay active.
You can set the local UID using mount options, example below. You can find out your UID by running the id -u command.
sudo mount -t cifs -o username=maazza,domain=MYDOMAIN,uid=1000 //192.168.123.2/company-files /mnt/test
This will essentially map and override all files within that share to your own local Linux UID, regardless of remote ownership. However, ...
Edit: someone from the community has noticed that official update fixing the problem has been released; this link provides a solution:
Microsoft released the Update KB4487345 to fix the issue:
This update resolves the issue where local users who are part of the local “Administrators“ group may not be able to remotely access shares on Windows 7 SP1 and ...
You're probably missing the fact that Offline Files must be enabled on the client side in order for files and programs accessed from the Share to be cached offline. Additionally, only files and programs that have been opened from the Share are made available offline. Simply accessing the Share doesn't cache it's contents in the Offline Files cache.
Since I just spent my entire morning debugging this same issue. Let me explain what happened above.
## Mount this test share:
/test /etc/auto.test --timeout=60
This means I want to mount something at /test and for the details read /etc/auto.test
Durable handles are part of SMB 2.0
Resilient handles are part of SMB 2.1
Persistent handles are part of SMB 2.2 which is now called SMB3
My main references for the following are:
and although this was originally for Samba3, it has more details:
Durable file ...
This configuration worked for me: 137/UDP, 138/UDP, 139/TCP and 445/TCP. Source and additional information at: http://www.icir.org/gregor/tools/ms-smb-protocols.html.
So these are the iptables rules for my Samba server:
# The router doesn't need SMB access.
-A INPUT -s 192.168.1.1 -p udp --dport 137 -j REJECT
-A INPUT -s 192.168.1.1 -p udp --dport 138 -j ...
I have finally solved the problem.
I'll try to write this answer out more when I have the time.
The issue is connected to resharing a cifs filesystem, and then accessing this from a Windows7 computer.
The samba bug is here:
This apparently stems from the way information is set on the inode in cifs.
I found the answer : you have to use the option nounix together with file_mode and dir_mode
Here is my fstab :
//adsrv01/Photos /mnt/Photos cifs credentials=/root/credentials.txt,file_mode=0770,dir_mode=0770,nounix,uid=505,gid=505 0 0
Will File Share in Azure (SMB3 under the hood) work?
Azure File Sync will help with the local “cache” on premises.
Sorry if this is a late response (I realise it's an old thread), however I have just discovered there is another possible reason why mount.cifs would say the host is down.
I have an antivirus with a firewall and even though I set it explicitly to allow "windows file and print sharing" -- a predefined rule, it was still blocking connections. I had that ...
Direct mounting is not possible, you should mount the share to the host first and then use lxc.mount.entry configuration directive to bind mount share's mountpoint inside the container (an example of using lxc.mount.entry can be found here). You can also provide the container with an external fstab file as shown here.
If I understand, essentially you want to use FreeNAS as both a NAS and a directory server. At the moment, this is not possible. The samba server included in FreeNAS can use an existing LDAP or Active Directory server for authentication, and this works great -- we've used this setup for quite some time. You can easily control the users and groups allowed ...
This seems to be caused by the Linux kernel. Specifically, by the dns_resolver. "FS" is not even attempted at resolution.
The following lines in dns_resolver (net/dns_resolver/dns_query.c) seem to cause this:
if (namelen < 3)
I don't know why there is this check. I will try renaming the other server from "FS" to something longer. I ...
We're doing this with our Active Directory domain joined (winbind) Debian boxes. We use pam_mkhomedir to create a home folder under /home/EXAMPLE/$USER for AD users at logon. Then pam_mount performs the mounting of the AD home directory. On Debian, we needed to install libpam-mount, pam_mkhomedir was installed by default
Once installed the following ...
A little bit late ...
But here is the solution:
docker volume create \
--driver local \
--opt type=cifs \
--opt device=//server/path/to/share \
--opt o=username=myuser,password=mypw,file_mode=0777,dir_mode=0777 \
In some situations the DNS-name did not work, so I have to use the IP.
Using the option "credentials" ...
I received the same error without further ado from a new Samba client, when trying to mount a CIFS SMB network share:
mount error(112): Host is down
Eventually, it turned out I had previously restricted SMB server access to only a limited number of IP addresses by configuring /etc/samba/smb.conf:
# Allow these IP Addresses to connect:
hosts allow = 127.0....
Same trouble connecting to Synology DiskStation (DSM 4.3).
Using vers=1.0 in the mount options works fine.
Additionally I had to use the option "noperm" because all files wrongly showed as not readable and writable by the owner.
My issue was related to:
"mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)"
For me the solution was adding key to regedit in Window. Below is my answer in other topic: