Ошибка host is down

Автор Tangarius, 19 ноября 2020, 11:12:25

« назад — далее »

0 Пользователи и 1 гость просматривают эту тему.


Tangarius

  • Новичок форума
  • Сообщения: 3
  • Записан

Доброго времени.

Пытаюсь в подключиться к сетевому ресурсу, лежащему на windows 10 рабочей станции.

делал так:

sudo mount -t cifs -o username=test,domain=WORKGROUP //192.168.1.12/cherteji /mnt/sharePassword:
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

почитал по инету, вроде бы такая ошибка должна фиксится подсовыванием параметра vers=1.0
попробовал:

sudo mount -t cifs -o username=test,domain=WORKGROUP,vers1.0 //192.168.1.12/cherteji /mnt/share
Password:
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Пишет неверный аргумент, понятия не имею какой.
пробовал подсовывать в vers=2.1,3.0,3.1 — что нашел в инете, не помогло никак.
Сразу говорю в линуксе непонимаю ничего, знаю что у него значок пингвин. Консоль вообще первый раз вижу, имею некоторое представление о работе сети, больше ничего. Теперь вот пришло мое время приобщиться, так что ногами не пинайте сразу.
Спасибо за помощь.


Там где «Invalid argument» знак равно пропустили?



Tangarius

  • Новичок форума
  • Сообщения: 3
  • Записан

Цитата: qupl от 19 ноября 2020, 16:05:46
Там где «Invalid argument» знак равно пропустили?

это да, в последний раз видимо стер случайно знак равенства, но с ним тоже самое говорит если версию ставлю 2.0 3.0, на vers=1.0 host is down, потому и не заметил

Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
frezer2@Frezer2:~$ sudo mount -t cifs -o username=test,domain=WORKGROUP,vers=3.0 //192.168.1.12/cherteji /mnt/share
Password:
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
frezer2@Frezer2:~$ sudo mount -t cifs -o username=test,domain=WORKGROUP,vers=3.1 //192.168.1.12/cherteji /mnt/share
Password:
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
frezer2@Frezer2:~$ sudo mount -t cifs -o username=test,domain=WORKGROUP,vers=2.1 //192.168.1.12/cherteji /mnt/share
Password:
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
frezer2@Frezer2:~$ sudo mount -t cifs -o username=test,domain=WORKGROUP,vers=1.0 //192.168.1.12/cherteji /mnt/share
Password:
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


Вот так запустите:

sudo mount -vvv -t cifs -o user=test //192.168.1.12/cherteji /mnt/share
И покажите что получается.



Tangarius

  • Новичок форума
  • Сообщения: 3
  • Записан

Цитата: endru от 20 ноября 2020, 09:15:50
Вот так запустите:
sudo mount -vvv -t cifs -o user=test //192.168.1.12/cherteji /mnt/share
И покажите что получается.

похоже решилась проблемка,  заморочка в самой windows 10, там по умолчанию отключен протокол smb1, включил и все полетело

sudo mount -vvv -t cifs -o user=test //192.168.1.12/cherteji /mnt/share
[sudo] password for frezer2:
mount: fstab path: «/etc/fstab»
mount: mtab path:  «/etc/mtab»
mount: lock path:  «/etc/mtab~»
mount: temp path:  «/etc/mtab.tmp»
mount: UID:        0
mount: eUID:       0
mount: spec:  «//192.168.1.12/cherteji»
mount: node:  «/mnt/share»
mount: types: «cifs»
mount: opts:  «user=test»
mount: external mount: argv[0] = «/sbin/mount.cifs»
mount: external mount: argv[1] = «//192.168.1.12/cherteji»
mount: external mount: argv[2] = «/mnt/share»
mount: external mount: argv[3] = «-v»
mount: external mount: argv[4] = «-o»
mount: external mount: argv[5] = «rw,user=test»
Password:
mount.cifs kernel mount options: ip=192.168.1.12,unc=\192.168.1.12cherteji,user=test,pass=********

спасибо за помощь!


  • Русскоязычное сообщество Debian GNU/Linux


  • Сети и интернет

  • ошибка 112 host is down

I have an issue with a mount point that was previously configured. It shows the folder, but the mount is missing and holds «?» values for size, permissions, etc.

So I tried to remount using cifs and the same command from before:

mount -t cifs //nas.domain.local/share /mnt/archive

But I get the error:

Host is down.

If I ping the domain or IP I get a proper resolution and I also connected using smbclient without issue

 ping nas.domain.local
 ping ip
 smbclient //nas.domain.local/share

I looked around, but cant find a solid answer. Any thoughts?

asked Aug 3, 2012 at 17:13

Kevin's user avatar

KevinKevin

1,4032 gold badges11 silver badges9 bronze badges

6

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 error:

protocol negotiation failed: NT_STATUS_CONNECTION_RESET

To overcome this use mount or smbclient with a protocol specified.

for smbclient: add -m SMB2 (or SMB3 for the newer version of the protocol)

smbclient -L <server_ip> -U <username> -m SMB2

or for mount: add vers=2.0 (or vers=3.0 if you want to use version 3 of the protocol)

mount -t cifs //<server_ip>/<share> /mnt/<mountpoint> -o vers=2.0

Ankur Gupta's user avatar

answered Apr 5, 2017 at 8:30

Marcin P's user avatar

Marcin PMarcin P

1,6681 gold badge8 silver badges5 bronze badges

10

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.

J Smith's user avatar

J Smith

4333 silver badges10 bronze badges

answered Oct 6, 2017 at 7:51

Sjoerd Timmer's user avatar

5

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>

Mike Fiedler's user avatar

Mike Fiedler

2,1521 gold badge17 silver badges33 bronze badges

answered Dec 22, 2017 at 10:16

user449376's user avatar

user449376user449376

2412 silver badges2 bronze badges

1

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

answered Mar 4, 2018 at 14:12

Patrice's user avatar

PatricePatrice

711 silver badge2 bronze badges

2

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 proven by disabling the firewall temporarily.
Hope this helps someone, host is down might not mean it’s not responding to pings, but could mean it’s not responding to authentication attempts.

answered Nov 28, 2013 at 22:48

lolinux's user avatar

lolinuxlolinux

611 silver badge3 bronze badges

2

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.0.1 127.0.1.13 127.0.1.63

# Anything else not allowed is, by default, rejected
hosts deny = ALL

Adding the fixed IP address of the new SMB client solved the issue in this specific case.

Of course, there is a myriad of other reasons why one may receive above-mentioned error.

answered Apr 23, 2015 at 21:47

Serge Stroobandt's user avatar

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.

answered Dec 5, 2017 at 10:58

Bernhard's user avatar

The SMB1 version of the protocol has been deprecated, however this is the default version used in older versions of mount.cifs, e.g. I have this problem with version 6.2.

You can check with:

sudo mount.cifs --version

If you try to connect to an SMB3 server using SMB1 protocol, you get the Host is down error.

The workaround, as described by many other answers here, is to specify a different version of the protocol. The following command works for me:

sudo mount -t cifs //server.name.or.ip/shares/Public /target/directory -o username=someuser,domain=somedomain,vers=3.0

However, if the server that you are connecting to uses DFS, then you will get the following error instead: mount error(38): Function not implemented. This is because DFS support on SMB3 was only added to the kernel in version 4.11.

You can check your kernel version with uname -a. In my case, it was 3.10 on CentOS7. I followed these instructions to upgrade and now it works.

answered Sep 4, 2018 at 8:43

Dr John A Stevenson's user avatar

Same trouble with Fritzbox 7490: mount error(112): Host is down

I didn’t used -o vers=XX.
As fast as a shark i am, i first tried -o vers=2.0 and failed.

As soon as i used the option -o vers=1.0, everything works fine !

This works for me..

 sudo mount -t cifs -o rw,username=myname_on_the_box,password=mypasswd_on_the_box,vers=1.0 //192.168.1.1/Fritz-nas /media/something/something    

My env:
Client: Ubuntu 17.10 Linux 4.13.0-17-generic #20-Ubuntu SMP x86_64 GNU/Linux

Server: Fritzbox 7490 firmware 6.83.

answered Nov 30, 2017 at 11:53

d.dieckert's user avatar

1

If you’re having this problem with a Synology NAS, then check that the vers= option specified to mount and the min/max SMB versions on the NAS are compatible.

Specifically, I’m using vers=2.0, but my Synology Diskstation was triggering the Host is down error. I found a page, Windows 10 access to NAS share. SMB 1.0 and 3.0, on the Synology website that explained how to set the Diskstation to allow SMB v2.0 or newer…

On Synology NAS

  • Go to Control Panel—>File Services
  • On the SMB/AFP/NFS tab, select Advanced Settings
  • Change Maximum SMB protocol to SMB3
  • Change Minumum SMB protocol to SMB2 (the page says to use SMB2 with large MTU, but that didn’t work for me)

answered Jun 23, 2019 at 16:44

Roger Lipscombe's user avatar

Roger LipscombeRoger Lipscombe

2,1676 gold badges24 silver badges37 bronze badges

I typically use this type of command to mount a cifs/smb share.

mount -t cifs -o rw,netbiosname=nasserver1,credentials=/etc/user_credentials.txt //192.168.1.11/someshare /mnt

the credentials file looks like so:

username=mydomainuser1
password=somepass

This can also be adapted to an automount setup so the mounting/unmounting can be handled by the system automatically via autofs.

answered Nov 4, 2012 at 7:23

slm's user avatar

slmslm

7,56516 gold badges56 silver badges74 bronze badges

In our case I checked the users login name (of user2) in the AD. There I noticed that the name was starting with an upper case letter and changed it to lower case as it is written in the mount script. Even if we did not touch neither user2 nor the mount script before, suddenly the mount command was successful.

mount --verbose -t cifs //pc/share /my-share -no user=user1,password=pw1 -o uid=user2,gid=group1,dir_mode=0775,file_mode=0664

answered Jun 29, 2017 at 11:28

Ludwig's user avatar

LudwigLudwig

4214 silver badges10 bronze badges

For me, the mounted cifs share was on a Windows server whose IP address had changed recently, so I could ping the server and resolve its new address, but the mount had not updated itself. By running a lazy unmount and then re-mounting my issue was solved:

umount -l /mnt/share
mount -a

answered Nov 28, 2017 at 16:06

Jon.Mozley's user avatar

Jon.MozleyJon.Mozley

1631 silver badge7 bronze badges

I also just ran into the problem mentioned after an upgrad to Xubuntu 17.10. I use a Synology DiskStation.
What I saw there: In the DiskStation, you can choose which protocols to support. By adding he relevant protocols (up to SBM3) in the advanced options for file services in control panel, you can also solve the problem.

answered Feb 4, 2018 at 3:09

Matthias Mielke's user avatar

Содержание

  1. Fixya Cloud
  2. Scenario / Questions
  3. Find below all possible solutions or suggestions for the above questions..
  4. Mount cifs mount error 112 host is down
  5. [SOLVED] “mount error(112): Host is down” on stretch, but not jessie! Why?
  6. Re: “mount error(112): Host is down” on stretch, but not jessie! Why?
  7. Re: “mount error(112): Host is down” on stretch, but not jessie! Why?
  8. Re: “mount error(112): Host is down” on stretch, but not jessie! Why?
  9. Re: “mount error(112): Host is down” on stretch, but not jessie! Why?
  10. Как в Linux монтировать шару CIFS
  11. Подготовка
  12. Установка пакетов
  13. Сетевые порты
  14. Синтаксис
  15. Ручное монтирование
  16. Автоматическое монтирование CIFS через fstab
  17. Примеры использования опций
  18. Версии SMB
  19. Монтирование от гостевой учетной записи
  20. Права на примонтированные каталоги

Fixya Cloud

Scenario / Questions

I have an issue with a mount point that was previously configured. It shows the folder, but the mount is missing and holds “?” values for size, permissions, etc.

So I tried to remount using cifs and the same command from before:

But I get the error:

If I ping the domain or IP I get a proper resolution and I also connected using smbclient without issue

I looked around, but cant find a solid answer. Any thoughts?

Find below all possible solutions or suggestions for the above questions..

Suggestion: 1:

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:

you will get the error:

To overcome this use mount or smbclient with a protocol specified.

for smbclient: add -m SMB2 (or SMB3 for the newer version of the protocol)

or for mount: add vers=2.0 (or vers=3.0 if you want to use version 3 of the protocol)

Suggestion: 2:

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.

Suggestion: 3:

USB-stick at Fritz NAS showed “Host Down” for Ubuntu 17.10:

Defining the version ( vers=1.0 ) worked – here’s the full string:

Suggestion: 4:

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

Suggestion: 5:

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 proven by disabling the firewall temporarily.
Hope this helps someone, host is down might not mean it’s not responding to pings, but could mean it’s not responding to authentication attempts.

Suggestion: 6:

I received the same error without further ado from a new Samba client, when trying to mount a CIFS SMB network share:

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 :

Adding the fixed IP address of the new SMB client solved the issue in this specific case.

Of course, there is a myriad of other reasons why one may receive above-mentioned error.

Suggestion: 7:

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.

Suggestion: 8:

Same trouble with Fritzbox 7490: mount error(112): Host is down

I didn’t used -o vers=XX.
As fast as a shark i am, i first tried -o vers=2.0 and failed.

As soon as i used the option -o vers=1.0, everything works fine !

This works for me..

My env:
Client: Ubuntu 17.10 Linux 4.13.0-17-generic #20-Ubuntu SMP x86_64 GNU/Linux

Server: Fritzbox 7490 firmware 6.83.

Suggestion: 9:

The SMB1 version of the protocol has been deprecated, however this is the default version used in older versions of mount.cifs , e.g. I have this problem with version 6.2.

You can check with:

sudo mount.cifs —version

If you try to connect to an SMB3 server using SMB1 protocol, you get the Host is down error.

