Samba ошибка error loading services

On Ubuntu 18.04 whenever I do apt upgrade (even if no packages to upgrade):

root@JohnPC:/home/john# apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up samba (2:4.7.6+dfsg~ubuntu-0ubuntu2.2) 

Samba is not being run as an AD Domain Controller.
Please ignore the following error about deb-systemd-helper not finding samba-ad-dc.service.
Job for smbd.service failed because the control process exited with error code.
See "systemctl status smbd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript smbd, action "restart" failed.
● smbd.service - Samba SMB Daemon
   Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2018-08-17 08:13:54 BST; 27ms ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 28404 ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, status=1/FAILURE)
 Main PID: 28404 (code=exited, status=1/FAILURE)

Aug 17 08:13:54 JohnPC systemd[1]: Starting Samba SMB Daemon...
Aug 17 08:13:54 JohnPC systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
Aug 17 08:13:54 JohnPC systemd[1]: smbd.service: Failed with result 'exit-code'.
Aug 17 08:13:54 JohnPC systemd[1]: Failed to start Samba SMB Daemon.
dpkg: error processing package samba (--configure):
 installed samba package post-installation script subprocess returned error exit status 1
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Errors were encountered while processing:
 samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@JohnPC:/home/john# systemctl status smbd.service
● smbd.service - Samba SMB Daemon
   Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2018-08-17 08:13:54 BST; 43s ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 28404 ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, st
 Main PID: 28404 (code=exited, status=1/FAILURE)

Aug 17 08:13:54 JohnPC systemd[1]: Starting Samba SMB Daemon...
Aug 17 08:13:54 JohnPC systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
Aug 17 08:13:54 JohnPC systemd[1]: smbd.service: Failed with result 'exit-code'.
Aug 17 08:13:54 JohnPC systemd[1]: Failed to start Samba SMB Daemon.

Scorch's user avatar

Scorch

4211 gold badge7 silver badges13 bronze badges

asked Aug 17, 2018 at 7:19

John Rose's user avatar

4

Open a terminal and run the following command:

testparm -s

Do you get the following error:

WARNING: Ignoring invalid value 'share' for parameter 'security'
Error loading services.

If you do edit /etc/samba/smb.conf, find the line «security = share», and delete it. Then rerun systemctl status smbd.service.

It could be another parameter that is the culprit but that is the most common. In all cases testparm should give you a hint to the offending parameter and end with the «Error loading services» error.

EDIT: If you have no smb.conf at /etc/samba but have one at /usr/share/samba then copy that one to the standard location:

sudo cp /usr/share/samba/smb.conf /etc/samba

Run «testparm -s» again to make sure it’s happy.

answered Aug 17, 2018 at 11:52

Morbius1's user avatar

Morbius1Morbius1

7,1161 gold badge15 silver badges22 bronze badges

9

Same problem over here. The nmbd-logfile complaint about some problems with netbios on ipv6. So I checked smb.conf and at [globals] I found that the interface was bound to ‘eth*’ but my interface name is ‘enp0s31f6’. After changing this smbd and nmbd started both fine. Also my ‘apt-get upgrade’ problem was gone :)

answered Feb 17, 2019 at 18:18

R. van Waay's user avatar

I had the same problem and changed the bound interface in smb.conf from eno0 to eno1 (my actual interface), but the problem was still there.

Then I realised there was a smb.conf.ucf-dist in the same folder /etc/samba which had a wrong interface bound eth0.

I changed it to eno1, saved and then could apt update & upgrade without having the problem any more … Look like some config or all of it is taken from this file if it exists in the folder.

Kevin Bowen's user avatar

Kevin Bowen

19.3k55 gold badges76 silver badges81 bronze badges

answered Oct 31, 2020 at 10:00

usr3010's user avatar

Hi there

I recently reinstalled Arch Linux on my main desktop and I just kept my personal files. Everything else was a «new fresh installation».
Now I just can’t start the samba service. First there was a problem with a missing directory (/usr/local/samba/var) but I created the directory and it solved the problem. However another weird problem is still persisting, even after I updated the system with a «pacman -Syu»:

Sep 12 21:30:07 phoenix systemd[1]: Starting Samba SMB Daemon...
Sep 12 21:30:07 phoenix smbd[810]: [2018/09/12 21:30:07.926941,  0] ../lib/param/loadparm.c:1610(set_variable_helper)
Sep 12 21:30:07 phoenix smbd[810]:   set_variable_helper(not): value is not boolean!
Sep 12 21:30:07 phoenix systemd[1]: smb.service: Main process exited, code=exited, status=1/FAILURE
Sep 12 21:30:07 phoenix systemd[1]: smb.service: Failed with result 'exit-code'.
Sep 12 21:30:07 phoenix systemd[1]: Failed to start Samba SMB Daemon.

The same problem appears with «testparm»:

...
set_variable_helper(not): value is not boolean!
Error loading services.

My CPU is a AMD Ryzen 7 1700X Eight-Core Processor with 16Gb of RAM.

Any ideas?

Kind regards

Last edited by cmmps (2018-09-12 22:05:14)

On Ubuntu 18.04 whenever I do apt upgrade (even if no packages to upgrade):

root@JohnPC:/home/john# apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up samba (2:4.7.6+dfsg~ubuntu-0ubuntu2.2) 

Samba is not being run as an AD Domain Controller.
Please ignore the following error about deb-systemd-helper not finding samba-ad-dc.service.
Job for smbd.service failed because the control process exited with error code.
See "systemctl status smbd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript smbd, action "restart" failed.
● smbd.service - Samba SMB Daemon
   Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2018-08-17 08:13:54 BST; 27ms ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 28404 ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, status=1/FAILURE)
 Main PID: 28404 (code=exited, status=1/FAILURE)

Aug 17 08:13:54 JohnPC systemd[1]: Starting Samba SMB Daemon...
Aug 17 08:13:54 JohnPC systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
Aug 17 08:13:54 JohnPC systemd[1]: smbd.service: Failed with result 'exit-code'.
Aug 17 08:13:54 JohnPC systemd[1]: Failed to start Samba SMB Daemon.
dpkg: error processing package samba (--configure):
 installed samba package post-installation script subprocess returned error exit status 1
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Errors were encountered while processing:
 samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@JohnPC:/home/john# systemctl status smbd.service
● smbd.service - Samba SMB Daemon
   Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2018-08-17 08:13:54 BST; 43s ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 28404 ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, st
 Main PID: 28404 (code=exited, status=1/FAILURE)

Aug 17 08:13:54 JohnPC systemd[1]: Starting Samba SMB Daemon...
Aug 17 08:13:54 JohnPC systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
Aug 17 08:13:54 JohnPC systemd[1]: smbd.service: Failed with result 'exit-code'.
Aug 17 08:13:54 JohnPC systemd[1]: Failed to start Samba SMB Daemon.

Scorch's user avatar

Scorch

4111 gold badge6 silver badges13 bronze badges

asked Aug 17, 2018 at 7:19

John Rose's user avatar

4

Open a terminal and run the following command:

testparm -s

Do you get the following error:

WARNING: Ignoring invalid value 'share' for parameter 'security'
Error loading services.

If you do edit /etc/samba/smb.conf, find the line «security = share», and delete it. Then rerun systemctl status smbd.service.

It could be another parameter that is the culprit but that is the most common. In all cases testparm should give you a hint to the offending parameter and end with the «Error loading services» error.

EDIT: If you have no smb.conf at /etc/samba but have one at /usr/share/samba then copy that one to the standard location:

sudo cp /usr/share/samba/smb.conf /etc/samba

Run «testparm -s» again to make sure it’s happy.

answered Aug 17, 2018 at 11:52

Morbius1's user avatar

Morbius1Morbius1

6,5611 gold badge11 silver badges20 bronze badges

9

Same problem over here. The nmbd-logfile complaint about some problems with netbios on ipv6. So I checked smb.conf and at [globals] I found that the interface was bound to ‘eth*’ but my interface name is ‘enp0s31f6’. After changing this smbd and nmbd started both fine. Also my ‘apt-get upgrade’ problem was gone :)

