Red Hat Bugzilla – Bug 844188
Avoid logs related to printers from samba
Last modified: 2013-09-23 18:41:31 EDT
Description of problem:
Following logs are seen in samba logs of a RHS 2.0 instance:
Jul 29 17:26:12 gqas015 smbd: [2012/07/29 17:26:12.373728, 0] smbd/server.c:281(remove_child_pid)
Jul 29 17:26:12 gqas015 smbd: Could not find child 24482 -- ignoring
Jul 29 17:26:16 gqas015 smbd: [2012/07/29 17:26:16.052206, 0] printing/print_cups.c:109(cups_connect)
Jul 29 17:26:16 gqas015 smbd: Unable to connect to CUPS server localhost:631 - Connection refused
Jul 29 17:26:16 gqas015 smbd: [2012/07/29 17:26:16.052617, 0] printing/print_cups.c:468(cups_async_callback)
Jul 29 17:26:16 gqas015 smbd: failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
These are repeated and annoying in nature. This is probably to do with smb.conf containing references to
Version-Release number of selected component (if applicable):
Steps to Reproduce:
This happens when the smb service gets started through the volume hooks. If samba is not configured correctly, it should not get started.
Therefore, this might be a duplicate of bug 861506.
Chris, would be great if you help out here.
As the original report says, this isn't a bug it's just an annoyance.
1) Please provide the smb.conf with any such reports.
2) Vijay: Your report says "This is probably to do with smb.conf containing references to" ... Containing references to what in particular?
3) If the RHS server is not being used as a print server, remove the [printers] section, if there is one.
4) If #3 doesn't work, set `load printers = no` in the [global] section.
Let me know if those options fix the problem.
Please post the results of trying the above suggestions.
(In reply to comment #5)
> Please post the results of trying the above suggestions.
(In reply to comment #4)
> As the original report says, this isn't a bug it's just an annoyance.
> 1) Please provide the smb.conf with any such reports.
Vanilla smb.conf that is part of RHS installs.
> 2) Vijay: Your report says "This is probably to do with smb.conf containing
> references to" ... Containing references to what in particular?
Sorry about that, containing references to "load printers = yes" in [global] section and [printers] section in smb.conf.
> 3) If the RHS server is not being used as a print server, remove the
> [printers] section, if there is one.
RHS would not be ideally used as a print server. Hence it might be better to ship a default smb.conf with RHS that doesn't enable these sections/options by default.
(In reply to comment #6)
> RHS would not be ideally used as a print server. Hence it might be better to
> ship a default smb.conf with RHS that doesn't enable these sections/options
> by default.
* In the default smb.conf, set "load printers = no" in the [globals] section
and remove the [printers] section.
Vijay: Please advise. What is the process for getting these changes into
the RHS2.1 production stream?
*** Bug 984438 has been marked as a duplicate of this bug. ***
One of the option I found is disabling the logging of the messages related to printers.
I changed -> printcap name = lpstat TO printcap name = /dev/null
And it is not logging the messages any more.
Susant has come up with two solution options for this bug:
1-- Compiling samba with the "--disable cups " option, which will prevent Samba from loading the cups library. Hence, there will be no logging related to cups.
2-- Modifying the global section with the following changes.
*load printers = no //it will no load printers in the printcap file
*show add printers wizard = no
*disable spoolss = yes // hide printers and faxes
*printing = bsd // Printing system type changed to bsd will not log CUPS related logs
Next Step: Evaluation of these options from the Scrum Team.
Recommended ordering and comments for option 2:
load printers = no # Do not load printers from /etc/printcap
disable spoolss = yes # Shut down the RPC printing communications channel
show add printers wizard = no # Disable the RPC-based printing wizard
printing = bsd # Prevent loading the CUPS back-end.
Some quick research shows that the formatting I provided above is incorrect. Samba does not allow trailing comments in the smb.conf file. The comment characters (';' and '#') must be the first (non-whitespace) thing on the line, otherwise the comment is seen as being part of the parameter value. This is because both ';' and '#' are legal within such values. Moving the comments to their own separate lines should solve the problem encountered by QE.
Verified on Samba-glusterfs-3.6.9-156.2 build. Looks fine.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
For information on the advisory, and where to find the updated files, follow the link below.
If the solution does not work for you, open a new bug report.