Re: get_printer_list_db: Failed to open printer_list.tdb

Andreas Schneider via samba <[email protected]> Sun, 19 Apr 2026 07:57:21 +0200
Newsgroups gmane.network.samba.general,gmane.network.samba.internals
Message-ID <14056026.eNJFYEL58v@magrathea>
On Sunday, 19 April 2026 07:45:55 Central European Summer Time Michael Tokarev 
wrote:
> On 19.04.2026 08:21, Andreas Schneider via samba-technical wrote:
> > On Saturday, 18 April 2026 08:44:49 Central European Summer Time Michael
> > 
> > Tokarev wrote:
> >> ..or maybe just revert
> >> 
> >> commit 9080cd30d517cb50954e440bb4475c2eeb678906
> >> Author: Andreas Schneider <[email protected]>
> >> Date:   Wed Jun 22 18:56:26 2022 +0200
> >> 
> >>       s3:printing: Do not clear the printer-list.tdb
> >> 
> >> which seems to help too (Cc'ing asn@).
> > 
> > You read the full commit message of that commit, did you?
> 
> definitely.
> 
> The logic here is simple: since printer_list.tdb is never created -
> and we're watching this issue for months, that file isn't there - and
> everything works fine, - maybe this whole thing isn't needed at all.

The file is needed, it is a cache for printers on cups. If you have 200 cups 
printers and enumerate them, it takes ~200sec. Without that file you would 
have to wait that time to enumerate printers.

For home users it isn't an issue if they only have one printer, but there are 
users with 200.
 
> > Isn't the obvious question, why is the rpcd_spoolss running as a user an
> > not root? Without details and log files we don't know. Guessing and
> > reverting random commit is not the way how to fix issues.
> 
> rpcd_spoolss switches from root to user right before trying to create
> printer_list.tdb.  And switches back to root short after.   Maybe it's
> missing unbecome_user() call.

Yes, it sounds more like an impersonation problem somewhere.

> It isn't random a random commit, it's the commit which introduced this
> particular problem.

Look, the commit worked fine when implementing the it. So the question is what 
is different in your environment. Bugs are often tied to the setup of the 
Samba user.

> The logs don't tell much, since rpcd_spoolss doesn't have much logging.
> Also, rpcd_spoolss seems to ignore log level setting in smb.conf, so
> I can only turn logging on using smbcontrol, after it has been started.
> And there it doesn't report about calls to become_user/unbecome_user,
> even at level 9, yet it calls setresgid() to user and back to root, as
> can be seen in strace.  http://www.corpit.ru/mjt/tmp/rpcd_spoolss.log
> is an example of a level-10 log.

If it doesn't log correctly from the beginning, it might not initalize the 
config file.

We had the issue with samba-bgqd it didn't load the config file correctly:
https://bugzilla.samba.org/show_bug.cgi?id=15936

>  > If you want to report a bug:
>  > 
>  > https://hackmd.io/@asn/SkHk8rXBz
>  > 
>  > Please attach testparm -s info collect logs, open a bug at https://
>  > bugzilla.samba.org/ and we can take a look what is going on.
> 
> Over the years I found out that submitting bugs to bugzilla.samba.org
> is useless.  Ditto for writing emails to samba@ or samba-technical@ -
> actually I think I mostly gave up there, not getting any interest at
> all.
> 
> Sure, I'll try again.

Looks how many active developers Samba has and how large the codebase is. 
Report the bug, add the logs and assign it to me.


Best regards


	Andreas

-- 
Andreas Schneider                      [email protected]
Samba Team                             www.samba.org
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba