default samba printing system

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

default samba printing system

Kirill Bychkov
Hi.
By default samba is using cups for printing, so it starts to flood in logfiles
with:
smbd[12245]: [2013/09/13 21:03:48.595183,  0]
printing/print_cups.c:151(cups_connect)
smbd[12245]:   Unable to connect to CUPS server localhost:631 - Connection
refused
smbd[14345]: [2013/09/13 21:03:48.613769,  0]
printing/print_cups.c:528(cups_async_callback)
smbd[14345]:   failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL

I suggest to change printing system from cups to bsd to prevent this annoying
messages in logs.

Change MASTER_SITES while here.
OK?
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/samba/Makefile,v
retrieving revision 1.186
diff -u -p -u -p -r1.186 Makefile
--- Makefile 20 Jun 2013 06:54:37 -0000 1.186
+++ Makefile 13 Sep 2013 17:20:32 -0000
@@ -9,7 +9,7 @@ DISTNAME= samba-3.6.15
 PKGNAME-main= ${DISTNAME}
 FULLPKGNAME-docs= ${DISTNAME:S/-/-docs-/}
 FULLPKGPATH-docs= net/samba,-docs
-REVISION-main= 1
+REVISION-main= 2

 SHARED_LIBS= smbclient 3.0 \
  smbsharemodes 1.0 \
@@ -28,9 +28,8 @@ PERMIT_PACKAGE_CDROM= Yes
 WANTLIB += c cups execinfo iniparser ncurses popt pthread readline talloc
 WANTLIB += tdb z

-MASTER_SITES= http://download.samba.org/samba/ftp/ \
- http://us2.samba.org/samba/ftp/ \
- http://ftp.samba.org/samba/ftp/old-versions/
+MASTER_SITES= http://ftp.samba.org/pub/samba/stable/ \
+ http://ftp.samba.org/pub/samba/old-versions/

 MODULES= converters/libiconv

Index: patches/patch-examples_smb_conf_default
===================================================================
RCS file: patches/patch-examples_smb_conf_default
diff -N patches/patch-examples_smb_conf_default
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-examples_smb_conf_default 13 Sep 2013 17:20:32 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- examples/smb.conf.default.orig Fri Sep 13 21:09:04 2013
++++ examples/smb.conf.default Fri Sep 13 21:11:11 2013
+@@ -55,7 +55,7 @@
+ # It should not be necessary to specify the print system type unless
+ # it is non-standard. Currently supported print systems include:
+ # bsd, cups, sysv, plp, lprng, aix, hpux, qnx
+-;   printing = cups
++   printing = bsd
+
+ # Uncomment this if you want a guest account, you must add this to /etc/passwd
+ # otherwise the user "nobody" is used


Reply | Threaded
Open this post in threaded view
|

Re: default samba printing system

Ian McWilliam-2
On 14/09/2013 3:27 AM, Kirill Bychkov wrote:

> Hi.
> By default samba is using cups for printing, so it starts to flood in logfiles
> with:
> smbd[12245]: [2013/09/13 21:03:48.595183,  0]
> printing/print_cups.c:151(cups_connect)
> smbd[12245]:   Unable to connect to CUPS server localhost:631 - Connection
> refused
> smbd[14345]: [2013/09/13 21:03:48.613769,  0]
> printing/print_cups.c:528(cups_async_callback)
> smbd[14345]:   failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
>
> I suggest to change printing system from cups to bsd to prevent this annoying
> messages in logs.
>
> Change MASTER_SITES while here.
No issue with changing master sites but the change in config file
CHANGES THE DEFAULT to BSD not CUPS. Your own admission is "By default
samba is using cups for printing". I don't see the issue that people
wanting bsd style printing actually edit their config file and change it.

Ian McWilliam

Reply | Threaded
Open this post in threaded view
|

Re: default samba printing system

Kirill Bychkov
On Sat, September 14, 2013 03:01, Ian McWilliam wrote:

> On 14/09/2013 3:27 AM, Kirill Bychkov wrote:
>> Hi.
>> By default samba is using cups for printing, so it starts to flood in
>> logfiles
>> with:
>> smbd[12245]: [2013/09/13 21:03:48.595183,  0]
>> printing/print_cups.c:151(cups_connect)
>> smbd[12245]:   Unable to connect to CUPS server localhost:631 - Connection
>> refused
>> smbd[14345]: [2013/09/13 21:03:48.613769,  0]
>> printing/print_cups.c:528(cups_async_callback)
>> smbd[14345]:   failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
>>
>> I suggest to change printing system from cups to bsd to prevent this
>> annoying
>> messages in logs.
>>
>> Change MASTER_SITES while here.
> No issue with changing master sites but the change in config file
> CHANGES THE DEFAULT to BSD not CUPS. Your own admission is "By default
> samba is using cups for printing". I don't see the issue that people
> wanting bsd style printing actually edit their config file and change it.

Yes, my thought is to set BSD by default to get rid of messages about refused
connection to CUPS on a fresh setup of samba.
printing = cups is hardcoded somewhere, so even if this line is commented out
in config file, samba still trying to connect to cups. The easyiest way to
override it is to set printing = bsd in config.

> Ian McWilliam
>
>


Reply | Threaded
Open this post in threaded view
|

Re: default samba printing system

Ian McWilliam-2
On 14/09/2013 6:46 PM, Kirill Bychkov wrote:

> On Sat, September 14, 2013 03:01, Ian McWilliam wrote:
>> On 14/09/2013 3:27 AM, Kirill Bychkov wrote:
>>> Hi.
>>> By default samba is using cups for printing, so it starts to flood in
>>> logfiles
>>> with:
>>> smbd[12245]: [2013/09/13 21:03:48.595183,  0]
>>> printing/print_cups.c:151(cups_connect)
>>> smbd[12245]:   Unable to connect to CUPS server localhost:631 - Connection
>>> refused
>>> smbd[14345]: [2013/09/13 21:03:48.613769,  0]
>>> printing/print_cups.c:528(cups_async_callback)
>>> smbd[14345]:   failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
>>>
>>> I suggest to change printing system from cups to bsd to prevent this
>>> annoying
>>> messages in logs.
>>>
>>> Change MASTER_SITES while here.
>> No issue with changing master sites but the change in config file
>> CHANGES THE DEFAULT to BSD not CUPS. Your own admission is "By default
>> samba is using cups for printing". I don't see the issue that people
>> wanting bsd style printing actually edit their config file and change it.
> Yes, my thought is to set BSD by default to get rid of messages about refused
> connection to CUPS on a fresh setup of samba.
> printing = cups is hardcoded somewhere, so even if this line is commented out
> in config file, samba still trying to connect to cups. The easyiest way to
> override it is to set printing = bsd in config.
>

Yes, except that samba now ships with cups for all flavours, therefore
cups is the default. If you want a non default, you need to edit the
config file.

Ian McWilliam

Reply | Threaded
Open this post in threaded view
|

Re: default samba printing system

Kirill Bychkov
On Sat, September 14, 2013 18:10, Ian McWilliam wrote:

> On 14/09/2013 6:46 PM, Kirill Bychkov wrote:
>> On Sat, September 14, 2013 03:01, Ian McWilliam wrote:
>>> On 14/09/2013 3:27 AM, Kirill Bychkov wrote:
>>>> Hi.
>>>> By default samba is using cups for printing, so it starts to flood in
>>>> logfiles
>>>> with:
>>>> smbd[12245]: [2013/09/13 21:03:48.595183,  0]
>>>> printing/print_cups.c:151(cups_connect)
>>>> smbd[12245]:   Unable to connect to CUPS server localhost:631 - Connection
>>>> refused
>>>> smbd[14345]: [2013/09/13 21:03:48.613769,  0]
>>>> printing/print_cups.c:528(cups_async_callback)
>>>> smbd[14345]:   failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
>>>>
>>>> I suggest to change printing system from cups to bsd to prevent this
>>>> annoying
>>>> messages in logs.
>>>>
>>>> Change MASTER_SITES while here.
>>> No issue with changing master sites but the change in config file
>>> CHANGES THE DEFAULT to BSD not CUPS. Your own admission is "By default
>>> samba is using cups for printing". I don't see the issue that people
>>> wanting bsd style printing actually edit their config file and change it.
>> Yes, my thought is to set BSD by default to get rid of messages about
>> refused
>> connection to CUPS on a fresh setup of samba.
>> printing = cups is hardcoded somewhere, so even if this line is commented
>> out
>> in config file, samba still trying to connect to cups. The easyiest way to
>> override it is to set printing = bsd in config.
>>

cups is not started by default and many of samba users doesn't use it's
printing support at all. So why not change hardcoded cups and spam in logs to
bsd without spam?

> Yes, except that samba now ships with cups for all flavours, therefore
> cups is the default. If you want a non default, you need to edit the
> config file.
>
> Ian McWilliam
>


Reply | Threaded
Open this post in threaded view
|

Re: default samba printing system

Ian McWilliam-2
On 15/09/2013 6:54 AM, Kirill Bychkov wrote:

> On Sat, September 14, 2013 18:10, Ian McWilliam wrote:
>> On 14/09/2013 6:46 PM, Kirill Bychkov wrote:
>>> On Sat, September 14, 2013 03:01, Ian McWilliam wrote:
>>>> On 14/09/2013 3:27 AM, Kirill Bychkov wrote:
>>>>> Hi.
>>>>> By default samba is using cups for printing, so it starts to flood in
>>>>> logfiles
>>>>> with:
>>>>> smbd[12245]: [2013/09/13 21:03:48.595183,  0]
>>>>> printing/print_cups.c:151(cups_connect)
>>>>> smbd[12245]:   Unable to connect to CUPS server localhost:631 - Connection
>>>>> refused
>>>>> smbd[14345]: [2013/09/13 21:03:48.613769,  0]
>>>>> printing/print_cups.c:528(cups_async_callback)
>>>>> smbd[14345]:   failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
>>>>>
>>>>> I suggest to change printing system from cups to bsd to prevent this
>>>>> annoying
>>>>> messages in logs.
>>>>>
>>>>> Change MASTER_SITES while here.
>>>> No issue with changing master sites but the change in config file
>>>> CHANGES THE DEFAULT to BSD not CUPS. Your own admission is "By default
>>>> samba is using cups for printing". I don't see the issue that people
>>>> wanting bsd style printing actually edit their config file and change it.
>>> Yes, my thought is to set BSD by default to get rid of messages about
>>> refused
>>> connection to CUPS on a fresh setup of samba.
>>> printing = cups is hardcoded somewhere, so even if this line is commented
>>> out
>>> in config file, samba still trying to connect to cups. The easyiest way to
>>> override it is to set printing = bsd in config.
>>>
> cups is not started by default and many of samba users doesn't use it's
> printing support at all. So why not change hardcoded cups and spam in logs to
> bsd without spam?

If many users are not using printing then why not disable printing by
default all together instead?


>> Yes, except that samba now ships with cups for all flavours, therefore
>> cups is the default. If you want a non default, you need to edit the
>> config file.
>>
>> Ian McWilliam
>>
>
>
Ian McWilliam

Reply | Threaded
Open this post in threaded view
|

Re: default samba printing system

Kirill Bychkov
On Sun, September 15, 2013 14:42, Ian McWilliam wrote:

> On 15/09/2013 6:54 AM, Kirill Bychkov wrote:
>> On Sat, September 14, 2013 18:10, Ian McWilliam wrote:
>>> On 14/09/2013 6:46 PM, Kirill Bychkov wrote:
>>>> On Sat, September 14, 2013 03:01, Ian McWilliam wrote:
>>>>> On 14/09/2013 3:27 AM, Kirill Bychkov wrote:
>>>>>> Hi.
>>>>>> By default samba is using cups for printing, so it starts to flood in
>>>>>> logfiles
>>>>>> with:
>>>>>> smbd[12245]: [2013/09/13 21:03:48.595183,  0]
>>>>>> printing/print_cups.c:151(cups_connect)
>>>>>> smbd[12245]:   Unable to connect to CUPS server localhost:631 -
>>>>>> Connection
>>>>>> refused
>>>>>> smbd[14345]: [2013/09/13 21:03:48.613769,  0]
>>>>>> printing/print_cups.c:528(cups_async_callback)
>>>>>> smbd[14345]:   failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
>>>>>>
>>>>>> I suggest to change printing system from cups to bsd to prevent this
>>>>>> annoying
>>>>>> messages in logs.
>>>>>>
>>>>>> Change MASTER_SITES while here.
>>>>> No issue with changing master sites but the change in config file
>>>>> CHANGES THE DEFAULT to BSD not CUPS. Your own admission is "By default
>>>>> samba is using cups for printing". I don't see the issue that people
>>>>> wanting bsd style printing actually edit their config file and change it.
>>>> Yes, my thought is to set BSD by default to get rid of messages about
>>>> refused
>>>> connection to CUPS on a fresh setup of samba.
>>>> printing = cups is hardcoded somewhere, so even if this line is commented
>>>> out
>>>> in config file, samba still trying to connect to cups. The easyiest way to
>>>> override it is to set printing = bsd in config.
>>>>
>> cups is not started by default and many of samba users doesn't use it's
>> printing support at all. So why not change hardcoded cups and spam in logs
>> to
>> bsd without spam?
>
> If many users are not using printing then why not disable printing by
> default all together instead?

Is it possible to do at runtime, I think it's not.
If noone is interested in changing printing defaults, I can just commit
MASTER_SITES chunk and remove trailing whitespace in DESCR.

>
>
>>> Yes, except that samba now ships with cups for all flavours, therefore
>>> cups is the default. If you want a non default, you need to edit the
>>> config file.
>>>
>>> Ian McWilliam
>>>
>>
>>
> Ian McWilliam
>


Reply | Threaded
Open this post in threaded view
|

Re: default samba printing system

Ian McWilliam-2
On 16/09/2013 1:13 AM, Kirill Bychkov wrote:

> On Sun, September 15, 2013 14:42, Ian McWilliam wrote:
>> On 15/09/2013 6:54 AM, Kirill Bychkov wrote:
>>> On Sat, September 14, 2013 18:10, Ian McWilliam wrote:
>>>> On 14/09/2013 6:46 PM, Kirill Bychkov wrote:
>>>>> On Sat, September 14, 2013 03:01, Ian McWilliam wrote:
>>>>>> On 14/09/2013 3:27 AM, Kirill Bychkov wrote:
>>>>>>> Hi.
>>>>>>> By default samba is using cups for printing, so it starts to flood in
>>>>>>> logfiles
>>>>>>> with:
>>>>>>> smbd[12245]: [2013/09/13 21:03:48.595183,  0]
>>>>>>> printing/print_cups.c:151(cups_connect)
>>>>>>> smbd[12245]:   Unable to connect to CUPS server localhost:631 -
>>>>>>> Connection
>>>>>>> refused
>>>>>>> smbd[14345]: [2013/09/13 21:03:48.613769,  0]
>>>>>>> printing/print_cups.c:528(cups_async_callback)
>>>>>>> smbd[14345]:   failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
>>>>>>>
>>>>>>> I suggest to change printing system from cups to bsd to prevent this
>>>>>>> annoying
>>>>>>> messages in logs.
>>>>>>>
>>>>>>> Change MASTER_SITES while here.
>>>>>> No issue with changing master sites but the change in config file
>>>>>> CHANGES THE DEFAULT to BSD not CUPS. Your own admission is "By default
>>>>>> samba is using cups for printing". I don't see the issue that people
>>>>>> wanting bsd style printing actually edit their config file and change it.
>>>>> Yes, my thought is to set BSD by default to get rid of messages about
>>>>> refused
>>>>> connection to CUPS on a fresh setup of samba.
>>>>> printing = cups is hardcoded somewhere, so even if this line is commented
>>>>> out
>>>>> in config file, samba still trying to connect to cups. The easyiest way to
>>>>> override it is to set printing = bsd in config.
>>>>>
>>> cups is not started by default and many of samba users doesn't use it's
>>> printing support at all. So why not change hardcoded cups and spam in logs
>>> to
>>> bsd without spam?
>> If many users are not using printing then why not disable printing by
>> default all together instead?
> Is it possible to do at runtime, I think it's not.
> If noone is interested in changing printing defaults, I can just commit
> MASTER_SITES chunk and remove trailing whitespace in DESCR.
>

Yes, at least I thought it was. It's a number of options in the config file.

Try something like this

load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes

You may also want to add a message such that when the port is install
that printing is disabled by default in the config file.

Ian McWilliam