The workaround, as described by many other answers here, is to specify a different version of the protocol. The following command works for me:

sudo mount -t cifs //server.name.or.ip/shares/Public /target/directory -o username=someuser,domain=somedomain,vers=3.0

However, if the server that you are connecting to uses DFS, then you will get the following error instead: mount error(38): Function not implemented . This is because DFS support on SMB3 was only added to the kernel in version 4.11.

You can check your kernel version with uname -a . In my case, it was 3.10 on CentOS7. I followed these instructions to upgrade and now it works.

Suggestion: 10:

If you’re having this problem with a Synology NAS, then check that the vers= option specified to mount and the min/max SMB versions on the NAS are compatible.

Specifically, I’m using vers=2.0 , but my Synology Diskstation was triggering the Host is down error. I found a page, Windows 10 access to NAS share. SMB 1.0 and 3.0, on the Synology website that explained how to set the Diskstation to allow SMB v2.0 or newer…

Источник

Mount cifs mount error 112 host is down

[SOLVED] “mount error(112): Host is down” on stretch, but not jessie! Why?

First, some background: the CIFS drive I am trying to mount: `PASSPORT2TB` is connected via USB to a small wifi AP running [OpenWRT](https://openwrt.org/), and it is shared via the Samba server on that (OpenWRT) host. I want to connect to `PASSPORT2TB` from my two RPi boxes; one runs `jessie`, the other runs `stretch`. I do not have an entry in `/etc/fstab` for `PASSPORT2TB` on either of the RPis. `RPi:stretch` is a new install on a new 3B+; `RPi:jessie` was recently upgraded from wheezy, and has an operational mount point that has worked for. years.

Here’s the exchange when I attempt to mount `PASSPORT2TB` from `RPi:stretch`:

sudo mount -t cifs //192.168.1.250/PASSPORT2TB

/mntPassport
Password for root@//192.168.1.250/PASSPORT2TB: ********
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

This same command works perfectly on `RPi:jessie`. But not on `RPi:stretch`.

I’ve searched for an answer, and tried the `-o` option as follows with no success :

sudo mount -t cifs //192.168.1.250/PASSPORT2B mntPassport -o vers=1.0
Password for root@//192.168.1.250/PASSPORT2B: ********
Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Here’s what `journalctl -fb` tells me:
Apr 07 04:23:08 raspberrypi3b sudo[17967]: pam_unix(sudo:session): session closed for user root
Apr 07 04:23:08 raspberrypi3b kernel: CIFS VFS: cifs_mount failed w/return code = -6

Searching for meaning here leads to an [old Samba bug report] (https://bugzilla.samba.org/show_bug.cgi?id=8046) fixed years ago

Anyone know what is causing this — or how to correct it?

Re: “mount error(112): Host is down” on stretch, but not jessie! Why?

Are you sure that //192.168.1.250/PASSPORT2TB is shared?
Are you sure that a root userid exists on the CIFS/Samba server? Samba uses a seperate password file.

Since OpenWRT is a Linux system it supports NFS for shared filesystems. Since it does then mounting an NFS export is a) more secure, b) quicker and c) easy to set-up.

Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors — are all on my foes list.

The use of crystal balls and mind reading is prohibited.

Re: “mount error(112): Host is down” on stretch, but not jessie! Why?

1.Are you sure that //192.168.1.250/PASSPORT2TB is shared?
2. Are you sure that a root userid exists on the CIFS/Samba server? Samba uses a seperate password file.

Since OpenWRT is a Linux system it supports NFS for shared filesystems. Since it does then mounting an NFS export is a) more secure, b) quicker and c) easy to set-up.

Hello @Dougie — I really appreciate the help
1. Yes, I am quite sure (how else could my `RPi-jessie` mount the drive?
2. I cannot answer that question with 100% certainty because I did not (directly) populate `/etc/samba/smbpasswd` file. But with 99% certainty, the answer is «Yes». I say this because: a) I can mount the drive from my `RPi-jessie`, b) I can mount the drive from OS X as root, and as ‘guest’, c) it’s «how things are done» in the GL-iNet (the mfr) installs of OpenWRT on their WiFi routers (mine is AR-150).
3. This may be OpenWRT’s advice now, but it hasn’t always been (much upset there now as you may know). Further, there is **NO OPTION** provided to switch over at this point (in the LUCI interface at any rate). I am running the latest firmware from GL-iNet.

To summarize, I really, truly appreciate your suggestions for making over my system, and I know you do so with the best of intentions. But without trying to sound ungrateful, I do not feel the need to invest that time now, and potentially wreck a configuration that has been serving its purpose well and securely for some time now on the theory that an NFS install will solve the problem.