answered Feb 17, 2019 at 18:18

R. van Waay's user avatar

I had the same problem and changed the bound interface in smb.conf from eno0 to eno1 (my actual interface), but the problem was still there.

Then I realised there was a smb.conf.ucf-dist in the same folder /etc/samba which had a wrong interface bound eth0.

I changed it to eno1, saved and then could apt update & upgrade without having the problem any more … Look like some config or all of it is taken from this file if it exists in the folder.

Kevin Bowen's user avatar

Kevin Bowen

19.1k55 gold badges75 silver badges81 bronze badges

answered Oct 31, 2020 at 10:00

usr3010's user avatar

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)

  • Home
  • Forum
  • The Ubuntu Forum Community
  • Ubuntu Specialised Support
  • Ubuntu Servers, Cloud and Juju
  • Server Platforms
  • [SOLVED] after 18.04 upgrade smbd won’t start

  1. after 18.04 upgrade smbd won’t start

    Getting this error when trying to start smbd:

    Jul 28 09:14:16 King-Arthur systemd[1]: Starting Samba NMB Daemon…
    Jul 28 09:14:16 King-Arthur systemd[1]: nmbd.service: Main process exited, code=exited, status=1/FAILURE
    Jul 28 09:14:16 King-Arthur systemd[1]: nmbd.service: Failed with result ‘exit-code’.
    Jul 28 09:14:16 King-Arthur systemd[1]: Failed to start Samba NMB Daemon.
    Jul 28 09:14:16 King-Arthur systemd[1]: Starting Samba NMB Daemon…
    Jul 28 09:14:17 King-Arthur systemd[1]: nmbd.service: Main process exited, code=exited, status=1/FAILURE
    Jul 28 09:14:17 King-Arthur systemd[1]: nmbd.service: Failed with result ‘exit-code’.
    Jul 28 09:14:17 King-Arthur systemd[1]: Failed to start Samba NMB Daemon.
    Jul 28 09:14:28 King-Arthur systemd[1]: Starting Samba SMB Daemon…
    Jul 28 09:14:28 King-Arthur systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
    Jul 28 09:14:28 King-Arthur systemd[1]: smbd.service: Failed with result ‘exit-code’.
    Jul 28 09:14:28 King-Arthur systemd[1]: Failed to start Samba SMB Daemon.
    Jul 28 09:14:29 King-Arthur systemd[1]: Starting Samba SMB Daemon…
    Jul 28 09:14:29 King-Arthur systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
    Jul 28 09:14:29 King-Arthur systemd[1]: smbd.service: Failed with result ‘exit-code’.
    Jul 28 09:14:29 King-Arthur systemd[1]: Failed to start Samba SMB Daemon.

    My googling hasn’t got me anywhere….
    The message is pretty generic where can I get some better info about what the issue is?

    Thanks in advance,
    Peter


  2. Re: after 18.04 upgrade smbd won’t start

    How about ‘sudo systemctl status smbd’? Does that give you more info?
    Or the samba logs?


  3. Re: after 18.04 upgrade smbd won’t start

    I don’t think that is any more helpful:

    ● smbd.service — Samba SMB Daemon
    Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sat 2018-07-28 09:14:29 EDT; 2h 34min ago
    Docs: man:smbd(8)
    man:samba(7)
    man:smb.conf(5)
    Process: 2195 ExecStart=/usr/sbin/smbd —foreground —no-process-group $SMBDOPTIONS (code=exited, status=1/FAILURE)
    Main PID: 2195 (code=exited, status=1/FAILURE)

    Jul 28 09:14:29 King-Arthur.xxx.name systemd[1]: Starting Samba SMB Daemon…
    Jul 28 09:14:29 King-Arthur.xxx.name systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
    Jul 28 09:14:29 King-Arthur.xxx.name systemd[1]: smbd.service: Failed with result ‘exit-code’.
    Jul 28 09:14:29 King-Arthur.xxx.name systemd[1]: Failed to start Samba SMB Daemon.


  4. Re: after 18.04 upgrade smbd won’t start

    It is fairly easy to reproduce that output from sudo systemctl status smbd however.

    Run this command:

    Do you get this as the output:

    Code:

    WARNING: Ignoring invalid value 'share' for parameter 'security'
    Error loading services.

    If you do, edit /etc/samba/smb.conf, find the line security = share, and either delete it or change it to security = user.Save the file then restart smbd.


  5. Re: after 18.04 upgrade smbd won’t start

    This has worked for me, this was on upgrade to 17.10:

    Code:

    sudo systemctl disable nmbd
    sudo systemctl disable smbd
    sudo systemctl unmask samba-ad-dc
    sudo systemctl enable samba-ad-dc

    Also check your permissions on:

    Code:

    cd /var/lib/samba/private && ls -la

    I had noticed that somehow they changed on mine from 755 to 700.and should be @ 755
    EDIT Never mind Morbius1 has the right solution.

    Last edited by 1fallen; July 28th, 2018 at 05:17 PM.

    With realization of one’s own potential and self-confidence in one’s ability, one can build a better world.
    Dalai Lama>>
    Code Tags Arch Linux, openSuse Tumbleweed


  6. Re: after 18.04 upgrade smbd won’t start

    Load smb config files from /etc/samba/smb.conf
    rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
    Unknown parameter encountered: «announce version»
    Ignoring unknown parameter «announce version»
    WARNING: The «null passwords» option is deprecated
    handle_name_resolve_order: WARNING: Ignoring invalid list value ‘hosts’ for parameter ‘name resolve order’
    Error loading services.

    So hosts got changed to host?

    Also is there any issues connecting from an XP machine to the new version of Samba?


  7. Re: after 18.04 upgrade smbd won’t start

    Um …. there’s 2 ways we can go from here:

    [1] Post the entire contents of /etc/samba/smb.conf and we can go line by line and update / correct it.

    [2] Reset yourself to the new default:

    Make a copy of the one you have:

    Code:

    sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.orig

    Copy the default that is present on you system for times like this:

    Code:

    sudo cp -a /usr/share/samba/smb.conf /etc/samba/

    Before making changes to it for things like name resolve order, etc run this command again and make sure it’s clean:


  8. Re: after 18.04 upgrade smbd won’t start

    Well lets start with my file:

    Thanks again.

    And it is working from Win7 and not from my XP machine….yeah I know i need to upgrade it.

    [global]
    ; General server settings
    netbios name = king-arthur
    server string =
    workgroup = xxx
    ;announce version = 5.0
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192

    passdb backend = tdbsam
    security = user
    ;null passwords = true
    username map = /etc/samba/smbusers
    name resolve order = host wins bcast

    wins support = yes

    printing = CUPS
    printcap name = CUPS

    syslog = 1
    syslog only = yes
    follow symlinks = yes
    wide links = yes
    unix extensions = no

    ; NOTE: If you need access to the user home directories uncomment the
    ; lines below and adjust the settings to your hearts content.
    ;[homes]
    ;valid users = %S
    ;create mode = 0600
    ;directory mode = 0755
    ;browseable = no
    ;read only = no
    ;veto files = /*.{*}/.*/mail/bin/

    ; NOTE: Only needed if you run samba as a primary domain controller.
    ; Not needed as this config doesn’t cover that matter.
    ;[netlogon]
    ;path = /var/lib/samba/netlogon
    ;admin users = Administrator
    ;valid users = %U
    ;read only = no

    ; NOTE: Again — only needed if you’re running a primary domain controller.
    ;[Profiles]
    ;path = /var/lib/samba/profiles
    ;valid users = %U
    ;create mode = 0600
    ;directory mode = 0700
    ;writeable = yes
    ;browseable = no

    ; NOTE: Inside this place you may build a printer driver repository for
    ; Windows — I’ll cover this topic in another HOWTO.

    [ftp]
    path = /var/ftp/
    browseable = yes
    read only = no
    guest ok = no
    create mask = 0644
    directory mask = 0755
    force user = ftpuser
    force group = ftpuser


  9. Re: after 18.04 upgrade smbd won’t start

    Samba doesn’t recommend you do the «socket options» thing any longer. Keep it in for now and if there are any issues remove it.

    Looks like you fixed the name resolve order problem.

    The WinXP client is a problem. I realize that even today there are more WinXP users than Desktop Linux users but Samba has moved on. I’m going to guess that if you add the following to the [global] section it will bring your server to the security level it was back then:

    Code:

    lanman auth = yes
    ntlm auth = yes

    Restart smbd and pray.


  10. Re: after 18.04 upgrade smbd won’t start

    Quote Originally Posted by Morbius1
    View Post

    Samba doesn’t recommend you do the «socket options» thing any longer. Keep it in for now and if there are any issues remove it.

    Looks like you fixed the name resolve order problem.

    The WinXP client is a problem. I realize that even today there are more WinXP users than Desktop Linux users but Samba has moved on. I’m going to guess that if you add the following to the [global] section it will bring your server to the security level it was back then:

    Code:

    lanman auth = yes
    ntlm auth = yes

    Restart smbd and pray.

    +1
    to make Windows XP able to connect to my Samba server I had to add:

    Code:

    server max protocol = NT1
    lanman auth = yes
    ntlm auth = yes

    and without these lines Android 7 wasn’t able to access the share neither.

    With realization of one’s own potential and self-confidence in one’s ability, one can build a better world.
    Dalai Lama>>
    Code Tags Arch Linux, openSuse Tumbleweed


Bookmarks

Bookmarks


Posting Permissions

Crispin

Posts: 8
Joined: Thu Oct 18, 2012 11:59 pm

RPi 4 — Samba installed but service won’t start

Hi folks,

I have a RPi4 — 4GB

I can’t get samba working on it which is normally very easy.

Here are some details

  • It’s Buster lite
  • It’s a fresh, updated install
  • All I have installed in OpenJDK 8
  • I’ve gone through the install — always followed this guy’s blog
  • install is simply sudo apt-get install samba samba-common-bin
  • All the above is done logged in as root.

I get the following in while installing

Code: Select all

Setting up libcephfs2:armhf (12.2.11+dfsg1-2.1+rpi1) ...
Setting up libgfapi0:armhf (5.5-3) ...
Setting up samba-common-bin (2:4.9.5+dfsg-5) ...
Checking smb.conf with testparm
Load smb config files from /etc/samba/smb.conf
Error loading services.
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.9.5+dfsg-5); however:
  Package samba-common-bin is not configured yet.

dpkg: error processing package samba (--configure):
 dependency problems - leaving unconfigured
Processing triggers for systemd (241-5+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
Errors were encountered while processing:
 samba-common-bin
 samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@raspberrypi:~#

After that, I’m stuck :(

Any help appreciated.


fruitoftheloom

Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: RPi 4 — Samba installed but service won’t start

Sat Jun 29, 2019 5:25 am

Crispin wrote: ↑

Sat Jun 29, 2019 5:16 am

Hi folks,

I have a RPi4 — 4GB

I can’t get samba working on it which is normally very easy.

Here are some details

  • It’s Buster lite
  • It’s a fresh, updated install
  • All I have installed in OpenJDK 8
  • I’ve gone through the install — always followed this guy’s blog
  • install is simply sudo apt-get install samba samba-common-bin
  • All the above is done logged in as root.

I get the following in while installing

Code: Select all

Setting up libcephfs2:armhf (12.2.11+dfsg1-2.1+rpi1) ...
Setting up libgfapi0:armhf (5.5-3) ...
Setting up samba-common-bin (2:4.9.5+dfsg-5) ...
Checking smb.conf with testparm
Load smb config files from /etc/samba/smb.conf
Error loading services.
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.9.5+dfsg-5); however:
  Package samba-common-bin is not configured yet.

dpkg: error processing package samba (--configure):
 dependency problems - leaving unconfigured
Processing triggers for systemd (241-5+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
Errors were encountered while processing:
 samba-common-bin
 samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@raspberrypi:~#

After that, I’m stuck :(

Any help appreciated.

OpenJDK8 is not in the Buster repositories, it is OpenJDK11

Code: Select all

sudo apt update
sudo apt full-upgrade
sudo reboot

Code: Select all

sudo apt update
sudo apt install samba-common-bin

Last edited by fruitoftheloom on Sat Jun 29, 2019 5:29 am, edited 3 times in total.

Take what I advise as advice not the utopian holy grail, and it is gratis !!


Crispin

Posts: 8
Joined: Thu Oct 18, 2012 11:59 pm

Re: RPi 4 — Samba installed but service won’t start

Sat Jun 29, 2019 5:28 am

I’ve done a purge and and reinstall — below is a new error as part of the reinstall

Code: Select all

Do you want to continue? [Y/n] y Extracting templates from packages: 100% Preconfiguring packages ... Selecting previously unselected package python-dnspython. (Reading database ... 48119 files and directories currently installed.) Preparing to unpack .../00-python-dnspython_1.16.0-1_all.deb ... Unpacking python-dnspython (1.16.0-1) ... Selecting previously unselected package python-crypto. Preparing to unpack .../01-python-crypto_2.6.1-9+b1_armhf.deb ... Unpacking python-crypto (2.6.1-9+b1) ... Selecting previously unselected package libtdb1:armhf. Preparing to unpack .../02-libtdb1_1.3.16-2+b1_armhf.deb ... Unpacking libtdb1:armhf (1.3.16-2+b1) ... Selecting previously unselected package libtevent0:armhf. Preparing to unpack .../03-libtevent0_0.9.37-1_armhf.deb ... Unpacking libtevent0:armhf (0.9.37-1) ... Selecting previously unselected package libldb1:armhf. Preparing to unpack .../04-libldb1_2%3a1.5.1+really1.4.6-3_armhf.deb ... Unpacking libldb1:armhf (2:1.5.1+really1.4.6-3) ... Selecting previously unselected package libpython2.7:armhf. Preparing to unpack .../05-libpython2.7_2.7.16-2_armhf.deb ... Unpacking libpython2.7:armhf (2.7.16-2) ... Selecting previously unselected package python-ldb. Preparing to unpack .../06-python-ldb_2%3a1.5.1+really1.4.6-3_armhf.deb ... Unpacking python-ldb (2:1.5.1+really1.4.6-3) ... Selecting previously unselected package python-tdb. Preparing to unpack .../07-python-tdb_1.3.16-2+b1_armhf.deb ... Unpacking python-tdb (1.3.16-2+b1) ... Selecting previously unselected package libjansson4:armhf. Preparing to unpack .../08-libjansson4_2.12-1_armhf.deb ... Unpacking libjansson4:armhf (2.12-1) ... Selecting previously unselected package python-talloc:armhf. Preparing to unpack .../09-python-talloc_2.1.14-2_armhf.deb ... Unpacking python-talloc:armhf (2.1.14-2) ... Selecting previously unselected package samba-libs:armhf. Preparing to unpack .../10-samba-libs_2%3a4.9.5+dfsg-5_armhf.deb ... Unpacking samba-libs:armhf (2:4.9.5+dfsg-5) ... Selecting previously unselected package python-samba. Preparing to unpack .../11-python-samba_2%3a4.9.5+dfsg-5_armhf.deb ... Unpacking python-samba (2:4.9.5+dfsg-5) ... Selecting previously unselected package samba-common. Preparing to unpack .../12-samba-common_2%3a4.9.5+dfsg-5_all.deb ... Unpacking samba-common (2:4.9.5+dfsg-5) ... Selecting previously unselected package samba-common-bin. Preparing to unpack .../13-samba-common-bin_2%3a4.9.5+dfsg-5_armhf.deb ... Unpacking samba-common-bin (2:4.9.5+dfsg-5) ... Selecting previously unselected package tdb-tools. Preparing to unpack .../14-tdb-tools_1.3.16-2+b1_armhf.deb ... Unpacking tdb-tools (1.3.16-2+b1) ... Selecting previously unselected package samba. Preparing to unpack .../15-samba_2%3a4.9.5+dfsg-5_armhf.deb ... Unpacking samba (2:4.9.5+dfsg-5) ... Selecting previously unselected package attr. Preparing to unpack .../16-attr_1%3a2.4.48-4_armhf.deb ... Unpacking attr (1:2.4.48-4) ... Selecting previously unselected package libibverbs1:armhf. Preparing to unpack .../17-libibverbs1_22.1-1_armhf.deb ... Unpacking libibverbs1:armhf (22.1-1) ... Selecting previously unselected package ibverbs-providers:armhf. Preparing to unpack .../18-ibverbs-providers_22.1-1_armhf.deb ... Unpacking ibverbs-providers:armhf (22.1-1) ... Selecting previously unselected package libboost-atomic1.67.0:armhf. Preparing to unpack .../19-libboost-atomic1.67.0_1.67.0-13_armhf.deb ... Unpacking libboost-atomic1.67.0:armhf (1.67.0-13) ... Selecting previously unselected package libboost-iostreams1.67.0:armhf. Preparing to unpack .../20-libboost-iostreams1.67.0_1.67.0-13_armhf.deb ... Unpacking libboost-iostreams1.67.0:armhf (1.67.0-13) ... Selecting previously unselected package libboost-regex1.67.0:armhf. Preparing to unpack .../21-libboost-regex1.67.0_1.67.0-13_armhf.deb ... Unpacking libboost-regex1.67.0:armhf (1.67.0-13) ... Selecting previously unselected package libboost-system1.67.0:armhf. Preparing to unpack .../22-libboost-system1.67.0_1.67.0-13_armhf.deb ... Unpacking libboost-system1.67.0:armhf (1.67.0-13) ... Selecting previously unselected package libboost-thread1.67.0:armhf. Preparing to unpack .../23-libboost-thread1.67.0_1.67.0-13_armhf.deb ... Unpacking libboost-thread1.67.0:armhf (1.67.0-13) ... Selecting previously unselected package librados2:armhf. Preparing to unpack .../24-librados2_12.2.11+dfsg1-2.1+rpi1_armhf.deb ... Unpacking librados2:armhf (12.2.11+dfsg1-2.1+rpi1) ... Selecting previously unselected package libcephfs2:armhf. Preparing to unpack .../25-libcephfs2_12.2.11+dfsg1-2.1+rpi1_armhf.deb ... Unpacking libcephfs2:armhf (12.2.11+dfsg1-2.1+rpi1) ... Selecting previously unselected package libglusterfs0:armhf. Preparing to unpack .../26-libglusterfs0_5.5-3_armhf.deb ... Unpacking libglusterfs0:armhf (5.5-3) ... Selecting previously unselected package libgfxdr0:armhf. Preparing to unpack .../27-libgfxdr0_5.5-3_armhf.deb ... Unpacking libgfxdr0:armhf (5.5-3) ... Selecting previously unselected package libgfrpc0:armhf. Preparing to unpack .../28-libgfrpc0_5.5-3_armhf.deb ... Unpacking libgfrpc0:armhf (5.5-3) ... Selecting previously unselected package libgfapi0:armhf. Preparing to unpack .../29-libgfapi0_5.5-3_armhf.deb ... Unpacking libgfapi0:armhf (5.5-3) ... Selecting previously unselected package libgpgme11:armhf. Preparing to unpack .../30-libgpgme11_1.12.0-6_armhf.deb ... Unpacking libgpgme11:armhf (1.12.0-6) ... Selecting previously unselected package python-gpg. Preparing to unpack .../31-python-gpg_1.12.0-6_armhf.deb ... Unpacking python-gpg (1.12.0-6) ... Selecting previously unselected package samba-dsdb-modules:armhf. Preparing to unpack .../32-samba-dsdb-modules_2%3a4.9.5+dfsg-5_armhf.deb ... Unpacking samba-dsdb-modules:armhf (2:4.9.5+dfsg-5) ... Selecting previously unselected package samba-vfs-modules:armhf. Preparing to unpack .../33-samba-vfs-modules_2%3a4.9.5+dfsg-5_armhf.deb ... Unpacking samba-vfs-modules:armhf (2:4.9.5+dfsg-5) ... Setting up python-crypto (2.6.1-9+b1) ... Setting up libibverbs1:armhf (22.1-1) ... Setting up libpython2.7:armhf (2.7.16-2) ... Setting up libboost-regex1.67.0:armhf (1.67.0-13) ... Setting up ibverbs-providers:armhf (22.1-1) ... Setting up attr (1:2.4.48-4) ... Setting up libtdb1:armhf (1.3.16-2+b1) ... Setting up samba-common (2:4.9.5+dfsg-5) ... Creating config file /etc/samba/smb.conf with new version Setting up libgpgme11:armhf (1.12.0-6) ... Setting up libjansson4:armhf (2.12-1) ... Setting up libglusterfs0:armhf (5.5-3) ... Setting up libtevent0:armhf (0.9.37-1) ... Setting up tdb-tools (1.3.16-2+b1) ... update-alternatives: using /usr/bin/tdbbackup.tdbtools to provide /usr/bin/tdbbackup (tdbbackup) in auto mode Setting up libboost-iostreams1.67.0:armhf (1.67.0-13) ... Setting up python-tdb (1.3.16-2+b1) ... Setting up libboost-atomic1.67.0:armhf (1.67.0-13) ... Setting up python-dnspython (1.16.0-1) ... Setting up libboost-system1.67.0:armhf (1.67.0-13) ... Setting up python-gpg (1.12.0-6) ... Setting up python-talloc:armhf (2.1.14-2) ... Setting up libgfxdr0:armhf (5.5-3) ... Setting up libldb1:armhf (2:1.5.1+really1.4.6-3) ... Setting up libboost-thread1.67.0:armhf (1.67.0-13) ... Setting up samba-libs:armhf (2:4.9.5+dfsg-5) ... Setting up python-ldb (2:1.5.1+really1.4.6-3) ... Setting up samba-dsdb-modules:armhf (2:4.9.5+dfsg-5) ... Setting up libgfrpc0:armhf (5.5-3) ... Setting up librados2:armhf (12.2.11+dfsg1-2.1+rpi1) ... Setting up python-samba (2:4.9.5+dfsg-5) ... Setting up samba-vfs-modules:armhf (2:4.9.5+dfsg-5) ... Setting up libcephfs2:armhf (12.2.11+dfsg1-2.1+rpi1) ... Setting up libgfapi0:armhf (5.5-3) ... Setting up samba-common-bin (2:4.9.5+dfsg-5) ... Checking smb.conf with testparm Load smb config files from /etc/samba/smb.conf Loaded services file OK. Server role: ROLE_STANDALONE Done Setting up samba (2:4.9.5+dfsg-5) ... 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 masked) Created symlink /etc/systemd/system/multi-user.target.wants/nmbd.service → /lib/systemd/system/nmbd.service. 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 Created symlink /etc/systemd/system/multi-user.target.wants/smbd.service → /lib/systemd/system/smbd.service. Processing triggers for systemd (241-5+rpi1) ... Processing triggers for man-db (2.8.5-2) ... Processing triggers for libc-bin (2.28-10+rpi1) ... root@raspberrypi:~# 

Also no service installed

Code: Select all

root@raspberrypi:~# service --status-all
[ - ]  alsa-utils
[ + ]  avahi-daemon
[ + ]  bluetooth
[ - ]  console-setup.sh
[ + ]  cron
[ + ]  dbus
[ + ]  dhcpcd
[ + ]  dphys-swapfile
[ + ]  fake-hwclock
[ - ]  hwclock.sh
[ - ]  keyboard-setup.sh
[ + ]  kmod
[ + ]  networking
[ - ]  nfs-common
[ + ]  nmbd
[ + ]  openhab2
[ - ]  paxctld
[ + ]  procps
[ + ]  raspi-config
[ ? ]  rng-tools
[ - ]  rpcbind
[ - ]  rsync
[ + ]  rsyslog
[ - ]  samba-ad-dc
[ + ]  smbd
[ + ]  ssh
[ - ]  sudo
[ + ]  triggerhappy
[ + ]  udev
[ - ]  x11-common
root@raspberrypi:~#

Crispin

Posts: 8
Joined: Thu Oct 18, 2012 11:59 pm

Re: RPi 4 — Samba installed but service won’t start

Sat Jun 29, 2019 5:34 am

fruitoftheloom wrote: ↑

Sat Jun 29, 2019 5:25 am

OpenJDK8 is not in the Buster repositories, it is OpenJDK11

Code: Select all

sudo apt update
sudo apt full-upgrade
sudo reboot

Code: Select all

sudo apt update
sudo apt install samba-common-bin

Hi,

It’s installed though —

Code: Select all

root@raspberrypi:~# update-alternatives --config java There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-8-openjdk-armhf/jre/bin/java Nothing to configure. 

Code: Select all

root@raspberrypi:~# java -version openjdk version "1.8.0_212" OpenJDK Runtime Environment (build 1.8.0_212-8u212-b01-1+rpi1-b01) OpenJDK Client VM (build 25.212-b01, mixed mode) 

samba common is installed (auto-installed after purge)

Code: Select all

root@raspberrypi:~# apt install samba-common-bin Reading package lists... Done Building dependency tree Reading state information... Done samba-common-bin is already the newest version (2:4.9.5+dfsg-5). samba-common-bin set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@raspberrypi:~# 

fruitoftheloom

Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: RPi 4 — Samba installed but service won’t start

Sat Jun 29, 2019 5:59 am

i am running a fresh install of Buster fully updated

Code: Select all

java -version openjdk version "11.0.3" 2019-04-16 OpenJDK Runtime Environment (build 11.0.3+7-post-Raspbian-5) OpenJDK Server VM (build 11.0.3+7-post-Raspbian-5, mixed mode) 

Samba 2:4.9.5+dfsg-5 plus dependencies………

Last edited by fruitoftheloom on Sat Jun 29, 2019 6:08 am, edited 1 time in total.

Take what I advise as advice not the utopian holy grail, and it is gratis !!




hortimech

Posts: 714
Joined: Wed Apr 08, 2015 5:52 pm

Re: RPi 4 — Samba installed but service won’t start

Sat Jun 29, 2019 7:28 am

You do have Samba installed, you are just mistaking the package name for the service names :)

Code: Select all

root@raspberrypi:~# service --status-all ......... [ + ] nmbd ......... [ + ] smbd ......... 

Are they actually running ?
Try restarting ‘smbd’ & ‘nmbd’

As for the ‘blog’ you followed, you might just as well not create a Samba user and use this share:

Code: Select all

[share] Comment = Pi shared folder Path = /share read only = no create mask = 0777 directory mask = 0777 Guest ok = yes 

It will work just like the one in the blog, but with less lines.
You should also check that ‘map to guest = bad user’ is set in [global]

If ‘smbd’ & ‘nmbd’ are running, you should be able to connect to the share, but you will probably have to navigate to it, seeing as SMBv1 is now turned off.


Crispin

Posts: 8
Joined: Thu Oct 18, 2012 11:59 pm

Re: RPi 4 — Samba installed but service won’t start

Sat Jun 29, 2019 9:24 pm

well, yes and no.

So, it turns out it was working the whole time. I did not bother checking through windows if it is actually sharing them. When I did I face-palmed. :D

On my RPi3B+ I see the following

Code: Select all

[ + ] raspi-config [ - ] rpcbind [ - ] rsync [ + ] rsyslog [ + ] samba [ - ] samba-ad-dc [ - ] screen-cleanup [ + ] smbd [ + ] ssh [ - ] sudo [ + ] triggerhappy [ + ] udev [ - ] ups-monitor 

As you can see there is a service called samba and smdb. On the RPi4 there is only smbd.

I’m sure I am not the only one who is using the previously mentioned tutorial so hopefully this thread will help others. :)

Glad I am not going mad :) :)

Thanks for your help!


Return to “Troubleshooting”

 Всем привет. Пытаюсь настроить сервер на основе Debian, и столкнулся с проблемой при настройке <Samba> выходит ошибка, < E: Sub-process /usr/bin/dpkg returned an error code (1)> вижу что неудолетворенные зависимости

ergei@debian:~$ sudo apt-get install -f

Мы полагаем, что ваш системный администратор изложил вам основы
безопасности. Как правило, всё сводится к трём следующим правилам:

    №1) Уважайте частную жизнь других.
    №2) Думайте, прежде что-то вводить.
    №3) С большой властью приходит большая ответственность.

[sudo] пароль для cergei:
sudo: /var/lib/sudo/lectured is group writable
Чтение списков пакетов... Готово
Построение дерева зависимостей       
Чтение информации о состоянии... Готово
Обновлено 0 пакетов, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 469 пакетов не обновлено.
Установлено или удалено не до конца 2 пакетов.
После данной операции объём занятого дискового пространства возрастёт на 0 B.
Настраивается пакет samba-common-bin (2:4.11.5+dfsg-1+b1) ...
Checking smb.conf with testparm
Load smb config files from /etc/samba/smb.conf
Error loading services.
dpkg: ошибка при обработке пакета samba-common-bin (--configure):
installed samba-common-bin package post-installation script subprocess returned error exit status 1
dpkg: зависимости пакетов не позволяют настроить пакет samba:
samba зависит от samba-common-bin (= 2:4.11.5+dfsg-1+b1), однако:
  Пакет samba-common-bin пока не настроен.

dpkg: ошибка при обработке пакета samba (--csudo apt-get update --fix-missing
sudo apt-get install -fonfigure):
проблемы зависимостей — оставляем не настроенным
При обработке следующих пакетов произошли ошибки:
samba-common-bin
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)


и пытался все это исправить осноываясь на советах из интернета, полностью удалял весь пакет <samba> используя команды:

sudo apt-get update --fix-missing
sudo apt-get install -f
не помогло. Затем второй подход

sudo dpkg --configure -a
sudo apt-get clean
sudo apt-get update
Опять мимо, ну и затем

sudo apt-get remove  sudo dpkg --remove --force-remove-reinstreq samba
sudo apt-get clean
sudo apt-get update

и заново устаналиаю пакет <samba> а потом все рано при обновлении пакетов выходит что ,<samba> и <samba-common-bin> с ошибкой как видно в выводе терминала.Чувствую что где то накосячил а вот где и как исправить не вникну. Вот ниже предсталяю данные системы на которой это все и разворачивается :

an:~$ uname -a
Linux debian 5.2.9-kirkwood-tld-1 #1 PREEMPT Sat Aug 17 15:00:56 PDT 2019 armv5tel GNU/Linux
cergei@debian:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux bullseye/sid
Release: stable-updates
Codename: sid
cergei@debian:~$ cat /etc/apt/sources.list
deb http://deb.debian.org/debian buster main
deb-src http://deb.debian.org/debian buster main

deb http://deb.debian.org/debian-security/ buster/updates main
deb-src http://deb.debian.org/debian-security/ buster/updates main

deb http://deb.debian.org/debian buster-updates main
deb-src http://deb.debian.org/debian buster-updates main
deb http://ftp.ru.debian.org/debian sid main
cergei@debian:~$ ls /etc/apt/sources.list.d
ls: невозможно получить доступ к '/etc/apt/sources.list.d': Нет такого файла или каталога

Любые советы будут приняты с благодарностью.

Привёл пост в более удобночитаемый вид. Ogost

  • Печать

Страницы: [1]   Вниз

Тема: Samba error  (Прочитано 1843 раз)

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

Оффлайн
lcdboost

Всем здравствуйте. Помогите с самбой

● smbd.service - Samba SMB Daemon
     Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2020-11-18 11:57:59 MSK; 1min 14s ago
       Docs: man:smbd(8)
             man:samba(7)
             man:smb.conf(5)
    Process: 6367 ExecStartPre=/usr/share/samba/update-apparmor-samba-profile (code=exited, status=0/SUCCESS)
   Main PID: 6389 (smbd)
     Status: "smbd: ready to serve connections..."
      Tasks: 4 (limit: 1978)
     Memory: 19.2M
     CGroup: /system.slice/smbd.service
             ├─6389 /usr/sbin/smbd --foreground --no-process-group
             ├─6391 /usr/sbin/smbd --foreground --no-process-group
             ├─6392 /usr/sbin/smbd --foreground --no-process-group
             └─6393 /usr/sbin/smbd --foreground --no-process-group

