Debian Planet

Welcome to Debian Planet


Apt-get into it.
Main Menu

  • Home

  • Topics

  • Web Links

  • Your Account

  • Submit News

  • Stats

  • Top 10

  • Debian

    These are important Debian sites one should not be without!

  • Official Debian site

  • Package search

  • Mailing list archives

  • Bug reports

  • Debian on CD

  • Unofficial woody CD ISOs

  • Unofficial APT sources

  • Developers' Corner

    Other great Debian news sources:

  • Debian Weekly News

  • Kernel Cousin Debian

    (Debian mailing lists digested)
  • Community Groups

    Need help? You're not alone on this planet.

  • debianHELP

    (User support site)

  • Debian International



  • EsDebian


  • DebianWorld


  • MaximumDebian


  • DebianUsers


  • Debian-BR


  • IRC

    The place to get help on a Debian problem (after reading docs) or to just chat and chill is #debian on

    Many of the Debian Planet staff live there so pop by and say hello.

    Wanna write?

    Got that latest or greatest scoop? Perhaps you have some important news for the Debian community? Submit a news item!

    Or perhaps you've written a rather ground breaking insight into some aspect of Debian and you feel compelled to share it with others? Knock up a longer editorial article and send it to the editors.


    DP is sponsored by Xinit Systems and

    Domains paid for and hosted by

    Buy your Debian merchandise at

    Who's Online

    There are currently, 64 guest(s) and 5 member(s) that are online.

    You are Anonymous user. You can register for free by clicking here.

    CUPS and Samba problems
    Contributed by jocknerd on Thursday, January 03 @ 08:49:56 GMT

    I've set up CUPS on my Debian system at home. I've installed the cupsys, cupsys-client, cupsys-bsd, cupsys-pstoraster, and cupsys-driver-gimpprint packages. I've got an Epson Stylus Color 600 connected to my machine's /dev/lp0 port. Printing works great from here. But I'm having trouble printing from my wife's Windows 2000 machine. I've configured Samba to make the printer available with the following lines:

    DanielS: I was never able to convince CUPS to work with my remote (hosted on WinNT) printer, because it had both a space and amphersand in the name; I just use lprng and a modified version of smbprint.

    printing = cups
    printcap name = lpstat

    browseable = yes
    path = /var/spool/cups
    printer name = epson600
    writable = yes
    public = yes
    create mode = 0777
    printable = yes
    print command = lp -P %p -o raw %s
    lpq command = lpstat -o %p
    lprm command = cancel %p-%j

    I noticed when cups is installed that the cups spooling directory has the following permissions:
    drwx------ 3 lp sys
    I saw from the cups website that it normally installs as root owner and lp group with 777 rights.

    This causes a problem when I try to install the printer on my wife's Windows 2000 machine. It says Access Denied. So I change the permissions on the /var/spool/cups to be 777 with owner root and group lp. Then I add my wife to the lp group. This seems to work somewhat. She can now print, even though it still says access denied to the printer. But she can't delete print jobs. Plus, whenever I restart cups it reverts back to the old permission settings.

    Has anyone else setup Cups to work with Samba printing? What's the secret?

    Related Links

  • Debian Homepage
  • SPI Inc.
  • More about Debian
  • News by DanielS

    Most read story about Debian:
    Xpdf and PDF copy-control

    Last news about Debian:

    Printer Friendly Page  Send this Story to a Friend
  • "CUPS and Samba problems" | Login/Create Account | 9 comments

    The comments are owned by the poster. We aren't responsible for their content.

    Re: CUPS and Samba problems (Score: 1)
    by Norad on Thursday, January 03 @ 11:09:13 GMT
    (User Info)

    I have a similar setup, I also use CUPS with an Expson printer at /dev/lp0, but when you want to print from W2k or Wxp you don't need Samba at all 🙂

    From W2k onwards you can print directly to CUPS, because Windows supports the IPP. All you have to do is to add the printer as an internet-printer and entering http://:631/printers/. Of course you should change the accessrights in your cupsd.conf.

    I don't know if this helps you but it works well for me ...

    [ Reply ]

    Re: CUPS and Samba problems (Score: 0)
    by Anonymous on Thursday, January 03 @ 14:27:47 GMT

    I also had this problem when printing with cups to a win2k share. To do this, I replaced smbspool by this script, then it worked. Beware, as it may not work when printing multiple copies of the same document - or add a loop in the sending code.

    #! /usr/bin/python

    import os,sys,tempfile,time

    if(len(sys.argv)    sys.stderr.write("ERROR: Hello.





            del sys.argv[0]




            except KeyError:

                sys.stderr.write("ERROR: Cannot find URI.














        sys.stderr.write("ERROR: Missing arguments.













    except ValueError:


    if(a    a=1




    argus.extend(['-c','put '+fichier])








    [ Reply ]

    Re: CUPS and Samba problems (Score: 1)
    by jimnutt ( on Thursday, January 03 @ 17:06:53 GMT
    (User Info)

    Ahhh! A problem I can help solve. I had the same problem, slightly different printer (and connected to the usb port). I could print locally, but not from a win2k box. It required two things to fix, one was to add the complete path to the print, lpq and lprm commands. The other had to do with the "use client driver" setting under the advanced settings. With it set one way, the win2k box would show access denied, the other way it works. Unfortunately, I don't have access to my home machines at the moment and can't give exact details.


    [ Reply ]

    Re: CUPS and Samba problems (Score: 0)
    by Anonymous on Thursday, January 03 @ 23:19:43 GMT

    I've been through this too many times. Try this, or similar:


    path = /tmp

    printable = Yes

    printing = cups

    print command = lpr -r -o raw -P'%p' %s

    printer name = WhateverYourCupsPrinterNameIs

    use client driver = Yes

    [ Reply ]

    Re: CUPS and Samba problems (Score: 0)
    by Anonymous on Thursday, January 03 @ 23:55:30 GMT

    I had the same problem. I tried using the "cool" Internet Printing Protocol (IPP) and SMB (Samba). Both had the same problem, I could only print with a PostScript driver. The solution was to edit the /etc/cups/filters or whatever file. There is a section where it is optional to allow RAW printing. This is needed if you are going to use a windows driver. Hope this helps.

    By the way, if you have Win98 or above I recommend IPP, it seems more reliable.


    [ Reply ]

    Re: CUPS and Samba problems (Score: 0)
    by Anonymous on Monday, January 07 @ 20:28:39 GMT

    I had the exact same problem (except WinXP instead of Win2k). Changing the following line in smb.conf seemed to correct it:

    printcap name = /etc/printcap.cups

    Worked for me.

    [ Reply ]

    Re: CUPS and Samba problems (Score: 0)
    by Anonymous on Thursday, January 10 @ 00:06:22 GMT

    here is the secret, because i tried everything also

    this is what i did, and this what you need

    the key i think is the printcap name change

    you should not need any of the lp* stuff

    works with win98


    printing = cups

    ; printcap name = /etc/printcap

    printcap name = cups


    comment = All Printers

    browseable = yes

    path = /var/spool/samba

    printable = yes

    public = yes

    writable = no

    create mode = 0700

    [ Reply ]

    Based on: PHP-Nuke

    All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2000 by Debian Planet

    You can syndicate our news using the file backend.php.