[Samba] pcap cache not loaded
Lambertz, Björn
b.lambertz at fz-juelich.de
Wed Nov 17 17:17:39 UTC 2021
Hi all,
I stumbled upon an error, that doesnt yield many helpful search results, so
I just want to place some information here, so it can be found and may help
others.
My samba log had following errors:
Failed to fetch record!
pcap cache not loaded
Most suggestions are: If you dont want to provide printers, just set `load
printers = no` in your smb.conf. If you want to provide printers, this maybe
a solution for you:
pcap means printcap, which is a file created by cups. Man smb.conf states:
To use the CUPS printing interface set printcap name = cups. This should be
supplemented by an additional setting printing = cups in the [global]
section. printcap name = cups will use the "dummy" printcap created by
CUPS, as specified in your CUPS configuration file
My cups configuration file said (cups-files.conf):
# Location of the file listing all of the local printers...
#Printcap /run/cups/printcap
Unfortunately, setting `printcap name = cups` didnt resolve the errors in
samba log. The file /run/cups/printcap was present, but obviously samba
couldnt find or read it. So I set it like this in my smb.conf `printcap
name = /run/cups/printcap`
This worked, but after reboot, printcap was not yet written by cups (when
samba was started), so samba rightly complains it cannot read the file. So i
had to set a printcap cache time. In my case I chose 60 seconds, which makes
samba look for an updated printcap file every 60 seconds. Default is 750
seconds.
So I ended up resolving the errors in samba log with these entries in
smb.conf:
load printers = yes
printing = cups
printcap name = /run/cups/printcap
printcap cache time = 60
Best regards, Björn
More information about the samba
mailing list