ноя 18 11:57:58 father-A780LM-M2 systemd[1]: Stopped Samba SMB Daemon.
ноя 18 11:57:58 father-A780LM-M2 systemd[1]: Starting Samba SMB Daemon...
ноя 18 11:57:59 father-A780LM-M2 systemd[1]: Started Samba SMB Daemon.
ноя 18 11:57:59 father-A780LM-M2 smbd[6389]: [2020/11/18 11:57:59.742309,  0] ../../lib/util/become_daemon.c:135(daemon_ready)
ноя 18 11:57:59 father-A780LM-M2 smbd[6389]:   daemon_ready: daemon 'smbd' finished starting up and ready to serve connections

как будто бы в активе но ресурсов не дает.
конфиг самбы

[global]
workgroup = WORKGROUP
server string = Server Samba's
log file = /var/log/samba/samba.%m
max log size = 500
map to guest = Bad Password
prefered master = yes
local master = yes
os level = 65
[storage]
path = /storage
comment = Obmen
writable = yes
public = yes
create mask = 0777
directory mask = 0777
при первичной установке работало всё. правда недолго:) os ubuntu-mate 20.04


Оффлайн
AlexDem

как будто бы в активе но ресурсов не дает

Потрудись описать проблему более корректно и полно. Что ты имел ввиду?


Оффлайн
lcdboost

AlexDem, нет расшаренных каталогов


Оффлайн
tagilchanin

testparm выполни и посмотри что скажет

Выбери профессию, которую ты любишь, — и тебе не придется работать ни дня в твоей жизни. (Конфуций)


Оффлайн
lcdboost

testparm

Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
WARNING: The 'netbios name' is too long (max. 15 chars).

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
log file = /var/log/samba/samba.%m
map to guest = Bad Password
max log size = 500
os level = 65
preferred master = Yes
server string = Server Samba's
idmap config * : backend = tdb

[storage]
comment = Obmen
create mask = 0777
directory mask = 0777
guest ok = Yes
path = /storage
read only = No
father@father-A780LM-M2:~$ testparm >testparm.txt
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
WARNING: The 'netbios name' is too long (max. 15 chars).

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions


Оффлайн
AlexDem

нет расшаренных каталогов

smbstatusвыводит список расшаренных каталогов на сервере.
Должно быть как то так:

~# smbstatus

Samba version 4.3.11-Ubuntu
PID     Username      Group         Machine            Protocol Version
------------------------------------------------------------------------------
598       alex       alex       10.100.0.22  (ipv4:10.100.0.22:49720) Unknown (0x0311)

Service      pid     machine       Connected at
-------------------------------------------------------
Allusers     598   10.100.0.22   Wed Nov 18 12:58:05 2020
Restricted   598   10.100.0.22   Wed Nov 18 12:58:05 2020

Locked files:
Pid          Uid        DenyMode   Access      R/W        Oplock           SharePath   Name   Time
--------------------------------------------------------------------------------------------------
598          65534      DENY_ALL   0x100080    RDONLY     NONE             /samba/allusers   .   Wed Nov 18 13:38:31 2020
598          1003       DENY_ALL   0x100080    RDONLY     NONE             /samba/restricted   .   Wed Nov 18 13:38:31 2020

У тебя что говорит? Доступ к каталогам как настроен, по логину/паролю?

« Последнее редактирование: 18 Ноября 2020, 19:23:09 от AlexDem »


Оффлайн
lcdboost

AlexDem,

Samba version 4.11.6-Ubuntu
PID     Username     Group        Machine                                   Protocol Version  Encryption           Signing             
----------------------------------------------------------------------------------------------------------------------------------------

Service      pid     Machine       Connected at                     Encryption   Signing     
---------------------------------------------------------------------------------------------

No locked files

доступ к каталогу без пароля но права выдаю полные

сhmod 777 /storage
по конфигу smb.conf

...
map to guest = Bad Password
...
Выявил такую фигню, рестарт самбы помогает ненадолго.


Оффлайн
AlexDem

Попробуй добавить в секцию Storage
browsable = yes

А диски не видны только на одном девайсе, или на всех?
Кстати, у тебя еще ошибка появляется: WARNING: The ‘netbios name’ is too long (max. 15 chars).
Не уверен что с этим связана проблема, но погугли как решить.

« Последнее редактирование: 18 Ноября 2020, 20:58:41 от AlexDem »


Оффлайн
lcdboost

AlexDem,
а разве он по умолчанию не включен?
добавил в конфиг browsable = yes, перезапустил сейчас смотрю надолго ли его хватит.
по ошибке в global добавил netbios name = UBUNTU ошибка ушла.


Оффлайн
AlexDem

перезапустил сейчас смотрю надолго ли его хватит

После перезагрузки смонтируй расшаренную папку клиентом и выполни на сервере команду

smbstatusЕсли она не выводит список расшаренных папок, то это что-то странное, должны быть (см. мой вывод, там 2 папки видны).


Пользователь добавил сообщение 18 Ноября 2020, 22:53:28:


а разве он по умолчанию не включен?

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

« Последнее редактирование: 18 Ноября 2020, 22:56:30 от AlexDem »


Оффлайн
lcdboost

AlexDem,
smbstatus

sudo smbstatus

Samba version 4.11.6-Ubuntu
PID     Username     Group        Machine                                   Protocol Version  Encryption           Signing             
----------------------------------------------------------------------------------------------------------------------------------------
2636    nobody       nogroup      192.168.1.4 (ipv4:192.168.1.4:40164)      SMB3_02           -                    -                   

Service      pid     Machine       Connected at                     Encryption   Signing     
---------------------------------------------------------------------------------------------
storage      2636    192.168.1.4   Чт ноя 19 09:44:18 2020 MSK -            -           

Locked files:
Pid          User(ID)   DenyMode   Access      R/W        Oplock           SharePath   Name   Time
--------------------------------------------------------------------------------------------------
2636         65534      DENY_NONE  0x89        RDONLY     NONE             /storage   serials/[video_name.mp4]   Thu Nov 19 09:44:18 2020

Проверяю с помощью vlc на андроиде. Простой вход в расшаренную папку не показыватся в статусе. При воспроизведении медиа лог есть.


Оффлайн
AlexDem

Проверяю с помощью vlc

Да вроде нормально у тебя все работает. У тебя протокол 3.02, посмотри чтобы на всех клиентах был минимум этот протокол. Если нет заморочек с безопасностью, то я бы поставил 2.0 минимум на сервере.

« Последнее редактирование: 19 Ноября 2020, 10:07:59 от AlexDem »


Оффлайн
lcdboost

AlexDem, спасибо за помощь, а как сменить протокол?


Оффлайн
AlexDem


Оффлайн
lcdboost


  • Печать

Страницы: [1]   Вверх

Hi there

I recently reinstalled Arch Linux on my main desktop and I just kept my personal files. Everything else was a «new fresh installation».
Now I just can’t start the samba service. First there was a problem with a missing directory (/usr/local/samba/var) but I created the directory and it solved the problem. However another weird problem is still persisting, even after I updated the system with a «pacman -Syu»:

Sep 12 21:30:07 phoenix systemd[1]: Starting Samba SMB Daemon...
Sep 12 21:30:07 phoenix smbd[810]: [2018/09/12 21:30:07.926941,  0] ../lib/param/loadparm.c:1610(set_variable_helper)
Sep 12 21:30:07 phoenix smbd[810]:   set_variable_helper(not): value is not boolean!
Sep 12 21:30:07 phoenix systemd[1]: smb.service: Main process exited, code=exited, status=1/FAILURE
Sep 12 21:30:07 phoenix systemd[1]: smb.service: Failed with result 'exit-code'.
Sep 12 21:30:07 phoenix systemd[1]: Failed to start Samba SMB Daemon.

The same problem appears with «testparm»:

...
set_variable_helper(not): value is not boolean!
Error loading services.

My CPU is a AMD Ryzen 7 1700X Eight-Core Processor with 16Gb of RAM.