That said, if you can answer the question I asked without requiring me to make over my system, I would really like to hear it. Something has changed in Raspbian between Jessie and Stretch that is causing this. do you know what it is? If it’s an authentication issue, and you have any clue as to where I need to begin looking, I would appreciate that. Your NFS evangelism is duly noted.

Re: “mount error(112): Host is down” on stretch, but not jessie! Why?

Do you know the samba configuration on your OpenWRT device, are any shares public and don’t need a userid/password?

Take a look with the following commands

nmblookup __SAMBA__
nmblookup -S __SAMBA__
nmblookup ‘*’
nmblookup -S ‘*’
nmblookup -S WORKGROUP

For that last command you can use your own workgroup name if it’s not set to the Microsoft default of «WORKGROUP».

I suspect your problem will be that the credentials for your «root» user aren’t recognised. I don’t know OpenWRT (because I’ve never had a device that can run it) but it probably logs Samba/CIFS requests and failures.

Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors — are all on my foes list.

The use of crystal balls and mind reading is prohibited.

Re: “mount error(112): Host is down” on stretch, but not jessie! Why?

Do you know the samba configuration on your OpenWRT device, are any shares public and don’t need a userid/password?

Take a look with the following commands

nmblookup __SAMBA__
nmblookup -S __SAMBA__
nmblookup ‘*’
nmblookup -S ‘*’
nmblookup -S WORKGROUP

For that last command you can use your own workgroup name if it’s not set to the Microsoft default of «WORKGROUP».

I suspect your problem will be that the credentials for your «root» user aren’t recognised. I don’t know OpenWRT (because I’ve never had a device that can run it) but it probably logs Samba/CIFS requests and failures.

Thank you again. I take it then, that you’re unaware of any diffs between raspbian Jessie and raspbian Stretch that could be responsible for this new behavior?

Yes — all files on the Passport (a 2TB USB drive used mostly to house my MP3 collection for Sonos) are designated as accessible from the ‘guest’ account. The entire drive is also marked as read-only. A screenshot follows that shows most of the config options (scratch that — I can’t insert an image in posts here). Anyway, I am mounting PASSPORT2TB as the root user because occasionally I need to use it to back up files from my RPi. I’ve also tried to mount PASSPORT2TB as guest, and that fails also.

FWIW, this feels like a bug in raspbian stretch.

Источник

Как в Linux монтировать шару CIFS

Что такое Linux и CIFS простыми словами.

Работа с общими папками Windows происходит с использованием протокола CIFS (SMB). Все примеры в данном руководстве выполняются на Linux Ubuntu и CentOS.

Подготовка

Установка пакетов

Для монтирования общей папки необходимо установить набор утилит для работы с CIFS.

yum install cifs-utils

apt-get install cifs-utils

Сетевые порты

Если мы будем монтировать сетевую папку, сервер которой находится за брандмауэром, необходимо открыть следующие порты:

Синтаксис

* вместо mount.cifs можно написать mount -t cifs.

mount.cifs //192.168.1.1/public /mnt

* простой пример монтирования папки public на сервере 192.168.1.1 в локальный каталог /mnt.

Ручное монтирование

Теперь монтирование можно выполнить следующей командой:

mount.cifs //192.168.1.10/share /mnt -o user=dmosk

* в данном примере будет примонтирован каталог share на сервере 192.168.1.10 в локальную папку /mnt под учетной записью dmosk.

То же самое, с использованием домена:

mount.cifs //192.168.1.10/share /mnt -o user=dmosk,domain=dmosk.local

Автоматическое монтирование CIFS через fstab

Для начала создаем файл, в котором будем хранить данные авторизации при подключении к общей папке:

И добавляем в него данные следующего вида:

username=dmosk
password=dPassw0rd
domain=dmosk.local

* в этом примере создана пара логин/пароль — dmosk/dPassw0rd; domain указывать не обязательно, если аутентификация выполняется без него.

Теперь открываем конфигурационный файл fstab:

и добавляем в него следующее:

//192.168.1.10/share /mnt cifs user,rw,credentials=/root/.smbclient 0 0

* в данном примере выполняется монтирование общей папки share на сервере с IP-адресом 192.168.1.10 в каталог /mnt. Параметры для подключения — user: позволяет выполнить монтирование любому пользователю, rw: с правом на чтение и запись, credentials: файл, который мы создали на предыдущем шаге.

Чтобы проверить правильность настроек, вводим следующую команду:

Примеры использования опций

Версии SMB

Если на стороне Windows используется старая или слишком новая версия протокола SMB, при попытке монтирования мы можем получить ошибку mount error(112): Host is down. Чтобы это исправить, указываем версию:

mount.cifs //192.168.1.10/share /mnt/ -o vers=1.0

* монтирование по протоколу SMB1.0

Монтирование от гостевой учетной записи

Если сервер принимает запросы без логина и пароля, то клиент подключается, как гость:

mount.cifs //192.168.1.10/share /mnt -o guest

//192.168.1.10/share /mnt cifs guest 0 0

Права на примонтированные каталоги

При монтировании папки мы можем указать определенные права:

mount.cifs //192.168.1.10/share /mnt -o file_mode=0777,dir_mode=0777

Для указания владельца, который будет назначен для примонтированного каталога, используем:

mount.cifs //192.168.1.10/share /mnt -o uid=33,gid=33

* чтобы посмотреть идентификаторы пользователя, вводим id -u и id -g .

Источник

Содержание

  1. Хост CIFS отключен
  2. Mount CIFS Host is down
  3. 15 Answers 15
  4. Как в Linux монтировать шару CIFS
  5. Подготовка
  6. Установка пакетов
  7. Сетевые порты
  8. Синтаксис
  9. Ручное монтирование
  10. Автоматическое монтирование CIFS через fstab
  11. Примеры использования опций
  12. Версии SMB
  13. Монтирование от гостевой учетной записи
  14. Права на примонтированные каталоги
  15. cifs mount failed с ошибкой mount (112): Host down & rdquo;
  16. 4 ответа
  17. mount.cifs: mount error(112): Host is down
  18. 4 Answers 4

Хост CIFS отключен

У меня проблема с точкой монтирования, которая была предварительно настроена. Он показывает папку, но монтирование отсутствует и содержит «?» значения для размера, разрешений и т. д.

Поэтому я попытался перемонтировать, используя cifs и ту же команду:

Но я получаю ошибку:

Если я пингую домен или IP, я получаю правильное разрешение, и я также подключился с помощью smbclient без проблем

Я посмотрел вокруг, но не могу найти твердый ответ. есть идеи?

Это также может быть из-за несоответствия протокола. В 2017 году Microsoft исправила Windows Servers и посоветовала отключить протокол SMB1.

Отныне, mount.cifs может иметь проблемы с согласованием протокола.

Появится сообщение об ошибке «Host is down.», Но при отладке:

вы получите ошибку:

Чтобы преодолеть это, используйте mount или smbclient с указанным протоколом.

или для монтирования: добавьте vers = 2.0 (или vers = 3.0, если вы хотите использовать версию 3 протокола)

,iocharset=utf8,sec=ntlm,vers=1.0 0 0

На archlinux после недавнего обновления пакета мне пришлось добавить vers = 1.0 в мои параметры монтирования. Я подключаюсь к старой коробке Centos 5 и до вчерашнего дня я мог подключаться без явного указания номера версии.

USB-флешка на Fritz NAS показала «Host Down» для Ubuntu 17.10:

Аналогичная проблема после обновления до Ubuntu 17.10 со старой Buffalo Diskstation. Решается добавлением в / etc / fstab опции «vers = 1.0»:

// myWDhostname / partage / media / Partage cifs guest, vers = 1.0 0 0

Извините, если это поздний ответ (я понимаю, что это старый поток), однако я только что обнаружил, что есть еще одна возможная причина, по которой mount.cifs скажет, что хост не работает.

Я получил ту же ошибку без дальнейших церемоний от нового клиента Samba при попытке смонтировать сетевой ресурс CIFS SMB:

В итоге оказалось, что ранее я ограничил доступ к серверу SMB только ограниченным количеством IP-адресов, настроив /etc/samba/smb.conf :

Добавление фиксированного IP-адреса нового клиента SMB решило проблему в данном конкретном случае.

Конечно, существует множество других причин, по которым можно получить вышеупомянутую ошибку.

Та же проблема при подключении к Synology DiskStation (DSM 4.3).

Использование vers = 1.0 в опциях монтирования работает нормально.

Кроме того, мне пришлось использовать опцию «noperm», потому что все файлы были ошибочно показаны как нечитаемые и доступные для записи владельцем.

Та же проблема с Fritzbox 7490: ошибка монтирования (112): хост не работает

Мой env:
Клиент: Ubuntu 17.10 Linux 4.13.0-17-generic # 20-Ubuntu SMP x86_64 GNU / Linux
Сервер: Fritzbox 7490 прошивка 6.83.

Если вы попытаетесь подключиться к серверу SMB3 по протоколу SMB1, вы получите сообщение об Host is down ошибке.

Если у вас возникла эта проблема с NAS-устройством Synology, проверьте совместимость vers= указанного параметра mount и версий min / max SMB на NAS.

Обычно я использую этот тип команды для монтирования общего ресурса cifs / smb.

файл учетных данных выглядит так:

Это также может быть адаптировано к настройке автоматического монтирования, так что установка / демонтаж может выполняться системой автоматически с помощью автозаполнения.

В нашем случае я проверил логин пользователя (из user2) в AD. Там я заметил, что имя начиналось с заглавной буквы и изменил ее на строчную, как написано в скрипте монтирования. Даже если раньше мы не трогали ни user2, ни скрипт монтирования, внезапно команда mount была успешной.

Для меня общий ресурс смонтированного cifs находился на сервере Windows, IP-адрес которого недавно изменился, поэтому я мог пропинговать сервер и определить его новый адрес, но монтирование не обновилось само. Запустив ленивое демонтирование и затем заново установив мою проблему, я решил:

Я также столкнулся с проблемой, упомянутой после обновления до Xubuntu 17.10. Я использую Synology DiskStation. Что я там увидел: в DiskStation вы можете выбрать, какие протоколы поддерживать. Добавив соответствующие протоколы (до SBM3) в дополнительные параметры для файловых служб на панели управления, вы также можете решить эту проблему.

Источник

Mount CIFS Host is down

I have an issue with a mount point that was previously configured. It shows the folder, but the mount is missing and holds «?» values for size, permissions, etc.

So I tried to remount using cifs and the same command from before:

But I get the error:

If I ping the domain or IP I get a proper resolution and I also connected using smbclient without issue

I looked around, but cant find a solid answer. Any thoughts?

15 Answers 15

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:

you will get the error:

To overcome this use mount or smbclient with a protocol specified.

or for mount: add vers=2.0 (or vers=3.0 if you want to use version 3 of the protocol)

photo

,iocharset=utf8,sec=ntlm,vers=1.0 0 0

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.

photo

USB-stick at Fritz NAS showed «Host Down» for Ubuntu 17.10:

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

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 received the same error without further ado from a new Samba client, when trying to mount a CIFS SMB network share:

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 :

Adding the fixed IP address of the new SMB client solved the issue in this specific case.

Of course, there is a myriad of other reasons why one may receive above-mentioned error.

6JFOF

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.

If you try to connect to an SMB3 server using SMB1 protocol, you get the Host is down error.

Источник

Как в Linux монтировать шару CIFS

Что такое Linux и CIFS простыми словами.

Работа с общими папками Windows происходит с использованием протокола CIFS (SMB). Все примеры в данном руководстве выполняются на Linux Ubuntu и CentOS.

Подготовка

Установка пакетов

Для монтирования общей папки необходимо установить набор утилит для работы с CIFS.

yum install cifs-utils

apt-get install cifs-utils

Сетевые порты

Если мы будем монтировать сетевую папку, сервер которой находится за брандмауэром, необходимо открыть следующие порты:

Синтаксис

mount.cifs //192.168.1.1/public /mnt

* простой пример монтирования папки public на сервере 192.168.1.1 в локальный каталог /mnt.

Ручное монтирование

Теперь монтирование можно выполнить следующей командой:

* в данном примере будет примонтирован каталог share на сервере 192.168.1.10 в локальную папку /mnt под учетной записью dmosk.

То же самое, с использованием домена:

Автоматическое монтирование CIFS через fstab

Для начала создаем файл, в котором будем хранить данные авторизации при подключении к общей папке:

И добавляем в него данные следующего вида:

username=dmosk
password=dPassw0rd
domain=dmosk.local

* в этом примере создана пара логин/пароль — dmosk/dPassw0rd; domain указывать не обязательно, если аутентификация выполняется без него.

Теперь открываем конфигурационный файл fstab:

и добавляем в него следующее:

//192.168.1.10/share /mnt cifs user,rw,credentials=/root/.smbclient 0 0

* в данном примере выполняется монтирование общей папки share на сервере с IP-адресом 192.168.1.10 в каталог /mnt. Параметры для подключения — user: позволяет выполнить монтирование любому пользователю, rw: с правом на чтение и запись, credentials: файл, который мы создали на предыдущем шаге.

Чтобы проверить правильность настроек, вводим следующую команду:

Примеры использования опций

Версии SMB

Если на стороне Windows используется старая или слишком новая версия протокола SMB, при попытке монтирования мы можем получить ошибку mount error(112): Host is down. Чтобы это исправить, указываем версию:

* монтирование по протоколу SMB1.0

Монтирование от гостевой учетной записи

Если сервер принимает запросы без логина и пароля, то клиент подключается, как гость:

//192.168.1.10/share /mnt cifs guest 0 0

Права на примонтированные каталоги

При монтировании папки мы можем указать определенные права:

Для указания владельца, который будет назначен для примонтированного каталога, используем:

Источник

cifs mount failed с ошибкой mount (112): Host down & rdquo;

Какой шрифт отображается, определяется свойством css font-family, он отобразит некоторые параметры, соответствующие отображаемым шрифтам браузера. Шрифты браузера из системы, в каталоге usr/share/fonts, вы также можете запустить fc-list, чтобы показать все доступные шрифты.

Условные шрифты Ubuntu являются уродливыми (IMO), поэтому я скопировал шрифты Mac и поместил их в каталог /usr/share/fonts/, затем Firefox / Chrome мог отображать эти шрифты с Mac для отображения, что дает мне намного лучше опыт.

, например. предположим, что у вас есть один шрифт из шрифтов Сан-Франциско, который SFNSText.ttf, чтобы использовать его в Ubuntu, запустите:

Затем вы увидите, что этот шрифт доступен в настройках вашего браузера.

4 ответа

Прежде всего вы можете отключить запись в /etc/fstab и выпустить следующую команду:

Я объясняю все это, потому что ваша реальная проблема может отличаться cifs, чем это было в моем случае.

У меня была проблема, что устройство, предлагающее SMB, хочет ver = 1.0. Хотя у Ubuntu 17.04 не было никаких проблем с версией (авто), 17.10 и его ядро ​​требуют указать номер, как показывают мои журналы ядра:

Okt 25 09:06:08 gespc kernel: No dialect specified on mount. Default has changed to a more secure dialect, SMB3 (vers=3.0), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 specify vers=1.0 on mount. For somewhat newer servers such as Windows 7 try vers=2.1.

Источник

mount.cifs: mount error(112): Host is down

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

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

Messages logs has this error:

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

photo

4 Answers 4

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.

photo

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

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.

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.

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

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.

Источник

На одном из серверов (Debian 7) при выполнении команды:
mount -v -t cifs -o username=myname,password=mypass,domain=mydomain,vers=2.0 //myhostip/myfolder /mnt/myfolder
возникает ошибка: mount error(112): Host is down
При этом на других серверах с Debian 10 и Ubuntu 16.04, проблем нет.
Подскажите пожалуйста, какие утилиты задействует эта команда, возможно стоит их попробовать обновить на новую версию?


  • Вопрос задан

    более двух лет назад

  • 1082 просмотра

I’m trying to mount a USB drive plugged on my Technicolor router.

I have the following line in my /etc/fstab:

//192.168.1.1/usbdisk /media/public cifs guest,vers=3.0 0 0

After trying resolving the issue with diffrerent instructions found from the net I have tried specifying different versions, vers=2.0, vers=2.1, but none of these have resolved the issue.

If I test with smbclient, I get the following:

sudo mount.cifs //192.168.1.1/usbdisk /media/public -o username=myuser,vers=2.0
Password for myuser@//192.168.1.1/usbdisk:  *********
mount error(112): Host is down

Same happens with no user specified, and also with various vers= definitions.

I’m running Ubuntu 15.10.
Any ideas?

asked Aug 15, 2017 at 16:55

Ossi Viljakainen's user avatar

2

You can disable the entry in /etc/fstab and issue the following command

mount -t cifs //192.168.1.1/usbdisk /media/public -o guest,vers=3.0

and at the same time play around with different options (behind -o). If you need feedback from you system, you might open a second terminal windows and type journalctl -fb to watch how the kernel reacts on your options given.

I explain all this because your real issue might be different with cifs than it was in my case.

I had the problem that the device offering SMB wants ver=1.0. While Ubuntu 17.04 didn’t have any problems with the version (auto), the 17.10 and its kernel demands to indicate the number, as my Kernel logs shows:

Okt 25 09:06:08 gespc kernel: No dialect specified on mount. Default has changed to a more secure dialect, SMB3 (vers=3.0), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 specify vers=1.0 on mount. For somewhat newer servers such as Windows 7 try vers=2.1.

My Good luck!

Olorin's user avatar

Olorin

3,45817 silver badges28 bronze badges

answered Oct 25, 2017 at 7:17

Gerhard Stein's user avatar

3

YES !

Had this problems for months too, solved with adding vers=1.0 in the options:

//xxx.xxx.xxx.xxx/disk /media/foldername cifs rw,credentials=/etc/samba/credentials,uid=1000,gid=1000,file_mode=0660,dir_mode=0770,iocharset=utf8,vers=1.0 0 0

Thanks Gerhard!

GR

answered Apr 12, 2018 at 2:02

mchrgr2000's user avatar

mchrgr2000mchrgr2000

811 silver badge3 bronze badges

1

  • Ошибка hold шевроле лачетти
  • Ошибка hold шевроле авео т250
  • Ошибка hold что означает
  • Ошибка hold сигнализация шерхан
  • Ошибка hold на машине