# cpusd | network share for windows [SOLVED]

## HeXiLeD

I am having a weird problem when i try to share my printer from gentoo  to a windows machine.

The same problem happens if i try to do it directly to cupsd or if  i use samba to share the printer.

Basicly what happens; is simple. when using samba i can see the whole network and see the printer.However when i click to add  it  to windows ( win 2003) i am asked for a user and password.

As for trying to add it as a network printer directly  to cups using the URL  add network printer from windows i am also asked for a user and password.

I have tried all the users and passwords that  i thought of, and none works.

I am only interested for now to to use cupsd to share the printer. ( samba is not needed)

Having played around with cupsd i found a some wierd.

Since i ah using https:// to access the printer and the web admin. i have tried to add it as:

https://<ip>/printer/name  and it fails.

The weird thing is  that  i get a connection log on apache ssl access log.

In other words... when windows tries to add the printer using https://<ip>/printer/name it jumps to port 443 and not 631.

Im confused now. Anyway... who the heck is this user and passwd  that windows keeps asking me ???

iI  have changed my confs in many settings and read the wiki about it and i cant figure it out.

Bellow; my example .conf files.

cups # ls

```

certs         classes.conf.O  command.types  cupsd.conf    cupsd.conf.default  mime.convs  ppd            printers.conf.O   ssl

classes.conf  client.conf     cups-pdf.conf  cupsd.conf.O  interfaces          mime.types  printers.conf  pstoraster.convs
```

cupsd.conf

```

#

# Show general information in error_log.

#

LogLevel info

SystemGroup lpadmin

###

  # Only listen for connections from the local machine.

###

Listen localhost:631

Listen /var/run/cups/cups.sock

###

  # Disable printer sharing and shared printers.

###

Browsing On 

 #Change eth0 to your lan connection, just tells where to send printing updates to

BrowseAddress @IF(192.168.0.0/24)

 

 # Only allow printing from LAN.

BrowseAllow @IF(192.168.0.0/24)

 

 # I don't want people on internet to try print using my printer

BrowseDeny All 

 

 #We first stop everyone from printing, then allow only local printing.

BrowseOrder deny,allow

 

DefaultAuthType Basic

###

  # Restrict access to the server...

###

<Location />

  Order allow,deny

  Allow localhost 192.168.0.0/24

</Location>

###

  # Restrict access to the admin pages...

###

<Location /admin>

  Encryption Required

  Order allow,deny

  Allow localhost

</Location>

###

  #

###

<Location /admin/conf>

  Encryption Required

  AuthType Basic

  Require user @SYSTEM

###

  # Restrict access to the configuration files...

###

  Encryption Required

  Order allow,deny

  Allow localhost

</Location>

<Policy default>

  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job>

    Require user @OWNER @SYSTEM

    Order deny,allow

  </Limit>

  <Limit Pause-Printer Resume-Printer Set-Printer-Attributes Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Add-Printer CUPS-Delete-Printer CUPS-Add-Class CUPS-Delete-Class CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default>

    AuthType Basic

    Require user @SYSTEM

    Order deny,allow

  </Limit>

  <Limit CUPS-Authenticate-Job>

    Require user @OWNER @SYSTEM

    Order deny,allow

  </Limit>

###

  # Only the owner or an administrator can cancel a job...

###

  <Limit Cancel-Job>

    Order deny,allow

    Require user @OWNER @SYSTEM

  </Limit>

  <Limit All>

    Order deny,allow

  </Limit>

</Policy>
```

Clients.conf

```

#

# "$Id: client.conf,v 1.9 2005/01/03 19:29:45 user Exp $"

#

#   Sample client configuration file for the Common UNIX Printing System

#   (CUPS).

#

#   Copyright 1997-2005 by Easy Software Products, all rights reserved.

#

#   These coded instructions, statements, and computer programs are the

#   property of Easy Software Products and are protected by Federal

#   copyright law.  Distribution and use rights are outlined in the file

#   "LICENSE.txt" which should have been included with this file.  If this

#   file is missing or damaged please contact Easy Software Products

#   at:

#

#       Attn: CUPS Licensing Information

#       Easy Software Products

#       44141 Airport View Drive, Suite 204

#       Hollywood, Maryland 20636 USA

#

#       Voice: (301) 373-9600

#       EMail: cups-info@cups.org

#         WWW: http://www.cups.org

#

 

########################################################################

#                                                                      #

# This is the CUPS client configuration file.  This file is used to    #

# define client-specific parameters, such as the default server or     #

# default encryption settings.                                         #

#                                                                      #

########################################################################

 

#

# ServerName: the hostname of your server.  By default CUPS will use the

# hostname of the system or the value of the CUPS_SERVER environment

# variable.  ONLY ONE SERVER NAME MAY BE SPECIFIED AT A TIME.  To use

# more than one server you must use a local scheduler with browsing

# and possibly polling.

#

 

#ServerName <none>

 

#

# Encryption: whether or not to use encryption; this depends on having

# the OpenSSL library linked into the CUPS library.

#

# Possible values:

#

#     Always       - Always use encryption (SSL)

#     Never        - Never use encryption

#     Required     - Use TLS encryption upgrade

#     IfRequested  - Use encryption if the server requests it

#

# The default value is "IfRequested".  This parameter can also be set

# using the CUPS_ENCRYPTION environment variable.

#

 

Encryption Always

#Encryption Never

Encryption Required

#Encryption IfRequested

 

 

#

# End of "$Id: client.conf,v 1.9 2005/01/03 19:29:45 mike Exp $".

#

```

printers.conf

```

# Printer configuration file for CUPS v1.2.6

# Written by cupsd on 2006-12-02 04:21

<DefaultPrinter Canon_BJC-2100_USB_1>

Info Canon BJC-2100

Location Gentoo Printer

DeviceURI usb://Canon/BJC-2100

State Idle

StateTime 1165044886

Accepting Yes

Shared Yes

JobSheets none none

QuotaPeriod 0

PageLimit 0

KLimit 0

AllowUser mike

OpPolicy default

ErrorPolicy stop-printer

</Printer>

<Printer Virtual_Printer>

Info PDF Printer

Location Local Printer

DeviceURI cups-pdf:/

State Idle

StateTime 1165044781

Accepting Yes

Shared Yes

JobSheets none none

QuotaPeriod 0

PageLimit 0

KLimit 0

OpPolicy default

ErrorPolicy stop-printer

</Printer>
```

----------

## HeXiLeD

after testing so many things nothing solves the problem so far.

the only error i get is :

"POST /Canon/BJC-2100 HTTP/1.1" 200 124 Get-Printer-Attributes client-error-not-found

----------

## HeXiLeD

I have tried everything  that  i could think about and i cant still add the printer.

Bellow there is a screenshot of the error  i get when i try to add it using samba.

http://www.freethinker.ws/tmp/printer-fail.png

----------

## HeXiLeD

Currently i bought a HP Officejet Pro 8500 All-in-One Printer - A909g

The topic about it can be read HERE

I am using it as a network printer and by consequence this problem is SOLVED since i do not need cups or am using it by USB.

I also used the HP install Network Printer Wizard 7.1 to speed up work and it is fully working

Topic is SOLVED for me.

----------