Any ideas?

Kind regards

Last edited by cmmps (2018-09-12 22:05:14)

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

binarymonk

Another broken SAMBA … Failed to start Samba SMB Daemon [SOLVED]

Hi there folks.

As you can tell by the subject line it is all about SAMBA. I am really pulling what little hair I have left out with this. So here is the background:

Very green Linux user. I have had Linux Mint 17,1 & 17.3 on a laptop for a while. They just work and I use them occasionally. (although I’ve never had them sharing files over my LAN with Windows machines etc). I decided to dual boot the shiny new TARA on to my main PC. That went fairly ok, and with some guidance from past posts and a Grub fix it now boots and runs lovely.

I really need this machine to talk to the other machines on the network though and so I went to … https://www.techrepublic.com/blog/five- … ing-samba/ .. looking for a gui to help me. I decided on … «WEBMEIN»
After following the instructions located at ….. http://www.webmin.com/samba-howto.html
My Samba is screwed, and no matter where I look I can’t figure out what to do.

So I figured. I’ll hold my hands up, say that I screws it up, and hope that someone is looking down on the forum kindly and might be willing to help, or at least point my tired eyes in the right direction.

Thanks in advance

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

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

altair4

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

Re: Another broken SAMBA … Failed to start Samba SMB Daemon

Post

by altair4 » Sat Oct 13, 2018 6:46 am

Took a quick look at the Webmin Samba Howto and one issue is this:

10.) Change your security to share level then save the changes.

Share level security ( security = share in smb.conf ) is no longer a legitimate option in Samba. Hasn’t been for years. If you force it to that setting today smbd ( the samba daemon ) will refuse to start.

Side note: I would suggest that you get aquatinted with a samba diagnostic tool called testparm. You invoke it in a terminal this way:

If you were to run it with security set to share it would have told you what I just said above:

WARNING: Ignoring invalid value ‘share’ for parameter ‘security’
Error loading services.

The «service» it has an error loading is … well … itself ( smbd ).

Side note2: I also looked at your first link and you should know that system-config-samba has been abandoned, will not run, and designed for version3 of samba. Samba no longer supports SWAT. Gadmin-samba is far far worse — it was written for version2 of samba and will absolutely destroy your smb.conf file to such an extent that it will be inoperable.

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

binarymonk

Re: Another broken SAMBA … Failed to start Samba SMB Daemon

Post

by binarymonk » Sat Oct 13, 2018 11:42 am

First things first, thank you for replying to my post altair4, and thank you for your advice so far.

altair4 wrote: ⤴Sat Oct 13, 2018 6:46 am
Took a quick look at the Webmin Samba Howto and one issue is this:

10.) Change your security to share level then save the changes.

Share level security ( security = share in smb.conf ) is no longer a legitimate option in Samba. Hasn’t been for years. If you force it to that setting today smbd ( the samba daemon ) will refuse to start.

Thanks for that little bit. I have set the «Security» back to default and low and behold the SMB Service has started.

altair4 wrote: ⤴Sat Oct 13, 2018 6:46 am
Side note: I would suggest that you get aquatinted with a samba diagnostic tool called testparm. You invoke it in a terminal this way:

If you were to run it with security set to share it would have told you what I just said above:

WARNING: Ignoring invalid value ‘share’ for parameter ‘security’
Error loading services.

The «service» it has an error loading is … well … itself ( smbd ).

Yep you were right :roll:

altair4 wrote: ⤴Sat Oct 13, 2018 6:46 am
Side note2: I also looked at your first link and you should know that system-config-samba has been abandoned, will not run, and designed for version3 of samba. Samba no longer supports SWAT. Gadmin-samba is far far worse — it was written for version2 of samba and will absolutely destroy your smb.conf file to such an extent that it will be inoperable.

Ok, so having followed your brief advice so far I have firstly concluded that I am as green as grass, and that I really like the way Linux Mint just does what you tell it. (When you know what you are doing :oops: )

So now that the service is up and running again. Do you fancy, helping me out with getting it to talk to the windows PC’s on my network?

altair4

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

Re: Another broken SAMBA … Failed to start Samba SMB Daemon

Post

by altair4 » Sat Oct 13, 2018 12:06 pm

So now that the service is up and running again. Do you fancy, helping me out with getting it to talk to the windows PC’s on my network?

Well, that’s another issue. Linux-to-Linux samba is easy. Linux-to-Windows not so much.

The version of samba that comes with Ubuntu 18.04 ( Mint 19 ) made some changes primarily so that it could converse with Win10. In doing this some things got messed up. So I guess the question is what is the problem?

If you can no longer open your file manager and browse for Windows machines you might want to look at this: Mint 19 and Samba File Sharing Changes

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

binarymonk

Re: Another broken SAMBA … Failed to start Samba SMB Daemon

Post

by binarymonk » Sat Oct 13, 2018 12:44 pm

altair4 wrote: ⤴Sat Oct 13, 2018 12:06 pm
Well, that’s another issue. Linux-to-Linux samba is easy. Linux-to-Windows not so much.

…. So I guess the question is what is the problem?

The problem is… Everything…

If I start from the beginning… I followed the doomed instructions as I mentioned before. But that didn’t work. Thanks to you I have now got Samba running.
If I click on «/Files/Network/» then I can see the machine I’m on plus a «windows network folder» if I click on that I can see «Home» (Which takes me to my router) or «Workgroup» if I click on that I get the error message..

Unable to mount location… Failed to retrieve share list from server: Success

There is NO folder with MY actual workgroup. (which I have changed in the smb.conf.

I did that but it hasn’t made any difference. :(

At this point I’m wondering if it may just be best to start from scratch and get a someone to hold my hand :lol:

altair4

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

Re: Another broken SAMBA … Failed to start Samba SMB Daemon

Post

by altair4 » Sat Oct 13, 2018 1:32 pm

Please post the output of this command to that we can see how far off from the default you actually are before we start over:

In the mean time if you did this:

There is NO folder with MY actual workgroup. (which I have changed in the smb.conf.

Did you restart samba? You do that in this order:

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

binarymonk

Re: Another broken SAMBA … Failed to start Samba SMB Daemon

Post

by binarymonk » Sat Oct 13, 2018 2:02 pm

altair4 wrote: ⤴Sat Oct 13, 2018 1:32 pm
Please post the output of this command to that we can see how far off from the default you actually are before we start over:

No problem output as follows…

Code: Select all

testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE

# Global parameters
[global]
	dns proxy = No
	log file = /var/log/samba/log.%m
	map to guest = Bad User
	max log size = 1000
	obey pam restrictions = Yes
	pam password change = Yes
	panic action = /usr/share/samba/panic-action %d
	passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* .
	passwd program = /usr/bin/passwd %u
	server role = standalone server
	server string = %h server (Samba, Ubuntu)
	syslog = 0
	unix password sync = Yes
	usershare allow guests = Yes
	workgroup = USLOT65
	idmap config * : backend = tdb


[printers]
	browseable = No
	comment = All Printers
	create mask = 0700
	path = /var/spool/samba
	printable = Yes
	read only = Yes


[print$]
	comment = Printer Drivers
	path = /var/lib/samba/printers
	read only = Yes

Hope that makes sense to you :lol:

In the mean time if you did this:

There is NO folder with MY actual workgroup. (which I have changed in the smb.conf.

Did you restart samba? You do that in this order:

Yep done that. Nothing…. So I did a Full PC Restart. Now I can see a folder with my workgroup name but it gives me the «Unable to mount location… Failed to retrieve share list from server: Success» error when I click on it. :roll:

So how are we looking?

altair4

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

Re: Another broken SAMBA … Failed to start Samba SMB Daemon

Post

by altair4 » Sat Oct 13, 2018 2:25 pm

I don’t know how you are getting to the point where you get «failed to retrieve ..» error. When you go to Network > Windows network you should get a blank screen because netbios browsing is disabled in Mint 19 without the NT1 reference.

Anyhoo what I would do is edit /etc/samba/smb.conf and right below the workgroup = USLOT65 line add these:

Code: Select all

client max protocol = NT1
name resolve order = bcast host lmhosts wins

Then restart smbd then nmbd again.

You really should see if Samba itself is working on this box. You do that by trying to access each of your Windows machines by ip address not by name. Open a terminal and run — with the correct ip address of the Windows machine:

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

binarymonk

Re: Another broken SAMBA … Failed to start Samba SMB Daemon

Post

by binarymonk » Sat Oct 13, 2018 2:43 pm

altair4 wrote: ⤴Sat Oct 13, 2018 2:25 pm
I don’t know how you are getting to the point where you get «failed to retrieve ..» error. When you go to Network > Windows network you should get a blank screen because netbios browsing is disabled in Mint 19 without the NT1 reference.

As per your other post and suggestion I added the NT1 reference as well as the name resolve order stuff. ( I did that after your second post. You pointed me to one of your other post/tutorials, so I added them in then)

You really should see if Samba itself is working on this box. You do that by trying to access each of your Windows machines by ip address not by name. Open a terminal and run — with the correct ip address of the Windows machine:

Done that and I get the error..

Could not display «smb://192.168/…/…»
error:Failed to retrieve share list from server: Invalid argument. Please select another viewer and try again.

So… I have included here a copy of the «GLOBAL» section from my smb.conf.

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = USLOT65

netbios name = Charles
client max protocol = NT1
security = user
client use spnego = no
name resolve order = bcast host lmhosts wins

# server string is the equivalent of the NT Description field
server string = %h server (Samba, Ubuntu)

# Windows Internet Name Serving Support Section:
# WINS Support — Tells the NMBD component of Samba to enable its WINS Server
# wins support = no

# WINS Server — Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no

Hope that helps too :)

binarymonk

Re: Another broken SAMBA … Failed to start Samba SMB Daemon

Post

by binarymonk » Sat Oct 13, 2018 3:09 pm

altair4 wrote: ⤴Sat Oct 13, 2018 3:00 pm
I don’t think I can help you. The output of testparm doesn’t match what you have in smb.conf and I don’t know how that can happen.

That really is a shame, you have been amazing so far.
Would it be best to just delete the smb.conf I have and start from fresh?

Thanks for everything :D

altair4

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

Re: Another broken SAMBA … Failed to start Samba SMB Daemon

Post

by altair4 » Sat Oct 13, 2018 3:17 pm

If you have things in your smb.conf that testparm cannot pick up I don’t know how restarting with a new smb.conf will fix things but there is a recovery default smb.conf located at /usr/share/samba/smb.conf if you want to try.

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

binarymonk

Re: Another broken SAMBA … Failed to start Samba SMB Daemon

Post

by binarymonk » Sat Oct 13, 2018 4:02 pm

altair4 wrote: ⤴Sat Oct 13, 2018 3:17 pm
If you have things in your smb.conf that testparm cannot pick up I don’t know how restarting with a new smb.conf will fix things but there is a recovery default smb.conf located at /usr/share/samba/smb.conf if you want to try.

Perhaps that might have led to my having problems… :roll: :oops: .. It seems that after following an earlier post it is the /usr/share/samba/smb.conf that i have been altering. I have since put everything as it was. changed everything in the /etc/samba/smb.conf instead, and here follow the testparm -s output

grandad@Charles:~$ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The «syslog» option is deprecated
Processing section «[printers]»
Processing section «[print$]»
Loaded services file OK.
Server role: ROLE_STANDALONE

# Global parameters
[global]
client use spnego = No
dns proxy = No
log file = /var/log/samba/log.%m
map to guest = Bad User
max log size = 1000
name resolve order = bcast host lmhosts wins
obey pam restrictions = Yes
pam password change = Yes
panic action = /usr/share/samba/panic-action %d
passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* .
passwd program = /usr/bin/passwd %u
security = USER
server role = standalone server
server string = %h server (Samba, Ubuntu)
syslog = 0
unix password sync = Yes
usershare allow guests = Yes
workgroup = USLOT65
idmap config * : backend = tdb

[printers]
browseable = No
comment = All Printers
create mask = 0700
path = /var/spool/samba
printable = Yes
read only = Yes

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
read only = Yes

Does it look any better now? :wink:

binarymonk

Re: Another broken SAMBA … Failed to start Samba SMB Daemon

Post

by binarymonk » Sat Oct 13, 2018 6:31 pm

altair4 wrote: ⤴Sat Oct 13, 2018 4:28 pm
It does … outside of the client use spnego = No entry. Is there a reason for that?

Actually, the reason for that is after following one of your previous threads…

someone else had a similar problem that apparently needed that line. I figured mine was the same. But that was before I had held my hand up and realised how far down the rabbit hole I was.

EDIT: And client max protocol = NT1 is still missing.

I could have sworn I added it. :?: I am not on that PC now, as it is now 23:29 UK time, and I will be signing off for tonight, but I will double check it in the morning and post back to you then. :)

Once again altair4 Thank you for everything so far. :D

binarymonk

Re: Another broken SAMBA … Failed to start Samba SMB Daemon

Post

by binarymonk » Sun Oct 14, 2018 7:13 pm

ALTAIR4 You are a life saver. :D

I have been on and commented out the line client use spnego = No so it now reads # client use spnego = No.
Also I have added in the line client max protocol = NT1.

I then did the

But NOTHING… So again I did a PC restart and YES IT WORKS! :D

I had run testparm -s and was going to post it here but I saved it to the wrong folder… :lol: and that one isn’t on my share list… (I’m not on that PC again :roll: )

OK so the moral of the story folks is DON’T try and follow some dodgy looking DIY web GUI… Just hold you hand up and say I F.U.B.A.R. and then come here where you should have been all along :D

So I’m going to mark this as solved, as sharing my Linux files to windows has never been a problem before, but I know who I’m looking up if TARA has any other ideas this time :wink:

And for anyone else who has been following this…. here it is in plain English…

using your file manager navigate to the folder /etc/samba (right click on the samba folder and open as root). Then open the file smb.conf (now with elevated privileges), and in the «GLOBAL SETTINGS» section, at the top of the file, under the line workgroup = WORKGROUP add the following lines.

Code: Select all

client max protocol = NT1
name resolve order = bcast host lmhosts wins

Also if you want to you can change the name of the workgroup but it’s not needed.
SAVE THE FILE…

In a terminal, you could then do

Code: Select all

sudo service smbd restart
sudo service nmbd restart

But I found it better to just restart the whole PC.

A Massive thank you to ALTAIR4 for his outstanding help throughout this whole thing. (P.S. I’ll post the testparm -s output in the morning just so you can see it)

binarymonk

Re: Another broken SAMBA … Failed to start Samba SMB Daemon [SOLVED]

Post

by binarymonk » Mon Oct 15, 2018 5:52 am

And here it is the output of testparm -s

Code: Select all

grandad@Charles:~$ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE

# Global parameters
[global]
	client max protocol = NT1
	dns proxy = No
	log file = /var/log/samba/log.%m
	map to guest = Bad User
	max log size = 1000
	name resolve order = bcast host lmhosts wins
	obey pam restrictions = Yes
	pam password change = Yes
	panic action = /usr/share/samba/panic-action %d
	passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* .
	passwd program = /usr/bin/passwd %u
	security = USER
	server role = standalone server
	server string = %h server (Samba, Ubuntu)
	syslog = 0
	unix password sync = Yes
	usershare allow guests = Yes
	workgroup = USLOT65
	idmap config * : backend = tdb


[printers]
	browseable = No
	comment = All Printers
	create mask = 0700
	path = /var/spool/samba
	printable = Yes
	read only = Yes


[print$]
	comment = Printer Drivers
	path = /var/lib/samba/printers
	read only = Yes

Once again a MASSIVE thank you to Altair4

Now to get on with enjoying TARA and all she has to offer :wink: :lol:

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


Записан


  • Samsung 1860 ошибка датчика a3 3112
  • Sam3 exe ошибка при запуске приложения 0xc0000142
  • Samsung 1520 коды ошибок
  • Sam 3 exe ошибка приложения 0xc0000142
  • Salt and sanctuary ошибка