Bug 14657 - Use of machine account creds leads to "ldb: Unable to open tdb '/var/lib/samba/private/secrets.ldb': No such file or directory" error messages
Summary: Use of machine account creds leads to "ldb: Unable to open tdb '/var/lib/samb...
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.14.0rc4
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-09 11:57 UTC by Björn Baumbach
Modified: 2021-03-09 11:57 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Baumbach 2021-03-09 11:57:59 UTC
Different commands print ldb error messages when using the own machine account credentials. We should avoid this.

Example:

root@dm3:~# smbclient -L 127.0.0.1 -P
ldb: Unable to open tdb '/var/lib/samba/private/secrets.ldb': No such file or directory
ldb: Failed to connect to '/var/lib/samba/private/secrets.ldb' with backend 'tdb': Unable to open tdb '/var/lib/samba/private/secrets.ldb': No such file or directory

        Sharename       Type      Comment
        ---------       ----      -------
        share           Disk


smbclient uses by default the log level 1, which is used here for these error messages. So this is printed unless smbclient is called with "-d0".

With a log level of 1 also other tools print these error messages:

# samba-gpupdate -d1
ldb: Unable to open tdb '/var/lib/samba/private/secrets.ldb': No such file or directory
ldb: Failed to connect to '/var/lib/samba/private/secrets.ldb' with backend 'tdb': Unable to open tdb '/var/lib/samba/private/secrets.ldb': No such file or directory

Older Samba versions auto created a /var/lib/samba/private/secrets.ldb on access, so this does only happen on newer setups, where no secrets.ldb exists.