+ Post New Thread
Results 1 to 15 of 15
*nix Thread, CUPS Print server with Windows Clients in Technical; We have many XP clients and a b0rked windows server 2003 print server, never really worked properly. After a bit ...
  1. #1
    fooby's Avatar
    Join Date
    Dec 2005
    Posts
    351
    Thank Post
    0
    Thanked 5 Times in 4 Posts
    Rep Power
    19

    CUPS Print server with Windows Clients

    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

  2. #2


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339

    Re: CUPS Print server with Windows Clients

    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/kpfeifl...1th-draft.html
    http://www.samba.org/samba/docs/man/...TO-Collection/

  3. #3

    Join Date
    Sep 2005
    Location
    Handsworth Grammar School
    Posts
    147
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    18

    Re: CUPS Print server with Windows Clients

    All you need to know (and more!) is on the samba website (www.samba.org). Specifically have a look at http://us1.samba.org/samba/docs/man/...TO-Collection/ I can also recommend the O'Reilly book "Using Samba"

  4. #4

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: CUPS Print server with Windows Clients

    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.

  5. #5


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339

    Re: CUPS Print server with Windows Clients

    so is it possible to do quota management via winbind/AD using the CUPS drivers?

  6. #6

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: CUPS Print server with Windows Clients

    Bah, had to move rooms.. Damn exams...

    Anyway. Here's the relevant parts of the smb.conf:

    Code:
    [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..

    Code:
    [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.

  7. #7

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: CUPS Print server with Windows Clients

    Quote Originally Posted by CyberNerd
    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:

    Code:
    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.

  8. #8


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339

    Re: CUPS Print server with Windows Clients

    thanks Geoff, hope I get time to try this out...

  9. #9

    Join Date
    Sep 2005
    Location
    Handsworth Grammar School
    Posts
    147
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    18

    Re: CUPS Print server with Windows Clients

    Quote Originally Posted by Geoff
    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/softwar...n_Presentation It works very well and you can do quotaing at the user level if required, which we have found to be very useful.

  10. #10
    Joedetic's Avatar
    Join Date
    Jan 2006
    Location
    Walsall
    Posts
    1,316
    Thank Post
    6
    Thanked 13 Times in 13 Posts
    Rep Power
    22

    Re: CUPS Print server with Windows Clients

    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.

  11. #11

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: CUPS Print server with Windows Clients

    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 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.

  12. #12
    fooby's Avatar
    Join Date
    Dec 2005
    Posts
    351
    Thank Post
    0
    Thanked 5 Times in 4 Posts
    Rep Power
    19

    Re: CUPS Print server with Windows Clients

    I just had another thought about this one, and have grabbed Karoshi to see how quick / easy i can do it in there.

    www.karoshi.org.uk

    fooby

  13. #13

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: CUPS Print server with Windows Clients

    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?

  14. #14
    linuxgirlie's Avatar
    Join Date
    Jul 2005
    Location
    Kent
    Posts
    340
    Thank Post
    106
    Thanked 33 Times in 18 Posts
    Rep Power
    31

    Re: CUPS Print server with Windows Clients

    oi, he can play with Karoshi as much as he likes...lol

  15. #15
    fooby's Avatar
    Join Date
    Dec 2005
    Posts
    351
    Thank Post
    0
    Thanked 5 Times in 4 Posts
    Rep Power
    19

    Re: CUPS Print server with Windows Clients

    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

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 4
    Last Post: 20th January 2009, 09:02 PM
  2. Samba/Cups print server
    By Geoff in forum *nix
    Replies: 7
    Last Post: 30th May 2007, 03:52 PM
  3. Replies: 17
    Last Post: 19th April 2007, 12:53 PM
  4. Replies: 1
    Last Post: 18th April 2007, 08:01 AM
  5. Using a Windows XP Client as a Print Server
    By edie209 in forum Windows
    Replies: 15
    Last Post: 8th December 2006, 08:36 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •