Hot answers tagged

129

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 ...


48

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.


23

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, ...


19

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>


18

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 *


15

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 HKEY_LOCAL_MACHINE\System\CurrentControlSet\...


12

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 ...


11

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: [global] name resolve order = ...


11

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.


10

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, ...


10

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 ...


9

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.


8

Since I just spent my entire morning debugging this same issue. Let me explain what happened above. /etc/auto.master ## 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 /etc/auto.test test -fstype=cifs,username=testuser,domain=domain.com,password=...


8

Similar problem after upgrade to ubuntu 17.10, with an old Buffalo Diskstation. Solved by adding in /etc/fstab the "vers=1.0" option: //myWDhostname/partage /media/Partage cifs guest,vers=1.0 0 0


8

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: https://wiki.samba.org/index.php/SMB3_kernel_status and although this was originally for Samba3, it has more details: https://wiki.samba.org/index.php/Samba3/SMB2 Durable file ...


7

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 ...


7

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: https://bugzilla.samba.org/show_bug.cgi?id=9346 This apparently stems from the way information is set on the inode in cifs. See ...


7

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


7

Will File Share in Azure (SMB3 under the hood) work? https://docs.microsoft.com/en-us/azure/storage/files/storage-files-introduction Azure File Sync will help with the local “cache” on premises. https://docs.microsoft.com/en-us/azure/storage/files/storage-sync-files-deployment-guide?tabs=azure-portal


6

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 ...


6

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.


6

I too encounter this every few months. sudo umount -l is my workaround. https://stackoverflow.com/a/96288/2097284


6

I found this link here which says SMB 2 and 3 is not supported for rhel and Centos 6. It can only mount SMB1. From Centos and rhel 7 this is supported.


5

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 ...


5

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) return -EINVAL; I don't know why there is this check. I will try renaming the other server from "FS" to something longer. I ...


5

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 ...


5

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 \ --name myvolume In some situations the DNS-name did not work, so I have to use the IP. Using the option "credentials" ...


4

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....


4

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.


4

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: https://serverfault.com/a/619963/237340


Only top voted, non community-wiki answers of a minimum length are eligible