5

I am trying to mount a windows samba share on CentOS and RHEL 6 machines, but gives following error.

~]# mount.cifs //example.com/Linux_Support /mnt -o credentials=/root/cifsauth,noserverino,vers=3.0

mount error(112): Host is down Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Messages logs has this error:

CIFS VFS: cifs_mount failed w/return code = -112

The same above command works in rhel7 and centos7. Any clue on how to make this work?

Arun Krishnan
  • 379
  • 2
  • 3
  • 13

4 Answers4

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.

Arun Krishnan
  • 379
  • 2
  • 3
  • 13
1

I solved this problem by forcing version 1 of the smb protocol.
In my fstab this is done like this:

//192.168.0.XXX/elements/Videos /home/myuser/videos cifs uid=1000,username=myuser,password=mypwd,rw,nounix,noserverino,defaults,auto,vers=1.0 0 0

By default, the system certainly use SMB2 or 3, and it doesn't work with my box. In fact it depends on your NAS. You have to give the good version depending on the SMB server.

Thomas
  • 4,225
  • 5
  • 23
  • 28
olaf_ej
  • 11
  • 1
0

First check the accessibility of your windows host in generally under centos6. If that is given then proceed.

At them moment, I dont have a test-setup to reproduce.I can only imagine. So maybe the default firewall-settings on your centos6 differs from the centos7 default firewall-settings. Did you try to mount with firewall switched off on your centos host? And what about SELinux? Maybe it has it fingers in it too.

Mrk
  • 31
  • 2
  • I disabled firewall and selinux. The windows host is accessible and its not an issue with it because I am able to mount with same command and same host on centos7 – Arun Krishnan Feb 06 '17 at 10:37
0

My issue has been resolved by adding the ip address and hostname of windows server in /etc/hosts file in linux. then creating user in windows server with password. shared the folder with created user. created the file in /.smbcredentials adding following 2 lines

username=<username>
password=<password of user>

try to ping the windows machine with hostname it should ping. otherwise change windows firewall settings. now finally add the entry in fstab as below.

//hostname of windows/shared folder name /local folder on linux cifs credentials=/.smbcredentails,vers=3.0,sec=ntlm,iocharset=utf8,file_mode=0777,dir_mode=0777,gid=100 0 0

save the file and exit now run mount -av command you should get mounted successfully.

Quantim
  • 1,358
  • 10
  • 15