Can't restart Samba

Issues related to applications and software problems
sunnyD
Posts: 7
Joined: 2022/06/24 01:05:44

Can't restart Samba

Post by sunnyD » 2022/06/24 01:58:09

Hello, I'm having trouble to restart smb service on CentOS 7.9.2009 that I haven't upgraded recently.

Samba server just worked fine, until I slightly modified /etc/samba/smb.conf.

But /etc/samba/smb.conf looks fine when I run testparm, i get this.

Code: Select all

(base) [root@penta01 SERVER]# testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
        dos charset = CP932
        printcap name = cups
        security = USER
        server min protocol = SMB2
        workgroup = SAMBA
        catia:mappings = 0x22:0xa8,0x2a:0xa4,0x2f:0xf8,0x3a:0xf7,0x3c:0xab,0x3e:0xbb,0x3f:0xbf,0x5c:0xff,0x7c:0xa6
        idmap config * : backend = tdb
        cups options = raw
        mangled names = no
        vfs objects = catia


[homes]
        browseable = No
        comment = Home Directories
        inherit acls = Yes
        read only = No
        valid users = %S %D%w%S


[printers]
        browseable = No
        comment = All Printers
        create mask = 0600
        path = /var/tmp
        printable = Yes


[print$]
        comment = Printer Drivers
        create mask = 0664
        directory mask = 0775
        force group = @printadmin
        path = /var/lib/samba/drivers
        write list = @printadmin root


[SF]
        comment = First Shared Folder
        create mask = 0777
        directory mask = 0777
        guest ok = Yes
        path = /pathTOshare
        read only = No
        write list = shareuser
Here are the status of Samba server right now.

Code: Select all

smb.service - Samba SMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2022-06-24 10:45:02 KST; 5s ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 143239 ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, status=1/FAILURE)
 Main PID: 143239 (code=exited, status=1/FAILURE)

Jun 24 10:45:02 penta01 systemd[1]: Starting Samba SMB Daemon...
Jun 24 10:45:02 penta01 smbd[143239]: /usr/sbin/smbd: /lib/libtdb.so.1: version `TDB_1.3.17' not found (required by /lib/libsmbconf.so.0)
Jun 24 10:45:02 penta01 systemd[1]: smb.service: main process exited, code=exited, status=1/FAILURE
Jun 24 10:45:02 penta01 systemd[1]: Failed to start Samba SMB Daemon.
Jun 24 10:45:02 penta01 systemd[1]: Unit smb.service entered failed state.
Jun 24 10:45:02 penta01 systemd[1]: smb.service failed.
It seems like the libtdb library is conflicted, so I check the /usr/lib and /usr/lib64 directories.

/usr/lib Directory

Code: Select all

(base) [root@penta01 lib]# ll libtdb*
lrwxrwxrwx  1 root root    16 Jun 24 09:55 libtdb.so.1 -> libtdb.so.1.3.16
-rwxr-xr-x. 1 root root 95752 Aug  9  2019 libtdb.so.1.3.16
/usr/lib64 Directory

Code: Select all

(base) [root@penta01 lib64]# ll libtdb*
lrwxrwxrwx 1 root root    16 Aug 11  2021 libtdb.so.1 -> libtdb.so.1.3.18
-rwxr-xr-x 1 root root 95784 Apr  1  2020 libtdb.so.1.3.18
Here are the Samba RPM's that were installed right now.

Code: Select all

(base) [root@penta01 SERVER]# rpm -qa | grep samba
samba-4.10.16-18.el7_9.x86_64
samba-common-4.10.16-18.el7_9.noarch
samba-common-libs-4.10.16-18.el7_9.x86_64
samba-libs-4.10.16-18.el7_9.x86_64
samba-common-tools-4.10.16-18.el7_9.x86_64
samba-client-libs-4.10.16-18.el7_9.x86_64
I googled about the logs and this situation, and then tried some ways of solution but anything couldn't solve this problem.
FYI, I did yum update as one of the recommendations.

What can I do with this problem?

Thank you in advance.
Last edited by sunnyD on 2022/06/30 06:46:44, edited 4 times in total.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Can't restart Samba

Post by TrevorH » 2022/06/24 10:16:54

Jun 24 10:45:02 penta01 smbd[143239]: /usr/sbin/smbd: /lib/libtdb.so.1: version `TDB_1.3.17' not found (required by /lib/libsmbconf.so.0)
Which means that either your version of libtdb.so.1 is corrupted or the wrong version or your /usr/sbin/smbd is. The libtdb file is supplied by the libtdb package, /usr/sbin/smbd comes from the samba package. Start by running rpm -Va libtdb samba and see if it thinks those are ok. No output is good. Next see if either or both have updates pending - perhaps you updated samba without updating libtdb or vice versa so run yum update libtdb samba\* and see if anything gets updated.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Can't restart Samba

Post by jlehtone » 2022/06/24 11:40:10

CentOS 7's libtdb does not have content in /usr/lib:

Code: Select all

$ rpm -ql libtdb
/usr/lib64/libtdb.so.1
/usr/lib64/libtdb.so.1.3.18
That is, the libtdb.x86_64. There is also libtdb.i686:

Code: Select all

$ yum -q list libtdb
Installed Packages
libtdb.x86_64                     1.3.18-1.el7                      @base
Available Packages
libtdb.i686                       1.3.18-1.el7                      base
That has the 32-bit version:

Code: Select all

$ repoquery -l libtdb.i686
/usr/lib/libtdb.so.1
/usr/lib/libtdb.so.1.3.18
However, note the version number. The Samba should not need the libtdb.i686 at all, but if it is installed, then it should match the 64-bit version.

The "version `TDB_1.3.17' not found" means that a symbol is not inside a executable.
You can see some with:

Code: Select all

$ strings /usr/lib64/libtdb.so.1 | grep TDB_

There is no "/lib/libsmbconf.so.0", but there are "/usr/lib/libsmbconf.so.0" and "/usr/lib64/libsmbconf.so.0" in 32-bit and 64-bit "samba-client-libs" packages, respectively.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Can't restart Samba

Post by TrevorH » 2022/06/24 12:50:00

CentOS 7's libtdb does not have content in /usr/lib:
Don't forget that /lib is a symlink to /usr/lib
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Can't restart Samba

Post by jlehtone » 2022/06/24 13:13:42

TrevorH wrote:
2022/06/24 12:50:00
Don't forget that /lib is a symlink to /usr/lib
Oh yes, that explains my last note:
"/lib/libsmbconf.so.0" is "/usr/lib/libsmbconf.so.0" and that is from 32-bit samba and the 32-bit libtdb is not up to date.

Reforms questions:
* How can 32-bit and 64-bit versions of package end up mismatching?
* Why "rpm -qa | grep samba" did show only 64-bit packages?

sunnyD
Posts: 7
Joined: 2022/06/24 01:05:44

Re: Can't restart Samba

Post by sunnyD » 2022/06/27 00:18:26

TrevorH wrote:
2022/06/24 10:16:54
Jun 24 10:45:02 penta01 smbd[143239]: /usr/sbin/smbd: /lib/libtdb.so.1: version `TDB_1.3.17' not found (required by /lib/libsmbconf.so.0)
Which means that either your version of libtdb.so.1 is corrupted or the wrong version or your /usr/sbin/smbd is. The libtdb file is supplied by the libtdb package, /usr/sbin/smbd comes from the samba package. Start by running rpm -Va libtdb samba and see if it thinks those are ok. No output is good. Next see if either or both have updates pending - perhaps you updated samba without updating libtdb or vice versa so run yum update libtdb samba\* and see if anything gets updated.
Hi Trevor. Thank you for the kind replies.

I followed what you suggest.
First of all, there isn't any output when i ran rpm -Va libtdb samba.

And also nothing gets updated when i ran yum update libtdb samba\*.

Anything else that i can do?

Thank you in advance.
Last edited by sunnyD on 2022/06/27 01:29:01, edited 1 time in total.

sunnyD
Posts: 7
Joined: 2022/06/24 01:05:44

Re: Can't restart Samba

Post by sunnyD » 2022/06/27 01:22:25

jlehtone wrote:
2022/06/24 11:40:10
CentOS 7's libtdb does not have content in /usr/lib:

Code: Select all

$ rpm -ql libtdb
/usr/lib64/libtdb.so.1
/usr/lib64/libtdb.so.1.3.18
That is, the libtdb.x86_64. There is also libtdb.i686:

Code: Select all

$ yum -q list libtdb
Installed Packages
libtdb.x86_64        1.3.18-1.el7         @base
Available Packages
libtdb.i686          1.3.18-1.el7         base
That has the 32-bit version:

Code: Select all

$ repoquery -l libtdb.i686
/usr/lib/libtdb.so.1
/usr/lib/libtdb.so.1.3.18
However, note the version number. The Samba should not need the libtdb.i686 at all, but if it is installed, then it should match the 64-bit version.

The "version `TDB_1.3.17' not found" means that a symbol is not inside a executable.
You can see some with:

Code: Select all

$ strings /usr/lib64/libtdb.so.1 | grep TDB_

There is no "/lib/libsmbconf.so.0", but there are "/usr/lib/libsmbconf.so.0" and "/usr/lib64/libsmbconf.so.0" in 32-bit and 64-bit "samba-client-libs" packages, respectively.
Hi jlehtone! Thank you for your friendly replies! :)

I updated 32-bit libtdb to match the 64-bit version with yum install libtdb-1.3.18-1.el7.i686.

And then i tried what you showed on the replies. Here are the outputs.

Code: Select all

# rpm -ql libtdb
/usr/lib64/libtdb.so.1
/usr/lib64/libtdb.so.1.3.18
/usr/lib/libtdb.so.1
/usr/lib/libtdb.so.1.3.18

Code: Select all

# yum -q list libtdb
Installed Packages
libtdb.i686                                                                                            1.3.18-1.el7                                                                                           @base
libtdb.x86_64                                                                                          1.3.18-1.el7                                                                                           @base

Code: Select all

# repoquery -l libtdb.i686
/usr/lib/libtdb.so.1
/usr/lib/libtdb.so.1.3.18

Code: Select all

# strings /usr/lib64/libtdb.so.1 | grep TDB_
TDB_1.2.1
TDB_1.2.2
TDB_1.2.3
TDB_1.2.4
TDB_1.2.5
TDB_1.2.6
TDB_1.2.7
TDB_1.2.8
TDB_1.2.9
TDB_1.2.10
TDB_1.2.11
TDB_1.2.12
TDB_1.2.13
TDB_1.3.0
TDB_1.3.1
TDB_1.3.2
TDB_1.3.3
TDB_1.3.4
TDB_1.3.5
TDB_1.3.6
TDB_1.3.7
TDB_1.3.8
TDB_1.3.9
TDB_1.3.10
TDB_1.3.11
TDB_1.3.12
TDB_1.3.13
TDB_1.3.14
TDB_1.3.15
TDB_1.3.16
TDB_1.3.17
TDB_1.3.18
__TDB_INTERNAL__
TDB_NO_FSYNC
tdb_open_ex: invalid flags for %s - TDB_MUTEX_LOCKING and TDB_INTERNAL are not allowed together
tdb_open_ex: invalid flags for %s - TDB_MUTEX_LOCKING and TDB_NOMMAP are not allowed together
tdb_open_ex: invalid flags for %s - TDB_MUTEX_LOCKING not allowed read only
tdb_open_ex: invalid flags for %s - TDB_MUTEX_LOCKING requires support for robust_mutexes

After i updated libtdb of 32-bit version, the error messgae is changed like this.

Code: Select all

# systemctl status smb
● smb.service - Samba SMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2022-06-27 10:20:02 KST; 6s ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 227102 ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, status=127)
 Main PID: 227102 (code=exited, status=127)

Jun 27 10:20:02 penta01 systemd[1]: Starting Samba SMB Daemon...
Jun 27 10:20:02 penta01 smbd[227102]: /usr/sbin/smbd: relocation error: /usr/lib64/samba/libauth-samba4.so: symbol lp_min_domain_uid, version SMBCONF_0 not defined in file libsmbconf.so.0 with ... time reference
Jun 27 10:20:02 penta01 systemd[1]: smb.service: main process exited, code=exited, status=127/n/a
Jun 27 10:20:02 penta01 systemd[1]: Failed to start Samba SMB Daemon.
Jun 27 10:20:02 penta01 systemd[1]: Unit smb.service entered failed state.
Jun 27 10:20:02 penta01 systemd[1]: smb.service failed.
As I'm kinda new to server managing, I'm not sure I properly understood what you said.

FYI, the /usr/lib looks like this right now.

Code: Select all

(base) [root@penta01 lib]# ll libtdb.so.1*
lrwxrwxrwx  1 root root    16 Jun 27 10:02 libtdb.so.1 -> libtdb.so.1.3.18
-rwxr-xr-x. 1 root root 95752 Aug  9  2019 libtdb.so.1.3.16
-rwxr-xr-x  1 root root 98944 Apr  1  2020 libtdb.so.1.3.18
What else I can do to solve this problem?

Thank you in advance!

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Can't restart Samba

Post by TrevorH » 2022/06/27 09:19:18

First of all, there isn't any output when i ran rpm -Va libtdb samba.
Sorry, my typo, should have been rpm -qa libtdb\* samba\*
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Can't restart Samba

Post by jlehtone » 2022/06/27 15:32:45

The update of libtdb.i686 should have removed the older version of libtdb.i686 and with it the older /usr/lib/libtdb.so.1.3.16.
However, you show that the file is still in system, like it was never installed from an RPM package.
If it wasn't, then where did it come from?

Overall, why does the system have 32-bit anything? Samba does not need them.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Can't restart Samba

Post by TrevorH » 2022/06/27 16:41:26

At this point I would run yum update to get everything up to date. After that, run rpm -Va and pipe the output to a file since it's likely to be large. Go through all the things listed in that output that it says do not match the intended checksum and work out why. Some things will be easy like config files that you have changed - those are expected. Other things like anything under /usr/bin or /usr/lib will need more investigation.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply