fooby Posted May 11, 2006 Posted May 11, 2006 We have many XP clients and a b0rked windows server 2003 print server, never really worked properly. After a bit of googling I haven't found any, but I was wandering if there are any step by step instructions on creating a CUPS print queue and sharing it (via samba?) to the windows clients. Has anybody else done this? thanks fooby
CyberNerd Posted May 11, 2006 Posted May 11, 2006 I'm sort of in the same mind about doing the same, our 2k print server regularly crashes for no apparent reason. I like the idear of all the configs being easily exportable and not needing to pay for extra software. I looked into it but so far have only done it at a small site with one printer. First thing is to get CUPS working - check that all the printers have CUPS drivers that will work (ours are all HP n's so I think we should be ok) CUPS configuration is well documented. Then get samba set up (SAMBA docs cover print sharing) and share the printers, you'll need to add the windows drivers to a samba share so that the clients to pick them up, unless you want to install drivers on all the clients. I assume its then possible to setup winbind so that AD users can authenticate, thus enabling print quotas - but I've not done this bit. Hopefully someone can confirm. probably not for the feint hearted - like I said, we've not done this at our main site yet, and I wouln't recommend this if you have departments who buy rubbish poorly supported printers then insist that they are networked. http://www.linuxprinting.org/kpfeifle/SambaPrintHOWTO/Samba-HOWTO-Collection-3.0-PrintingChapter-11th-draft.html http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/
openhgs Posted May 11, 2006 Posted May 11, 2006 All you need to know (and more!) is on the samba website (http://www.samba.org). Specifically have a look at http://us1.samba.org/samba/docs/man/Samba-HOWTO-Collection/ I can also recommend the O'Reilly book "Using Samba"
Geoff Posted May 11, 2006 Posted May 11, 2006 If your using the Windows drivers for the printers, you don't need CUPS to be able to understand the printers. You just provide RAW printer queues. The alternative is to use the Universal Postscript driver and use the CUPS drivers to translate into a specific printers language. The latter has the advantage of quota management. The former is easier if you are coming from a windows printer server system.
CyberNerd Posted May 11, 2006 Posted May 11, 2006 so is it possible to do quota management via winbind/AD using the CUPS drivers?
Geoff Posted May 11, 2006 Posted May 11, 2006 Bah, had to move rooms.. Damn exams... Anyway. Here's the relevant parts of the smb.conf: [global] load printers = yes security = share printing = cups printcap name = /etc/printcap printer admin = root guest account = nobody [printers] comment = All Printers path = /var/spool/samba browseable = no guest ok = yes writable = no printable = yes printer admin = root print command = lpr -P %p -o raw %s -r lpq command = lpstat -o %p lprm command = cancel %p-%j [PRINT$] path=/var/spool/samba/printers read only = yes browsable = no guest ok = yes So for example, here's how I'd setup the Epson Aculaser 1900C with a raw queue.. [epson] printable = yes guest ok = yes printer driver = EPSON AL-C1900 Advanced print command = lpr -P epson -o raw %s -r Also, there's no default driver for the 1900 in WinXP. So we need to provide one on the samba server in the print$ share. You need to copy the w2k_xp folder off the driver CD into the print$ share to make this work. You also must make sure the 'printer driver' option matches what XP/drivers expects.
Geoff Posted May 11, 2006 Posted May 11, 2006 so is it possible to do quota management via winbind/AD using the CUPS drivers? Yes, CUPS supports per page and per size quotas with time period limits. As I explained you cannot use raw queues with quotas. Nor does CUPS make any distinction between colour and b/w printing (you can get round this by having seperate colour and b/w queues). You will also need to join samba as an AD member and run winbind so that cups can see the windows usernames and groups as native Linux ones. Practically, the easiest way to do it to set default daily limits on printers and then override it for users who need higher/no quotas. Example for the Epson I mentioned earlier: lpadmin -p epson -o job-quota-period=86400 job-page-limit=20 lpadmin -p epson -u @staff -o job-page-limit=50 lpadmin -p epson -u deny:@noprint Means that everyone can only print 20 pages a day. Apart from anyone in the 'staff' group, who can print 50. Anyone who is a member of the 'noprint' group can't print at all to this printer (be careful with this it'll confuse people looking at things from the windows side as it doesn't affect the ACLs). You need to run this script at boot (call it in rc.local for example) and also daily in a cronjob, so if you place it in /etc/cron.d/cron.daily that'll get done for you automagically. Obviously this is a fairly simple example. You can combine these and other options together to make even more complex quotas.
openhgs Posted May 11, 2006 Posted May 11, 2006 Yes, CUPS supports per page and per size quotas with time period limits. As I explained you cannot use raw queues with quotas. Nor does CUPS make any distinction between colour and b/w printing (you can get round this by having seperate colour and b/w queues). CUPS quota is not all that reliable; experience has shown that PDF files only get counted as one page, regardless of how long the print job really is. I'd advice you look at pykota http://www.librelogiciel.com/software/PyKota/Presentation/action_Presentation It works very well and you can do quotaing at the user level if required, which we have found to be very useful.
Joedetic Posted May 11, 2006 Posted May 11, 2006 openhgs, i'd advise you to add the .uk to your TLD on your URL in your profile...currently if you click the little WWW symbol it occassionally pics up some pr0n.
Geoff Posted May 11, 2006 Posted May 11, 2006 CUPS quota is not all that reliable; experience has shown that PDF files only get counted as one page, regardless of how long the print job really is. Like I said, you need to use the universal postscript driver and not raw printing. Or yes, this'll happen. I'd advice you look at pykota http://www.librelogiciel.com/...esentation It works very well and you can do quotaing at the user level if required, which we have found to be very useful. Yeah, I've seen that script before, it basically just automates a lot of what I've said above. Personally I prefer the flexiblity of handcrafting the configuration.
fooby Posted May 12, 2006 Author Posted May 12, 2006 I just had another thought about this one, and have grabbed Karoshi to see how quick / easy i can do it in there. http://www.karoshi.org.uk fooby
Geoff Posted May 12, 2006 Posted May 12, 2006 I don't think you need Karoshi merely for a printer server. Just a basic debian install would be sufficent. Unless you need an excuse to play with Karoshi?
linuxgirlie Posted May 12, 2006 Posted May 12, 2006 oi, he can play with Karoshi as much as he likes...lol
fooby Posted May 12, 2006 Author Posted May 12, 2006 I knew if I said that I would start something......... I'm more of a Fedora / CentOS person, never really used a Debian based distro. If Karoshi sets up as a print server easily / quickly then thats best for me anyway... any excuse to play with Linux is a good excuse fooby
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now