In my smb.conf, there is "printing = SYSV", "printer name = lp" but no printer
is made available. Further, there are many error lines like "Error loading
module '/usr/local/samba-numa/lib/charset/CP850.so': ld.so.1: ./bin/testparm:
fatal: /usr/local/samba-numa/lib/charset/CP850.so: open failed: No such file or
Conversion from CP850 to UTF8 not supported " when testing the config with
"testparm". But this bug is another story.
The log.smbd shows entries like " printing/pcap.c:pcap_printer_fn(361)
Unable to open printcap file /etc/printcap for read! ". In fact, there is no
printcap file present, as usual with SYS V. Using past versions of SAMBA, I did
not have a printcap file.
Another entry like "rpc_server/srv_spoolss_nt.c:set_printer_hnd_name(454)
Setting printer name=\\kommsrv.rz.unibw-muenchen.de\lp (len=33)
searching for [lp] (len=2)
Printer not found ".
Same problem here with 3.0.0beta3 under sparc-sun-solaris2.7 with gcc version 3.2.2.
The whole printing system defaults to BSD after compilation and therefore the
printers are not loaded.
The cause for the problem seems to be that the SYSV variable is not defined in
config.h after running the configure script. This causes the code to parse the
output of the lpstat command not to be included. Also all print commands default
to the BSD variants (e.g. lpq instead of lpstat etc.)
My quick fix for this was to manually #define SYSV in config.h after running
configure. Now the printers get loaded again and the lp* commands default to the
I can not provide a real fix for this. I think the configure script is the right
place to fix the problem.
If there are any patches I should test, I'd be more than happy to offer my help.
This is still in 3.0.0rc1.
After looking into this a bit further (since I wanted to know why it used to
work before), I think I have found the cause of the problem:
The SYSV variable never got defined in config.h. Instead, older versions (e.g.
2.2.7a )had the following in include/includes.h:
+ /* this guess needs to be improved (tridge) */
+ #if (defined(STAT_STATVFS) || defined(STAT_STATVFS64)) && !defined(SYSV)
+ #define SYSV 1
This caused the SYSV variable to be defined before the #defines for the
printsystem are evaluated.
A quick fix would be to again include the lines shown above in includes.h. But
as the comment above suggest, this is probably not the right way to fix it.
This bug is a real showstopper, since it will cause printing to fail on all SYSV
platforms because the whole printing system will default to BSD.
Thanks for checking but since this bug was never
marked as fixed, i would have expected it to
remain in RC1. I'll try to get it fixed by rc2.
I need to now what versions of solaris use SYSV printing
and when Sun made the move to BSD (which is the recent
trend from what I've heard). Can you provide any input
for this? What printing packages are installed on
Solaris 9 ?
If I remember well, the first version using SYSV was Solaris 2.3.
This was ten years ago.
> What printing packages are installed on Solaris 9 ?
This is a hybrid system, a sort of BSD and SYSV mix, if I understand
well. The primary focus is SYSV and this is the primary view of
the user. I cannot give you further details about the exact details.
I think, we have simply to consider this OS as SYSV. This was the
way past versions of SAMBA have seen the matter. It worked well.
According to the Sun docs I've read, beginning with
Solaris 2.6, the print spooler implemented the BSD
The problem I have is defining a test for SYSV vs. BSD
that is not based on the operating system version.
If you set 'printing = sysv', it should fix your problem.
Can you check for me?
I'm going to try to get my Solaris 9 box back up tonight
and see what a stock install looks like. I tried to see
if I could get this information from the build farm, but
*** Bug 355 has been marked as a duplicate of this bug. ***
Adding me as cc.
Just adding "printing = sysv" will not fix the problem.
There is special code in print_svid.c which parses the output of the lpstat
command to get a list of printers. This code only gets compiled in if SYSV is
defined. Without this code, load printers will not work because only the code
for parsing a printcap file is there (but there is no printcap file under solaris).
This is not only a problem on solaris 9 but also on earlier versions (I did my
tests under Solaris 7).
I'd also like to add that the Solaris print system is definitely SYSV as noted
earlier. There are some sort of BSD compatibility functions included, but they
do not work to well.
OK. I'm convinced. I'm working on a modified version of Tim's
patch. I'm marking this as fixed, but won't actually have the
code in for a few hours.
btw...the CP850.so issue is logged in
bug 150 and has been fixed in the SAMBA_3_0
cvs tree. Any testing you could give it would
I agree that defining SYSV for solaris in source/configure.in version
1.300.2.151 solves the problem with lpstat.
Many thanks for your work!
originally reported against 3.0.0beta2. CLeaning out
non-production release versions.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.