Load smb config files from etc samba smb conf error loading services

I was able to workaround the installation failure by using systemd-tmpfiles to create the missing directory: +bryan@bryanNAS:~$ sudo dpkg --configure -a Setting up samba-common-bin (2:4.11.6+dfsg-0ubuntu1.3) ... Checking smb.conf with testparm Load smb config files from /etc/samba/smb.conf Loaded services file OK. ERROR: lock directory /run/samba does not exist ERROR: pid directory /run/samba does not exist WARNING: some services use vfs_fruit, others don't. Mounting them in conjunction on...

I was able to workaround the installation failure by using systemd-tmpfiles to create the missing directory:

+bryan@bryanNAS:~$ sudo dpkg —configure -a
Setting up samba-common-bin (2:4.11.6+dfsg-0ubuntu1.3) …
Checking smb.conf with testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
ERROR: lock directory /run/samba does not exist

ERROR: pid directory /run/samba does not exist

WARNING: some services use vfs_fruit, others don’t. Mounting them in conjunction on OS X clients results in undefined behaviour.

Server role: ROLE_STANDALONE

dpkg: error processing package samba-common-bin (—configure):
 installed samba-common-bin package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of samba:
 samba depends on samba-common-bin (= 2:4.11.6+dfsg-0ubuntu1.3); however:
  Package samba-common-bin is not configured yet.

dpkg: error processing package samba (—configure):
 dependency problems — leaving unconfigured
Errors were encountered while processing:
 samba-common-bin
 samba
+bryan@bryanNAS:~$ sudo /bin/systemd-tmpfiles —create /usr/lib/tmpfiles.d/samba.conf
+bryan@bryanNAS:~$ sudo dpkg —configure -a
Setting up samba-common-bin (2:4.11.6+dfsg-0ubuntu1.3) …
Checking smb.conf with testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
WARNING: some services use vfs_fruit, others don’t. Mounting them in conjunction on OS X clients results in undefined behaviour.

Server role: ROLE_STANDALONE

Done
Setting up samba (2:4.11.6+dfsg-0ubuntu1.3) …
Installing new version of config file /etc/init.d/nmbd …
Installing new version of config file /etc/init.d/samba-ad-dc …
Installing new version of config file /etc/init.d/smbd …
Installing new version of config file /etc/logrotate.d/samba …
Samba is not being run as an AD Domain Controller: Masking samba-ad-dc.service
Please ignore the following error about deb-systemd-helper not finding those services.
(samba-ad-dc.service already masked)
Removing obsolete conffile /etc/init.d/samba …
Removing obsolete conffile /etc/init/nmbd.conf …
Removing obsolete conffile /etc/init/reload-smbd.conf …
Removing obsolete conffile /etc/init/samba-ad-dc.conf …
Removing obsolete conffile /etc/init/smbd.conf …
Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is masked.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on samba-ad-dc.service: No such file or directory
samba-ad-dc.service is a disabled or a static unit not running, not starting it.
Processing triggers for libc-bin (2.31-0ubuntu9) …
Processing triggers for systemd (245.4-4ubuntu3.1) …
Processing triggers for ureadahead (0.100.0-21) …

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: samba-common-bin 2:4.11.6+dfsg-0ubuntu1.3
ProcVersionSignature: Ubuntu 5.4.0-40.44-generic 5.4.44
Uname: Linux 5.4.0-40-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.3
Architecture: amd64
CasperMD5CheckResult: skip
Date: Thu Jul 2 17:08:23 2020
ErrorMessage: installed samba-common-bin package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2017-08-20 (1047 days ago)
InstallationMedia: Ubuntu 17.04 «Zesty Zapus» — Release amd64 (20170412)
OtherFailedConnect: Yes
Python3Details: /usr/bin/python3.8, Python 3.8.2, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: /usr/bin/python2.7, Python 2.7.18rc1, python-is-python2, 2.7.17-4
RelatedPackageVersions:
 dpkg 1.19.7ubuntu3
 apt 2.0.2ubuntu0.1
SambaServerRegression: Yes
SmbConfIncluded: No
SourcePackage: samba
TestparmExitCode: 0
Title: package samba-common-bin 2:4.11.6+dfsg-0ubuntu1.3 failed to install/upgrade: installed samba-common-bin package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to focal on 2020-07-02 (0 days ago)

Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

theedudenator

Level 1
Level 1
Posts: 45
Joined: Fri Nov 29, 2013 11:15 pm

Problem with Samba share — error cannot find smb.conf

I tried to purge and reinstall samba, same problem.

When I try to share a folder:

Samba’s testparm returned error 1: Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
params.c:OpenConfFile() — Unable to open configuration file «/etc/samba/smb.conf»:
No such file or directory
Error loading services.

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.

Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

altair4

Level 20
Level 20
Posts: 11021
Joined: Tue Feb 03, 2009 10:27 am

Re: Problem with Samba share — error cannot find smb.conf

Post

by altair4 » Tue Dec 24, 2013 2:44 pm

Do you actually have an smb.conf file?

When you say you try to share a folder — how are you trying to share this folder? In smb.conf itself or through Nemo?

Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

altair4

Level 20
Level 20
Posts: 11021
Joined: Tue Feb 03, 2009 10:27 am

Re: Problem with Samba share — error cannot find smb.conf

Post

by altair4 » Tue Dec 24, 2013 2:57 pm

Open up your file manager and find out if you have a smb.conf file at /etc/samba.

What version of Mint and what desktop environment are you using?

Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

altair4

Level 20
Level 20
Posts: 11021
Joined: Tue Feb 03, 2009 10:27 am

Re: Problem with Samba share — error cannot find smb.conf

Post

by altair4 » Wed Dec 25, 2013 8:40 am

*** Install the following packages:

samba
samba-common
samba-common-bin
smbclient
python-smbc
nemo-share
libsmbclient
libwbclient

*** Reboot your box.

Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

Самба запущена и работает, вот конфиг и проверка на работу…

[root@server ~]# service smb status
smbd is running
[root@server ~]# testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[files]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
server string = files
security = SHARE

[files]
comment = Файлы
path = /home/sambauser/doc
valid users = bkmz
read only = No
create mask = 0777
directory mask = 0777
guest ok = Yes
[root@server ~]#


На сколько я понял, параметр security = SHARE говорит о том, что пускать должно без пароля, но при попытке входа в папку [files] высвечивается окошко с просьбой ввести логин и пароль.

При чём пользователь bkmz был добавлен в самбу при помощи smbpasswd -a bkmz но при вводе логина и заданного пароля окошко просто сбрасывается и снова просит ввести данные. Что не так ума не приложу, уже 2 дня ковыряю и экспериментирую, толку ноль.

« Последнее редактирование: 13.04.2013 09:22:41 от sb »


Записан


valid users = bkmz

Насколько помню, это только для SECURITY=USER, уберите.


Записан

Сноси Винду, переходи на Линукс ! :)


Нашёл похожую тему, скопировал оттуда конфиг и заработало, только вот не пойму, почему мой просил пароль, а этот работает

[global]
netbios name = ALTSERVER
server string = files and music
security = SHARE

[files]
comment = Наша музыка
path = /home/sambauser/doc
force user = sambauser
force group = users
read only = No
create mask = 0777
directory mask = 0777
guest ok = Yes


Записан


valid users = bkmz

Ещё раз повторяю…
Не работает эта опция с SHARE.


Записан

Сноси Винду, переходи на Линукс ! :)


Да я верю, сейчас уберу, у меня другой вопрос, почему второй вариант конфига работает, а первый нет? Из за это й опции что ли? Так во втором варианте она тоже используется…


Записан


во втором варианте она тоже используется

Где ?

[files]
   comment = Наша музыка
   path = /home/sambauser/doc
   force user = sambauser
   force group = users
   read only = No
   create mask = 0777
   directory mask = 0777
   guest ok = Yes


Записан

Сноси Винду, переходи на Линукс ! :)


Я дурак, спасибо, понял :)


Записан


Теперь такая беда

[root@server doc]# testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[files]"
Processing section "[Admin]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
netbios name = ALTSERVER
server string = files
log file = /var/log/samba/log.%m
max log size = 50

[files]
comment = мои данные
path = /home/sambauser/doc/
force user = sambauser
read only = No
guest ok = Yes

[Admin]
comment = для руководства
path = /home/sambauser/admin
valid users = admin
read only = No


в папку files  пускает без всяких проблем, как и хотел, а в папку admin  запрашивыает логин и пароль, но при вводе говорит

Не удалось присоединить местоположение
Ошибка подключения ресурса Windows

Папка админ создана и лежит где написано, права ей уже даже дал chmod 777 что я делаю не так?

« Последнее редактирование: 12.04.2013 09:26:47 от dormidont3 »


Записан


Вот что пишет при попытке доступа в логах

[2013/04/12 11:42:29.387338,  0] smbd/service.c:988(make_connection_snum)
  canonicalize_connect_path failed for service Admin, path /home/sambauser/admin


Записан



Записан

Сноси Винду, переходи на Линукс ! :)



Записан


Тогда проверяйте:

# smbclient -L //altfileserver/director -Udirectorи права на шару покажите

# ls -ld /home/sambauser/admin


Записан

Сноси Винду, переходи на Линукс ! :)


ls -ld /home/sambauser/admin
drwxrwxrwx 2 root root 4096 Апр 12 10:28 /home/sambauser/admin

А вот с проверкой какая то беда…

[root@server samba]# smbclient -L //ALTSERVER/sambauser -Uadmin
Enter admin's password:
Connection to ALTSERVER failed (Error NT_STATUS_BAD_NETWORK_NAME)


Записан


# smbclient -L //ALTSERVER/sambauser -Uadmin

# smbclient -L //ALTSERVER/Admin -Uadmin


Записан

Сноси Винду, переходи на Линукс ! :)


Как то странно…

[root@server samba]# smbclient -L //SERVER/ -Uadmin
Enter admin's password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.5.15-alt1.M60P.1]

Sharename       Type      Comment
---------       ----      -------
files           Disk      мои данные
Admin           Disk      для руководства
IPC$            IPC       IPC Service (files)


В конфиге же написано что имя ALTSERVER


Записан


Понравилась статья? Поделить с друзьями:

Читайте также:

  • Load library failed with error 87 параметр задан неверно trassir
  • Load library failed with error 87 параметр задан неверно steam
  • Load library failed with error 126 не найден указанный модуль amd radeon
  • Load library failed with error 1114 viber
  • Load library failed with error 1114 minecraft

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии