Operating System - Linux
1748230 Members
4466 Online
108759 Solutions
New Discussion юеВ

Re: use samba to act as a printing service

 
SOLVED
Go to solution
iinfi1
Super Advisor

use samba to act as a printing service

i understand samba PDC can act as a printing service where in samba users (from remote desktop) can connect to the network printers through samba and print using their designated printers.
can samba keep a log of which user used which printer and how many pages he prints?

secondly, in my environment we have a Linux file server joined to a windows AD domain and windows users connected to the domain.
we need the linux file server to act as a printing service for the domain users and also want the samba to keep a log of how the printer is being used. can samba do it in this scenario?
4 REPLIES 4
Steven E. Protter
Exalted Contributor
Solution

Re: use samba to act as a printing service

Shalom,

The logs in /var/log/samba are pretty detailed. Further you can modify smb.conf and have a higher level of detail in the lobs if you have room for the data.

More:
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/classicalprinting.html

http://tldp.org/LDP/lame/LAME/linux-admin-made-easy/samba-file-and-print.html


SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
iinfi1
Super Advisor

Re: use samba to act as a printing service

thank you steven

is your answer applicable to the second part of my first post also.
i.e i have a linux file server add to a windows AD domain.
in that can the linux fileserver act as a printing service to the users of the windows AD system. i am not an expert in samba n the more i read its docs, more doubts i get.
Matti_Kurkela
Honored Contributor

Re: use samba to act as a printing service

Samba does not really care about the content of print jobs. It just gets a block of data from the printer and passes it on to the print spooler system. Samba does not even attempt to analyze data to see how many pages would be needed to print it.

However, Samba can (and by default, it does) pass the username and IP address of the user that submitted the print job to the print spooler system along with the print job.

The print spooler system (in many modern Linux distributions, it's CUPS) communicates with the printers. In an optimal situation, the communication between the spooler and the printer is two-way, and the printer reports back the actual number of pages printed with is job-complete message.

This way the spooler system can properly account for things like:
- print jobs that include printer commands like "print 3 copies of all pages of this print job" or "shrink the pages and print 2 pages side by side on each sheet of paper in landscape mode"
- pages with overlong lines, causing one page to overflow to two or more pages
- any number of other printing language features that make it non-trivial to determine the number of pages required

In short, Samba may not be the right place to look for printer usage logs: the actual print spooler system can usually do it better.

MK
MK
iinfi1
Super Advisor

Re: use samba to act as a printing service

thank you Matti Kurkela.

by any chance do you know any software based network simulator which actually can virtually add network devices like printers, windows/linux machines etc.
eg if i have a windows and linux machine, this network simulator on a third machine sud be able to show up a few windows/linux machines on the network, a couple network printers etc..