I have an issue under Windows 10 to access some Linux Samba shares with following error:
Check the spelling of the name. Otherwise, there might be a problem with your network. To try to identify and resolve network problems click Diagnose.
Error code: 0x80070035
The network path was not found
I can successfully browse from an old openSUSE 12.1 that uses only SMB1/CIFS but not from a more recent openSUSE Leap 15, except if I force NT1 protocol (that is for SMB1/CIFS) on its side, in /etc/samba/smb.conf global section:
[global]
...
min protocol = NT1
max protocol = NT1
For information, by default min protocol is LANMAN1 and max protocol is SMB3, that range then includes NT1 protocol (see SMB protocol min max values available?):
$ testparm --parameter-name="min protocol"
[...]
LANMAN1
$ testparm --parameter-name="max protocol"
[...]
SMB3
And I can access these shared folders from another Linux computer without forcing protocol with following command for example I can list folders:
smbclient -L MyLeap15Computer -N
Or connect to tmp shared folder with:
smbclient //MyLeap15Computer /tmp -N
I also confirmed that SMB2 and 3 are actually active with How to detect, enable and disable SMBv1, SMBv2, and SMBv3 in Windows, and also been able to access them from another Windows 10. And from the computer on which I cannot access them I successfully ping MyLeap15Computer.
Anyway, technically I can access my shared folders by forcing NT1 protocol, but since it should be possible I want to be able to access them from SMB2 or SMB3 since there are security issues in SMB1/CIFS (and then deactivate it in Windows 10 too), also, since I can access them from another Windows 10 without forcing this protocol it then should be something in Windows configuration but I cannot manage to see which since everything appears active on both.
And finally, even if issue seems to be more on client side, here is the server condifuration, /etc/samba/smb.conf without forcing to NT1 protocol (this configuration accepts guest users, then no credentials have to be given for connection):
[global]
workgroup = WORKGROUP
passdb backend = tdbsam
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = bad user
logon path = \%Lprofiles.msprofile
logon home = \%L%U.9xprofile
logon drive = P:
usershare allow guests = yes
usershare max shares = 100
winbind offline logon = yes
winbind refresh tickets = yes
create mask = 777
directory mask = 777
delete readonly = yes
[tmp]
comment = Temp folder
path = /tmp
browseable = yes
writable = yes
read only = no
guest ok = yes
mangled names = no
Edit: here are more information after what suggested @JW0914, what was suggested did not work but I found something interesting in server logs (added log level = 3 to /etc/samba/smb.conf global section then looked on /var/log/samba/log.smbd after having tried connection):
check_ntlm_password: Checking password for unmapped user [DOMAIN][USER]@[Windows10Computer] with the new password interface
[2020/02/05 14:21:23.845849, 3] ../source3/auth/auth.c:192(auth_check_ntlm_password)
check_ntlm_password: mapped user is: [DOMAIN][USER]@[Windows10Computer]
[2020/02/05 14:21:23.845879, 3] ../source3/auth/check_samsec.c:399(check_sam_security)
check_sam_security: Couldn't find user 'USER' in passdb.
[2020/02/05 14:21:23.845890, 2] ../source3/auth/auth.c:332(auth_check_ntlm_password)
check_ntlm_password: Authentication for user [USER] -> [USER] FAILED with error NT_STATUS_NO_SUCH_USER, authoritative=1
[2020/02/05 14:21:23.845910, 2] ../auth/auth_log.c:760(log_authentication_event_human_readable)
Auth: [SMB2,(null)] user [DOMAIN][USER] at [Wed, 05 Feb 2020 14:21:23.845900 CET] with [NTLMv2] status [NT_STATUS_NO_SUCH_USER] workstation [Windows10Computer] remote host [ipv4:172.168.0.69:56937] mapped to [DOMAIN][USER]. local host [ipv4:172.168.0.99:445]
[...]
No such user USER [DOMAIN] - using guest account
[2020/02/05 14:21:23.847182, 3] ../source3/smbd/server_exit.c:244(exit_server_common)
Server exit (NT_STATUS_CONNECTION_RESET)
I see server is trying to authenticate with user logged in Windows 10, but since not existing it falls back to guest user but connection is reset just after. In the other side, with a computer for which it is working, when logged with same domain/user and accessing successfully I have quite the same logs (different computer name and IP) but at the end:
No such user USER [DOMAIN] - using guest account
[2020/02/05 14:43:21.147396, 3] ../lib/util/access.c:365(allow_access)
Allowed connection from 192.168.0.77 (192.168.0.77)
I’m looking into it but I would be glad if anybody has a clue on what is happening.
Edit2: after a quick look I found a workaround on Windows 10 fall update and samba guest account but when trying net use command I have following issue, then this is my company that may have change security on newer computer (both used are on the same domain but the one not working comes from a newer installation):
You can't access this shared folder because your organization's security policies block unauthenticated guest access. These policies help protect your PC from unsafe or malicious devices on the network.
Thanks
Вы, наверное, не раз сталкивались с проблемой, что Ubuntu не видит сеть Windows или Windows не видит сетевую шару Linux. Такая проблема характерна для многих дистрибутивов с окружением Gnome. Ситуация довольно неоднозначная, раньше причиной этому был баг в GVFS, потом появилось ещё несколько осложняющих дело факторов.
В этой статье мы рассмотрим что делать если Ubuntu не видит шары Windows или Samba, как к ним всё таки подключится и можно ли решить проблему, сделать так чтобы Nautilus и Dolphin начали всё таки видеть сетевые ресурсы.
Почему Ubuntu не видит сеть Windows или Samba?
Нужно разобраться почему Ubuntu не может увидеть сеть Windows. Начиная с Windows 10 в компании Microsoft решили отказаться от старого протокола SMB1 и использовать только SMB2 и SMB3. Но в этих протоколах нет сетевого обнаружения. Для сетевого обнаружения в Windows теперь используется новый сервис WS-Discovery. В Nautilus для отображения сетевых ресурсов используется либо avahi либо протокол SMB1. Поэтому увидеть шару Windows не получится, не включив обратно устаревший протокол в реестре. Windows по умолчанию шары Samba тоже видеть не будет, потому что новый WS-Discovery в Samba не поддерживается. Ещё в 2015 году были предложены патчи для Samba добавляющие эту функциональность, но разработчики решили, что оно им не нужно. Поэтому если вы хотите чтобы Windows видела Samba, нужно отдельно установить сервис WSDD.
Но это ещё не всё. Начиная с версии Samba 4.11 разработчики решили, что они ничем не хуже Microsoft и отключили по умолчанию поддержку протокола SMB1. Теперь Nautils и Dolphin перестали видеть не только Windows шары, но и Linux тоже. Решается проблема либо установкой на Samba сервер Avahi, либо включением поддержки старого протокола SMB1 на сервере Samba.
Настойка сервера Samba
1. Включение протокола SMB1
Для того чтобы активировать протокол SMB1 в Samba необходимо добавить такие строчки в /etc/samba/smb.conf в секцию global:
sudo vi /etc/samba/smb.conf
server min protocol = NT1
client min protocol = NT1
min protocol = NT1
После этого надо перезапустить Samba.
sudo systemctl restart smbd
sudo systemctl restart nmbd
Хочу обратить ваше внимание, что у меня всё заработало только после того как я перезагрузил и сервер и клиент. Видимо что-то где-то кэшируется.
2. Настройка имени хоста
Имя хоста вашего компьютера, выводимое командой hostname должно совпадать со значением в файле /etc/hosts и со значением параметра netbios name в файле /etc/samba/smb.conf. Например:
hostname
cat /etc/samba/smb.conf
Регистр букв не имеет значения.
3. Установка Avahi
Если предыдущий способ не поможет, то установка Avahi должна помочь. Samba не будет отображаться в сетях Windows, но зато появится в сетевом окружении в Nautilus. Для установки Avahi выполните:
sudo apt install avahi-daemon avahi-utils
После этого сервис стоит запустить и добавить в автозагрузку:
sudo systemctl enable avahi-daemon
sudo systemctl start avahi-daemon
Проверить доступные сервисы можно командой:
avahi-browse --all
Среди них должна быть ваша шара, обозначенная как Microsoft Windows Network local.
4. Установка WSDD
Сервис WSDD нужен для того чтобы вашу шару было видно из Windows. Можно использовать сервис wsdd2 из этого репозитория. Его надо собрать из исходников, но в этом нет ничего сложного. Сначала склонируйте репозиторий:
git clone https://github.com/Andy2244/wsdd2.git
Затем перейдите в папку с проектом:
cd wsdd2
Выполните make для сборки:
make
Затем установите программу, она только скопирует исполняемый файл и службу systemd в нужные директории:
sudo make install
Осталось запустить службу:
sudo systemctl daemon-reload
sudo systemctl enable --now wsdd2
Теперь Windows сможет видеть ваш сервер Samba. Таким образом если всё сделать правильно, то все всех будут видеть.
1. Общий доступ в Windows
Убедитесь, что в Windows общий доступ был включён. Если общий доступ отключен, то вы не сможете никак получить доступ к ресурсам. Откройте проводник и перейдите в пункт Сеть. Если сетевой доступ отключён, то система выдаст соответствующее предупреждение:
Кликните по нему чтобы включить общий доступ, затем выберите Включить сетевое обнаружение и общий доступ к файлам.
После этого система ещё раз спросит надо ли разрешить доступ для всех общественных сетей. Ответьте утвердительно:
После этого вы сможете получить доступ к общим ресурсам этого компьютера.
2. Включение SMB1 в Windows
Для того чтобы включить поддержку протокола SMB1 в Windows 10 откройте поиск и наберите Включение компонентов. Затем откройте утилиту Включение и выключение компонентов Windows:
Дальше найдите пункт SMB1.0 CIFS File Sharing Support и установите напротив него галочку:
Затем необходимо перезапустить компьютер:
После этого Ubuntu начнёт видеть вашу шару Windows и вы сможете к ней подключится.
Настройка клиента
Исходя из выше перечисленного, клиент скорее всего не виноват, но можно попробовать его настроить чтобы быть уверенным точно. Как я уже написал выше Nautilus для подключения и просмотра общих папок Windows и Samba использует виртуальную файловую систему gvfs. А та, в свою очередь использует библиотеку libsmbclient для получения необходимых данных. Поэтому мы можем попытаться исправить ситуацию переопределив некоторые параметры в /etc/samba/smb.conf. Но работает это далеко не всегда.
1. Установить Samba
Если файловый сервер Samba у вас не установлен, то его надо установить для того чтобы был создан файл /etc/samba/smb.conf с параметрами по умолчанию. Они потом будут использоваться библиотекой libsmbclient и самой утилитой smbclient, которую вы можете применять для тестирования. Для установки выполните:
sudo apt install samba
Проверьте конфигурационный файл Samba на ошибки с помощью такой команды:
testparm
2. Рабочая группа
По умолчанию используется рабочая группа WORKGROUP. Убедитесь, что ваша рабочая группа имеет именно это имя, также убедитесь, что в /etc/samba/smb.conf задано правильное имя рабочей группы в параметре workgroup:
sudo vi /etc/samba/smb.conf
workgroup = WORKGROUP
3. Версия протокола
В современных системах Windows для общего доступа к папкам используется файловая система CIFS, использующая современные версии протоколов SMB2 и SMB3. Эти протоколы не поддерживают обзор доступных общих папок так, как это ожидает получить Nautilus. Для того чтобы всё работало надо использовать старый протокол NT1. Чтобы его включить добавьте параметр client max protocol после параметра workgroup:
client max protocol = NT1
После этого сохраните изменения и перезагрузите компьютер и проверьте.
4. Правильный порядок разрешения имён
Неверный порядок разрешения сетевых имен тоже может стать проблемой. Чтобы исправить его найдите в smb.conf параметр и приведите его к такому виду:
name resolve order = bcast lmhosts host wins
Здесь первым используется bcast, широковещательные сообщения, которые рассылаются по вашей локальной сети и ищут компьютеры с общими папками.
5. Не тот интерфейс
Если в вашем компьютере несколько сетевых интерфейсов, возможно smbclient пытается использовать не тот интерфейс. Чтобы посмотреть список интерфейсов используйте команду:
ls /sys/class/net
Затем найдите в /etc/samba/smb.conf параметр interface и замените в его значении eth0 на имя вашего интерфейса, который обеспечивает связь с нужной локальной сетью. Например на enp0s8:
interfaces = 127.0.0.0/8 enp0s8
После этого надо перезапустить службы Samba:
sudo systemctl restart smbd
sudo systemctl restart nmbd
6. Отладка
Если сеть Windows всё ещё не работает, вы можете попытаться отлаживать GVFS чтобы понять где именно возникает проблема и в чём её суть. Для этого надо завершить текущий сервер GVFS и запустить свой в терминале с включённой опцией отладки. Для этого выполните:
pkill gvfs; pkill nautilus
GVFS_DEBUG=all GVFS_SMB_DEBUG=10 $(find /usr/lib* -name gvfsd 2>/dev/null) --replace 2>&1 | tee gvfsd.log
Затем откройте Nautils и войдите в сетевое окружение, сеть Windows. При этом в терминале будут выводится сообщения об ошибках работы службы. Вы можете использовать эти сообщения чтобы искать информацию в Google или попросить помощи на форумах.
7. Проблема в GVFS
Баг в GVFS, о котором я писал выше наблюдался для Samba версии 4.8 и ниже. Если сервер поддерживает протокол более высокого уровня, то клиент пытается использовать этот протокол, например SMB2 или SMB3, но на этих протоколах не работает отображение доступных ресурсов. Если у вас именно эта проблема, то для полного решения придется ждать обновления или использовать обходное решение описанное ниже.
8. Подключение напрямую
Даже если у вас не работает обнаружение сетевых ресурсов Windows, вы все ещё можете подключится к нужному компьютеру и получить с него файлы. Откройте пункт Другие места на левой панели Nautilus. Внизу окна вы увидите надпись Подключится к серверу введите smb://адрес_сервера в поле слева и нажмите Enter:
После этого система предложит ввести имя пользователя и пароль для доступа к общему ресурсу. Этот пользователь должен реально существовать на машине, к которой вы собираетесь подключится.
Введите пароль и вы увидите доступные общие папки:
Выводы
Если всё будет сделано правильно то Linux увидит вашу шару Windows или Samba:
В этой статье мы кратко рассмотрели почему Ubuntu не видит сеть Windows, а также как исправить эту проблему. Если проблему с сетевым обнаружением устранить не удается, вы всегда можете попробовать подключится вручную. Это не решает основную проблему, но позволяет получить нужные файлы. Вы знаете другие способы решения? Поделитесь ими в комментариях!
Статья распространяется под лицензией Creative Commons ShareAlike 4.0 при копировании материала ссылка на источник обязательна .
I have a Samba server version 4.1.11 running on Ubuntu 14.04. I cannot connect from Windows 10 (but I can from Windows 7).
The server and the clients are not on the same LAN.
The error message given by Windows is that the server is online but not responding. However the Samba logs say otherwise.
I have attached the logs for a failed connection attempt from Windows 10, and those for a successful attempt from Windows 7 (for comparison).
Briefly, unlike the successful attempt, the failed one starts with:
switch message SMBnegprot (pid 2855) conn 0x0
then it requests a number of different protocols before selecting SMB2_FF
. Then, after some security negotiations, it switches to protocol SMB 2.???
, then SMB3_00
, followed by:
Server exit (NT_STATUS_END_OF_FILE).
The successful attempt selects protocol SMB2_10
from the start, but this protocol is not even requested by Windows 10.
Here are the logs :
Failed attempt (from Windows 10)
http://pastebin.com/M0xmBuY3
Successful attempt (from Windows 7)
http://pastebin.com/jF8VzaiA
I’ve added my smb.conf file in a comment (can’t have more than 2 links with <10 reputation)
asked Sep 5, 2015 at 16:22
pnglpngl
4191 gold badge3 silver badges8 bronze badges
1
Problem: Windows removed SMB v1 protocol on latest Windows OS, Linux try to connect with v1 protocol and Windows/Linux fails to try protocol 2, 3 etc.
Solution: edit linux (ubuntu) Samba conf file:
sudo nano /etc/samba/smb.conf
on the [GLOBAL] section add:
client min protocol = SMB2
client max protocol = SMB3
then save file and restart samba
in my case I also had to explicit put a password or my Samba user, but I think that was my specific system problem.
answered Mar 20, 2020 at 15:07
1
I think I have a solution that works on Windows 7 — 10 and on Server 2012
In my case commenting out my line «smb ports 139» helped.
I am using FreeBSD 10 with Samba 4.4.5
Here is a copy of my SMB4.conf. I hope it helps someone.
[global]
netbios name = SERV
server string = FreeBSD Samba Server
security = ADS
workgroup = FFTPJ
realm = fftpj.local
log file = /var/log/samba4/%m.log
log level = 1
# Default idmap config used for BUILTIN and local windows accounts/groups
idmap config *:backend = tdb
idmap config *:range = 2000-9999
# idmap config for domain FFTPJ
idmap config DOMAIN:backend = rid
idmap config DOMAIN:range = 10000-99999
# Use template settings for login shell and home directory
winbind nss info = template
winbind enum users = Yes
winbind enum groups = Yes
winbind use default domain = yes
client use spnego = yes
client ntlmv2 auth = yes
encrypt passwords = yes
restrict anonymous = 2
valid users = @"Domain Users
# **** When smb ports is Set Windows 10 clients cannot connect
#smb ports = 139
load printers = No
disable spoolss = Yes
local master = No
hide dot files = No
wide links = No
store dos attributes = yes
vfs objects = acl_xattr
map acl inherit = yes
[images]
comment = Images Drive
path = /images
read only = No
[backups]
comment = Backup Drive
path = /data/backup
read only = No
answered Sep 20, 2016 at 20:56
FitzroyFitzroy
511 silver badge1 bronze badge
1
I agree with others related to default setting in Windows 10 as a client. Anyway I got it working WITHOUT any changes on client side with this setting in Global section on samba server (samba-4.7.1-9.el7_5.x86_64 — repo version for CentOs 7):
[global]
workgroup = <workgroup>
realm = <realm>
server string = FileShare server
netbios name = <nbname>
interfaces = lo eth0 <...>
hosts allow = 127. 192.168.0. <...>
log file = /var/log/samba/log.%m
max log size = 10240
security = user
map to guest = Bad Password
usershare allow guests = No
server signing = auto
passdb backend = tdbsam
local master = yes
vfs objects = acl_xattr
map acl inherit = yes
store dos attributes = yes
winbind nss info = template
winbind enum users = Yes
winbind enum groups = Yes
winbind use default domain = yes
client use spnego = yes
client ntlmv2 auth = yes
encrypt passwords = yes
local master = No
hide dot files = No
allow insecure wide links = yes
store dos attributes = yes
answered Dec 11, 2018 at 13:37
Kamil JKamil J
1,6271 gold badge5 silver badges10 bronze badges
I found that this will work and without needing to edit the Registry or disable the SMB 2/3 services I was able to connect to my raspi 3 that uses Samba-4.2.10-Debian by manually typing in the address as well as typing in the netbios name setup in the raspi’s smb.conf file in the file explorer’s address bar on Windows 10.
I would click on the network tab but the I could not find my samba share, even though network sharing was enabled and what not, but after typing in //192.168.0.22 (address of my pi) or //SAMBA (the netbios name I setup in smb.conf) I was then able to connect and my samba share.
My Windows 10 at the time still did not connect to SMB 4.x but this seemed to work around this. After that just map the drive and you no longer need to manually enter in the address.
Win 10 version — 10.0.14393 Build 14393 (w/ latest updates)
Hope this helps any one else in the future.
//SAMBA
//192.168.0.22
answered Aug 27, 2016 at 2:32
1
I’m a beginner in Linux. I tried a lot of options. After many hours spent, I found the solution!
(I recommend to make a copy of smb.conf, and after try to make changes)
Works 100% on windows 10/7/8/Ubuntu at 07.06.2017 with fresh install of Ubuntu and samba
Another thing I think is important, change path to /home/server-media/Desktop/test
or create same path at your server!
To start and stop samba use command
/etc/init.d/smbd stop
/etc/init.d/smbd start
For easy edit use midnight commander. Start in command from root «mc»
Copy all text from the config below. After you try and are sure it is working, you can delete the old one.
[global]
#editat la ora 20:30 in data 07.06.2017
server max protocol = SMB3
encrypt passwords = yes
dns proxy = no
strict locking = no
oplocks = yes
deadtime = 15
max log size = 51200
max open files = 933761
logging = file
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
getwd cache = yes
guest account = nobody
map to guest = Bad User
obey pam restrictions = yes
directory name cache size = 0
kernel change notify = no
panic action = /usr/local/libexec/samba/samba-backtrace
nsupdate command = /usr/local/bin/samba-nsupdate -g
server string = Media Server
# habarnam de ce dar urmatoarele lini au importanta in wingoz
ea support = yes
store dos attributes = yes
lm announce = yes
hostname lookups = yes
# time server nu conteaza dar mi-l trebuie
time server = yes
acl allow execute always = true
dos filemode = yes
multicast dns register = yes
domain logons = no
local master = yes
idmap config *: backend = tdb
idmap config *: range = 90000001-100000000
server role = standalone
netbios name = MEDIA SERVER
workgroup = WORKGROUP
# am incercat si cu = share si apar erori la pornirea samba
security = user
pid directory = /home/server-media/Desktop/test
# aici am incercat cu mai multe variante ca si 0775 sau 0700 sau 0600 etc.
create mask = 0666
directory mask = 0777
client ntlmv2 auth = yes
# asta iara nu mai e important!
dos charset = CP437
unix charset = UTF-8
log level = 1
[homes]
comment = Home Directories
path = /home
valid users = %U
read only = no
available = yes
browseable = yes
writable = yes
guest ok = no
public = no
printable = no
locking = no
strict locking = no
[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
#din no in yes la read
read only = yes
available = yes
browseable = yes
writable = no
#din no in yes la guest
guest ok = yes
public = no
printable = no
locking = no
strict locking = no
[profiles]
comment = User Profiles
path = /var/lib/samba/profiles
read only = no
available = yes
browseable = yes
writable = yes
guest ok = no
public = no
printable = no
#din 0600
create mode = 0666
#din 0700
directory mask = 0777
locking = no
strict locking = no
[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
writable = no
#guest am pus yes
guest ok = yes
public = no
printable = yes
locking = no
strict locking = no
#am bagat urm linii
read only = no
create mask = 0775
[pdf-documents]
path = /var/lib/samba/pdf-documents
comment = Converted PDF Documents
admin users = %U
available = yes
browseable = yes
writeable = yes
guest ok = yes
locking = no
strict locking = no
[pdf-printer]
path = /tmp
comment = PDF Printer Service
printable = yes
guest ok = yes
use client driver = yes
printing = bsd
print command = /usr/bin/gadmin-samba-pdf %s %u
lpq command =
lprm command =
[test]
path = /home/server-media/Desktop/test
comment = doar de test
valid users = test
write list = test
admin users = test
directory mask = 0755
create mode = 0777
read only = no
available = yes
browseable = yes
writable = yes
guest ok = no
public = yes
printable = no
locking = no
strict locking = no
answered Jun 7, 2017 at 18:08
1
In Windows 10 Fall Creators Update and Windows Server, version 1709 (RS3), the Server Message Block version 1 (SMBv1) network protocol is no longer installed by default.
Program & Features, add/remove windows features …turn on CIF/SMB 1.0
answered Nov 5, 2018 at 4:57
BozojoeBozojoe
6076 silver badges17 bronze badges
I lost more than 5 hours finding the solution for this issue. Hope this solves your issues as well.
Solution: chcon -R -t samba_/share_t /path_to_your_samba_location
In my case: chcon -R -t samba_/share_t /home/share
answered Apr 28, 2020 at 13:57
l1denl1den
111 bronze badge
I Had the same issue, my Windows 10 workstation could not connect to Sambashare after upgrade of win, errors was error 53, and missing protocols missing wins settings in registry nothing really helped in my case!
What worked for me was:
Open services ( right click on start -> Computer management -> Services and Applications -> and click on services )
Now in services, scroll down to Workstation, is the service running ? If not, you may have same issue as I had.
on my 3 working PC’s now all have in the dependencies
+ Browser Support driver
+ Network Store Interface Service
+ SMB 1.x Miniredirector
+ SMB 2.0 Miniredirector
The way I fixed my issue was:
remove service:
sc.exe delete lanmanworkstation
Re-create service:
sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi
and then start the service
And my Samba share was accessible even without reboot.
answered Feb 25, 2016 at 8:11
1
I have Samba 4.2.10 on CentOS 7.2. None of above answers worked for me but when I disabled jumbo packet on Windows 10, everything started to work with default settings on clean Windows 10 installation, very simple. Hope it will help someone else.
answered Nov 10, 2016 at 9:37
sekrettsekrett
1811 silver badge6 bronze badges
2
I made an account just for this
the smb.conf file has the following
# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
; interfaces = 127.0.0.0/8 eth0
Well my eth was not mapped to eth0. It was enp3s0
# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
; interfaces = 127.0.0.0/8 enp3s0
Changed that int he file , smb restart and Windows could now see it. Also, make sure you enable smb in the ubuntu firewall,
sudo ufw allow samba
answered May 23, 2020 at 6:41
1
My solution. Move the current smb.conf to smb.conf.orig (start afresh). Create a new smb.conf and add the following:
[global]
workgroup = workgroup
server string = %h server (Samba, Ubuntu)
log file = /var/log/samba/log.%m
max log size = 1000
logging = file
panic action = /usr/share/samba/panic-action %d
server role = standalone server
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* .
pam password change = yes
map to guest = bad user
lanman auth = no
ntlm auth = no
client ntlmv2 auth = yes
usershare allow guests = no
#
[Share]
comment = Share Root
writeable = yes
browseable = yes
read only = no
create mask = 0775
directory mask = 0775
valid users = a_user
path = /
guest ok = no
#
answered Jul 19, 2020 at 4:22
Microsoft removed SMBv1 protocol support by default on Windows 10/2016 and higher. The samba clients seems to try to connect using SMBv1, which therefore fails.
You may be successful with this changes to your /etc/samba/smb.conf
:
client min protocol = SMB2
client max protocol = SMB3
in the [GLOBAL]
Section.
In my case I also had to put a password on my Samba user(s), but I think that was my specific system problem.
bjoster
4,5575 gold badges22 silver badges33 bronze badges
answered Jul 21, 2020 at 14:27
1
In my case, SMB2 looks like it was negotiated, then the linux Samba server attempted to negotiate SMB3.1.1 because windows 10 said it was supported. Windows 10 then drops the connection. I disabled SMB3 in my Samba server and it worked like a charm.
Under [GLOBAL]
in /etc/samba/smb.conf:
client min protocol = SMB2
client max protocol = SMB2
answered Aug 14, 2020 at 4:35
Before changing all kinds of settings…
I don’t have all these fancy settings. In fact I have very few general settings.
My global config:
workgroup = WORKGROUP
security = user
passdb backend = tdbsam
vfs objects = acl_xattr
map acl inherit = yes
store dos attributes = yes
ntlm auth = yes
I had a Samba server on CentOS 7 and migrated to CentOS 8 (new install). The Samba shares were also opened on a Windows device. After trying to connect to the same share on the CentOS8 install with the same credentials configured I couldn’t login to the share anymore.
Still I got the message that my credentials were incorrect.
Key things to do:
- Test if you can login to the share through smbclient
- Check you have the right SElinux context (samba_share_t) or check by temporarily disabling SElinux (setenforce 0).
Usesemanage fcontext -a -t samba_share_t /mnt/myshare
andrestorecon -R /mnt/myshare
to ensure that in the future you’ll always have the correct SElinux context for that directory. Although the chcon method works it won’t get the right result when e.g. relabeling your filesystem. - If you were connected to this share before and you can’t login anymore while you supply the correct credentials: remove the mapping and create a new one (go to samba-host and supply your credentials again.
I was fiddling with this last step for so long until I tried on another Windows 10 device and it worked right away.
answered Nov 27, 2021 at 6:33
Just wasted a few hours trying to fix this with Windows 10 and Ubuntu 20.04. Turns out I’d forgotten to sudo smbpasswd -a <username>
(!). Do add this step to your checklist.
answered Mar 10, 2022 at 12:07
J EvansJ Evans
1551 gold badge1 silver badge7 bronze badges
После обновления на домашнем ПК MS Windows до версии 1709 перестал подключаться к сетевой папке. Отваливается с ошибкой 0x80004005. Решение проблемы далее
Имеется домашний сервер на базе FreeBSD, на нем поднят SAMBA сервер, на котором расшарена папка. Безопасность в домашней сети нулевая, на SAMBA настроен гостевой доступ с полными правами к единственной сетевой папке. Все работало до обновления домашнего ПК с MS Windows 10 до версии 1709. После обновления этот комп перестал видеть шару. Остальные устройства видят шару как и раньше, без проблем. После обновления в MS Windows 10 «подкрутили гайки» с безопасностью и гостевой доступ стал недоступен.
Ослабляем гайки и возвращаем доступ
Для этого запускаем редактор групповой политики на ПК
Политика «Локальный компьютер»Конфигурация компьютераАдминистративные шаблоныСетьРабочая станция Lanman
Параметр «Включить небезопасные гостевые входы» — Состояние «Включена»
Перезагружаем ПК и проверяем, что доступ к сетевой папке появился
Где искать в английской версии:
Group Policy settings:
Computer configurationadministrative templatesnetworkLanman Workstation
«Enable insecure guest logons»
Настройки можно произвести и через реестр
Default Registry Value:
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesLanmanWorkstationParameters]
«AllowInsecureGuestAuth»=dword:0
Configured Registry Value:
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesLanmanWorkstationParameters]
«AllowInsecureGuestAuth»=dword:1
11.05.2022
Сегодня в статье опишу проблему с samba сервером в домашней локальной сети. Samba работает, но в сетевом окружении сервера не видно. По IP-адресу или имени DNS всё работает и на share-ресурсы можно зайти.
Samba — Пакет программ, которые позволяют обращаться к сетевым дискам и принтерам на различных операционных системах по протоколу SMB/CIFS. Имеет клиентскую и серверную части.
Конфигурационный файл samba
Вот мой конфиг для Samba:
[global]
dos charset = CP866
unix charset = UTF8
store dos attributes = yes
announce version = 5.0
unix extensions = yes
netbios name = SMB
server string = %h (Samba, Ubuntu)
workgroup = Workgroup
interfaces = lo ens18
wins support = no
domain master = yes
local master = yes
preferred master = yes
os level = 65
; bind interfaces only = yes
log file = /var/log/samba/log.%m
max log size = 1000
logging = file
panic action = /usr/share/samba/panic-action %d
server role = standalone server
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdate>
pam password change = yes
map to guest = bad user
########## Domains ###########
; logon path = \%Nprofiles%U
; logon drive = H:
; logon script = logon.cmd
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s >
; add group script = /usr/sbin/addgroup --force-badname %g
############ Misc ############
; include = /home/samba/etc/smb.conf.%m
; idmap config * : backend = tdb
; idmap config * : range = 3000-7999
; idmap config YOURDOMAINHERE : backend = tdb
; idmap config YOURDOMAINHERE : range = 100000-999999
; template shell = /bin/bash
usershare allow guests = yes
#======================= Share Definitions =======================
[myuser]
path = /home/myuser
browseable = yes
read only = no
force create mode = 0660
force directory mode = 2770
valid users = root
Решение проблемы
Что бы я ни делал, какие конфигурации не использовал. Samba-сервер ни как не хотел появляться в сетевом окружении. Перелопатив кучу форумов я наткнулся на сообщения в котором было написано решение данной проблемы. Но написано было так, что не каждый разберется, как будто с китайского переводили . Вот и на этом форуме не обратили на данное сообщение внимание. Ну да ладно, главное что помогло. Да у меня samba крутится на Ubuntu Server 20.04 LTS. И так установим необходимую утилиту:
apt install avahi-daemon
Пропишем её в автозагрузку:
systemctl enable avahi-daemon.service
Запустим сервис:
systemctl start avahi-daemon.service
После данной манипуляции в сетевом окружении Linux машин появился samba-сервер.
Если есть вопросы, то пишем в комментариях.
Также можете вступить в Телеграм канал, ВКонтакте или подписаться на Twitter. Ссылки в шапке страницы.
Заранее всем спасибо!!!
RSS
Если вы нашли ошибку, пожалуйста, выделите фрагмент текста и нажмите Ctrl+Enter.
I reinstall Ubuntu 16.04 Desktop 32bit on an old laptop and setup samba as https://tutorials.ubuntu.com/tutorial/install-and-configure-samba#0 mentions. When I try to connect from a Windows 10 or Windows 7 machine I get the following:
Windows can’t communicate with the device or resource(192.168.1.50)
The resource is available but is not responding to connection attempts.
any suggestion?
asked Oct 23, 2019 at 17:52
I had a similar problem.
The problem is that Windows did not ask me for the samba user credentials and only generated an error 0x80070035.
So I did the following:
- Go to «This PC»
- Click on «Map network drive»
- As Folder add «\samba server IP share name«
- Check the «Connect using different credentials»
- Finish
Now windows should ask you the samba user credentials.
answered Feb 23, 2020 at 10:00
AlekosAlekos
3582 silver badges8 bronze badges
1
I have this problem and able to fix this with Windows 10 and Ubuntu 20.04 Focal Fossa without installing SMB v1 or change the regedit. There are few things need to be changed in /etc/samba/smb.conf
passdb backend = tdbsam
security = user
Change the networking
#### Networking ####
# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
interfaces = 192.168.100.63 wlp1s0
bind interfaces only = yes
And change user
#map to guest = bad user
force user = username
Don’t forge to add your username into smb. The detailed step with images documented over here:
https://www.yodiw.com/install-samba-ubuntu-20-04-and-windows-10-sharing/
answered May 18, 2020 at 16:16
yodiyodi
9148 silver badges10 bronze badges
1
In /etc/samba/smb.conf should add this
[global]
client min protocol = SMB3
client max protocol = SMB3
In windows 10 should edit this
enter in Local Group Policy Editor (search in windows) Computer Configuration -> Administrative Templates -> Network -> Lanman Workstation -> Enable Insecure Guest Logon — Enabled
answered May 29, 2020 at 22:08
After a long battle with accessing samba share located on Debian VM from Windows 10, these steps saved my life:
- Open the Local Group Policy Editor (gpedit.msc).
- In the console tree, select Computer Configuration/Administrative Templates/Network/Lanman Workstation.
- For the setting, right-click Enable insecure guest logons and select Edit.
- Select Enabled and select OK.
You can also take a look at the EventViewer to inspect the Microsoft-Windows-SMBClient/Security section. In my case there was an error «Rejected an insecure guest logon.» before above steps was applied.
More info can be found here — https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/guest-access-in-smb2-is-disabled-by-default
answered Sep 16, 2021 at 22:11
1
Samba (SMBv1 protocol) is no longer supported on Windows 10. To temporarily re-enable the SMBv1 protocol on Windows 10 follow these steps:
- Open Control Panel.
- Click on Programs.
- Click on Turn Windows features on or off link.
- Expand the SMB 1.0/CIFS File Sharing Support option.
- Check the SMB 1.0/CIFS Client option.
- Click the OK button.
- Click the Restart now button.
I hope that helps. You should only use these steps as a temporary solution.
Reference: https://www.windowscentral.com/how-access-files-network-devices-using-smbv1-windows-10
answered Oct 23, 2019 at 18:02
tshenolotshenolo
4632 silver badges9 bronze badges
2
I have an issue under Windows 10 to access some Linux Samba shares with following error:
Check the spelling of the name. Otherwise, there might be a problem with your network. To try to identify and resolve network problems click Diagnose.
Error code: 0x80070035
The network path was not found
I can successfully browse from an old openSUSE 12.1 that uses only SMB1/CIFS but not from a more recent openSUSE Leap 15, except if I force NT1 protocol (that is for SMB1/CIFS) on its side, in /etc/samba/smb.conf global section:
[global]
...
min protocol = NT1
max protocol = NT1
For information, by default min protocol is LANMAN1 and max protocol is SMB3, that range then includes NT1 protocol (see SMB protocol min max values available?):
$ testparm --parameter-name="min protocol"
[...]
LANMAN1
$ testparm --parameter-name="max protocol"
[...]
SMB3
And I can access these shared folders from another Linux computer without forcing protocol with following command for example I can list folders:
smbclient -L MyLeap15Computer -N
Or connect to tmp shared folder with:
smbclient //MyLeap15Computer /tmp -N
I also confirmed that SMB2 and 3 are actually active with How to detect, enable and disable SMBv1, SMBv2, and SMBv3 in Windows, and also been able to access them from another Windows 10. And from the computer on which I cannot access them I successfully ping MyLeap15Computer.
Anyway, technically I can access my shared folders by forcing NT1 protocol, but since it should be possible I want to be able to access them from SMB2 or SMB3 since there are security issues in SMB1/CIFS (and then deactivate it in Windows 10 too), also, since I can access them from another Windows 10 without forcing this protocol it then should be something in Windows configuration but I cannot manage to see which since everything appears active on both.
And finally, even if issue seems to be more on client side, here is the server condifuration, /etc/samba/smb.conf without forcing to NT1 protocol (this configuration accepts guest users, then no credentials have to be given for connection):
[global]
workgroup = WORKGROUP
passdb backend = tdbsam
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = bad user
logon path = \%Lprofiles.msprofile
logon home = \%L%U.9xprofile
logon drive = P:
usershare allow guests = yes
usershare max shares = 100
winbind offline logon = yes
winbind refresh tickets = yes
create mask = 777
directory mask = 777
delete readonly = yes
[tmp]
comment = Temp folder
path = /tmp
browseable = yes
writable = yes
read only = no
guest ok = yes
mangled names = no
Edit: here are more information after what suggested @JW0914, what was suggested did not work but I found something interesting in server logs (added log level = 3 to /etc/samba/smb.conf global section then looked on /var/log/samba/log.smbd after having tried connection):
check_ntlm_password: Checking password for unmapped user [DOMAIN][USER]@[Windows10Computer] with the new password interface
[2020/02/05 14:21:23.845849, 3] ../source3/auth/auth.c:192(auth_check_ntlm_password)
check_ntlm_password: mapped user is: [DOMAIN][USER]@[Windows10Computer]
[2020/02/05 14:21:23.845879, 3] ../source3/auth/check_samsec.c:399(check_sam_security)
check_sam_security: Couldn't find user 'USER' in passdb.
[2020/02/05 14:21:23.845890, 2] ../source3/auth/auth.c:332(auth_check_ntlm_password)
check_ntlm_password: Authentication for user [USER] -> [USER] FAILED with error NT_STATUS_NO_SUCH_USER, authoritative=1
[2020/02/05 14:21:23.845910, 2] ../auth/auth_log.c:760(log_authentication_event_human_readable)
Auth: [SMB2,(null)] user [DOMAIN][USER] at [Wed, 05 Feb 2020 14:21:23.845900 CET] with [NTLMv2] status [NT_STATUS_NO_SUCH_USER] workstation [Windows10Computer] remote host [ipv4:172.168.0.69:56937] mapped to [DOMAIN][USER]. local host [ipv4:172.168.0.99:445]
[...]
No such user USER [DOMAIN] - using guest account
[2020/02/05 14:21:23.847182, 3] ../source3/smbd/server_exit.c:244(exit_server_common)
Server exit (NT_STATUS_CONNECTION_RESET)
I see server is trying to authenticate with user logged in Windows 10, but since not existing it falls back to guest user but connection is reset just after. In the other side, with a computer for which it is working, when logged with same domain/user and accessing successfully I have quite the same logs (different computer name and IP) but at the end:
No such user USER [DOMAIN] - using guest account
[2020/02/05 14:43:21.147396, 3] ../lib/util/access.c:365(allow_access)
Allowed connection from 192.168.0.77 (192.168.0.77)
I’m looking into it but I would be glad if anybody has a clue on what is happening.
Edit2: after a quick look I found a workaround on Windows 10 fall update and samba guest account but when trying net use command I have following issue, then this is my company that may have change security on newer computer (both used are on the same domain but the one not working comes from a newer installation):
You can't access this shared folder because your organization's security policies block unauthenticated guest access. These policies help protect your PC from unsafe or malicious devices on the network.
Thanks
I have an issue under Windows 10 to access some Linux Samba shares with following error:
Check the spelling of the name. Otherwise, there might be a problem with your network. To try to identify and resolve network problems click Diagnose.
Error code: 0x80070035
The network path was not found
I can successfully browse from an old openSUSE 12.1 that uses only SMB1/CIFS but not from a more recent openSUSE Leap 15, except if I force NT1 protocol (that is for SMB1/CIFS) on its side, in /etc/samba/smb.conf global section:
[global]
...
min protocol = NT1
max protocol = NT1
For information, by default min protocol is LANMAN1 and max protocol is SMB3, that range then includes NT1 protocol (see SMB protocol min max values available?):
$ testparm --parameter-name="min protocol"
[...]
LANMAN1
$ testparm --parameter-name="max protocol"
[...]
SMB3
And I can access these shared folders from another Linux computer without forcing protocol with following command for example I can list folders:
smbclient -L MyLeap15Computer -N
Or connect to tmp shared folder with:
smbclient //MyLeap15Computer /tmp -N
I also confirmed that SMB2 and 3 are actually active with How to detect, enable and disable SMBv1, SMBv2, and SMBv3 in Windows, and also been able to access them from another Windows 10. And from the computer on which I cannot access them I successfully ping MyLeap15Computer.
Anyway, technically I can access my shared folders by forcing NT1 protocol, but since it should be possible I want to be able to access them from SMB2 or SMB3 since there are security issues in SMB1/CIFS (and then deactivate it in Windows 10 too), also, since I can access them from another Windows 10 without forcing this protocol it then should be something in Windows configuration but I cannot manage to see which since everything appears active on both.
And finally, even if issue seems to be more on client side, here is the server condifuration, /etc/samba/smb.conf without forcing to NT1 protocol (this configuration accepts guest users, then no credentials have to be given for connection):
[global]
workgroup = WORKGROUP
passdb backend = tdbsam
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = bad user
logon path = \%Lprofiles.msprofile
logon home = \%L%U.9xprofile
logon drive = P:
usershare allow guests = yes
usershare max shares = 100
winbind offline logon = yes
winbind refresh tickets = yes
create mask = 777
directory mask = 777
delete readonly = yes
[tmp]
comment = Temp folder
path = /tmp
browseable = yes
writable = yes
read only = no
guest ok = yes
mangled names = no
Edit: here are more information after what suggested @JW0914, what was suggested did not work but I found something interesting in server logs (added log level = 3 to /etc/samba/smb.conf global section then looked on /var/log/samba/log.smbd after having tried connection):
check_ntlm_password: Checking password for unmapped user [DOMAIN][USER]@[Windows10Computer] with the new password interface
[2020/02/05 14:21:23.845849, 3] ../source3/auth/auth.c:192(auth_check_ntlm_password)
check_ntlm_password: mapped user is: [DOMAIN][USER]@[Windows10Computer]
[2020/02/05 14:21:23.845879, 3] ../source3/auth/check_samsec.c:399(check_sam_security)
check_sam_security: Couldn't find user 'USER' in passdb.
[2020/02/05 14:21:23.845890, 2] ../source3/auth/auth.c:332(auth_check_ntlm_password)
check_ntlm_password: Authentication for user [USER] -> [USER] FAILED with error NT_STATUS_NO_SUCH_USER, authoritative=1
[2020/02/05 14:21:23.845910, 2] ../auth/auth_log.c:760(log_authentication_event_human_readable)
Auth: [SMB2,(null)] user [DOMAIN][USER] at [Wed, 05 Feb 2020 14:21:23.845900 CET] with [NTLMv2] status [NT_STATUS_NO_SUCH_USER] workstation [Windows10Computer] remote host [ipv4:172.168.0.69:56937] mapped to [DOMAIN][USER]. local host [ipv4:172.168.0.99:445]
[...]
No such user USER [DOMAIN] - using guest account
[2020/02/05 14:21:23.847182, 3] ../source3/smbd/server_exit.c:244(exit_server_common)
Server exit (NT_STATUS_CONNECTION_RESET)
I see server is trying to authenticate with user logged in Windows 10, but since not existing it falls back to guest user but connection is reset just after. In the other side, with a computer for which it is working, when logged with same domain/user and accessing successfully I have quite the same logs (different computer name and IP) but at the end:
No such user USER [DOMAIN] - using guest account
[2020/02/05 14:43:21.147396, 3] ../lib/util/access.c:365(allow_access)
Allowed connection from 192.168.0.77 (192.168.0.77)
I’m looking into it but I would be glad if anybody has a clue on what is happening.
Edit2: after a quick look I found a workaround on Windows 10 fall update and samba guest account but when trying net use command I have following issue, then this is my company that may have change security on newer computer (both used are on the same domain but the one not working comes from a newer installation):
You can't access this shared folder because your organization's security policies block unauthenticated guest access. These policies help protect your PC from unsafe or malicious devices on the network.
Thanks
I had a similar issue where I was trying to share files between a Linux Mint 18 Samba server and a Windows 10 workstation. Through some digging I found this process:
Linux Samba Server
Check your /etc/samba/smb.conf for syntax errors by running:
testparm
Ideally we are looking for this on stdout there somewhere:
Loaded services file OK.
If you are using system-config-samba, let’s squash a bug:
sudo touch /etc/libuser.conf
sudo chmod 644 /etc/libuser.conf
Now restart the samba server any number of ways depending on your distro. Here’s a few examples of that: How to restart samba server?
sudo service smbd restart
sudo service nmbd restart
Now that’s done, we can check to be sure the smbd and nmbd processes are running with this:
ps aux | grep mbd
You should get something like this:
root 18379 0.0 0.2 337912 15856 ? Ss 03:04 0:00 smbd -D -s /etc/samba/smb.conf
root 18386 0.0 0.0 240452 5988 ? Ss 03:04 0:00 nmbd -D -s /etc/samba/smb.conf
If they aren’t running, fire them up. Check your syslog for errors.
Windows client machine
(where the smb server isn’t showing up in the network).
Now the fun part. Open a file explorer window and in the address bar type the name of your samba server and append a ‘.local‘ to it such as this:
\mysambaserver.local
If you have configured samba correctly, it’ll pop right up. Afterward, you could right click this server in explorer and create a shortcut in the start menu or your quick access list.
TL;DR
I give credit where it’s due: Credit goes to altair4 on the Linux Mint forums (a beast). If you have more questions about this method, do yourself a solid… check his post to see if you missed anything during setup or configuration.