# Frustrating problems printing from Gentoo to Windows printer

## quag7

OK, I have been here for a whole weekend trying to figure this out, and I just really have no idea what the problem is.

I have cupsd installed and running.

I have samba installed and running.  Directory/file sharing is working just fine to and from Windows.

What I am trying to do is print from my Linux system to an Epson printer on my Windows machine.

To this end I have been using the KDE 3 Printing manager.  I have also attempted to do it via the web interface in CUPS with the same results.

The problem appears to be authentication.  I have NO IDEA how to pass authentication (user/pw) in order to access my printer.  I can do it manually with the smbclient:

smbclient -L hostname -U username&password

Domain=[QUAGWORKS] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]

        Sharename      Type      Comment

        ---------      ----      -------

        jiggyweek      Disk      GhostDog

        IPC$           IPC       Remote IPC

        D$             Disk      Default share

        print$         Disk      Printer Drivers

        ADMIN$         Disk      Remote Admin

        quagprinter    Printer   EPSON Stylus Photo 780

        C$             Disk      Default share

That lists the printer I'm sharing in Windows 2000 properly.

When I try to set up and print a test page to this printer, I get this in my log:

[12/Aug/2002:02:33:23 -0700] SMB tree connect failed: NT_STATUS_ACCESS_DENIED

E [12/Aug/2002:02:33:23 -0700] Unable to connect to SAMBA host, will retry in 60 seconds...

My smb.conf file has this:

[global]

workgroup = QUAGWORKS

server string = 192.168.1.3 - Gentoo Linux - Celeron 1.2

log file = /var/log/samba/log.%m

max log size = 50

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

printcap name = lpstat

dns proxy = No

hosts allow = 192.168.1/6

printing = cups

encrypt passwords = yes

smb passwd file = /etc/samba/smbpasswd

load printers = yes

guest account = nobody

[printers]

comment = all CUPS printers

path = /var/spool/samba

guest only = yes

writable = no

printable = yes

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

lpq command = lpstat -o %p

lprm command = cancel %p-%j

browseable = Yes

create mask = 0700

/etc/printcap has this entry:

quagprinter:

Which is the appropriate sharename.

What am I missing here?  Where is the authentication specified and/or why is it failing?  I've spent all weekend searching for an answer to this, and I really can't figure out what the problem is.  On the Windows machine I have every username set up that my Linux box has - still no luck.

Any help would be very appreciated.  This has been very frustrating.  I can print from my other Windows machine over the network, and this machine, when it ran Mandrake, could print alright.  Which leads me to believe I'm missing something.

----------

## nE0

Is your WIndows system behind a good firewall ? Then open up the guest account, and give your guest account permissions to print.

Then you won't have to send a username/password anymore.

----------

## quag7

 *nE0 wrote:*   

> Is your WIndows system behind a good firewall ? Then open up the guest account, and give your guest account permissions to print.
> 
> Then you won't have to send a username/password anymore.

 

Done that.  Still same problem.  Thanks for the suggestion though.

----------

## y0-y0

- are your smblient / nt passwords in sync? (both) (using the right password encoding on both sides? eg, clear - clear, encrypt - encrypt ?)

- is there  a restriction on the printer side? (nt side) are the ACL's maybe set too tight? (nt side)

----------

## ajaustin

I think that I have found an answer to this.  Looking in the smbspool manual that is included in the Samba documentation provided on the "HOME" page of SWAT, there is a clue:

 *Quote:*   

> DEVICE URI: ... smb://username:password@server/printer 

 

This seems to be the way in which username and password get to the the WinXP box.  I typed the URI with my user name, password, server, etc into the appropriate place in the CUPS "Add Printer" dialogue.  This then turned up in my /etc/cups/printers.conf.

The best bit was that I was actually able to start printing from my Gentoo box to my LaserJet 4 on my WinXP box.  :Very Happy: 

What I think I need to do now is set up a user on the WinXP box just for printing.

----------

## gatiba

For me now my Epson C62 seems correctly finded by cups over samba.

But when i click on Print Test Page on the cups web interface, the job is aborted with this error !

```
client-error-not-possible
```

What's this ?

----------

## peaceful

I have the same problem trying to print to an HP952c over samba.  Using smbclient I can list the shares just fine, but when I enter the info into the CUPS web-gui, I get "client-error-not-possible"

Anyone know how to get past this?  Samba and cups seem to work separately, just not together.

----------

## paladin-zero

 *Quote:*   

> I think that I have found an answer to this. Looking in the smbspool manual that is included in the Samba documentation provided on the "HOME" page of SWAT, there is a clue:
> 
> Quote:
> 
> DEVICE URI: ... smb://username:password@server/printer
> ...

 

Excellent, I can print to a printer on XP home from my gentoo laptop. However, I don't need a password to log on to the XP box, nor to print from smbclient. Why does cups need my account information? And is there a way to set up the printer so the username and password have to be entered, rather than being hard coded into cups?

At anyrate, it is a big improvement to be able to print.

----------

