# Trying to get a print server up and running

## audiodef

I know the documentation out there is plentiful, but if anyone could describe for me how to set up a printer (an HP Photosmart D5300) on a Gentoo machine to be shared with other Gentoo machines, I'd appreciate it. 

I have the printer working locally from the server. I just can't seem to find or connect it to from other Gentoo machines on my local network.

----------

## audiodef

I keep getting printer destination does not exist errors no matter what I do, despite having followed several guides already. Admittedly, most of them are out of date, but no one seems to have written an updated tutorial. 

This is the best one I've found so far, and followed it didn't fix things for me, although it is well-written. 

http://www.linuxforums.org/articles/howto-fileserver-with-samba-and-printserver-with-cups_52.html

----------

## audiodef

Here is my smb.conf:

```

[global]

netbios name = Handel

server string= Samba Server

workgroup= DEFDRAGON

security = user

encrypt passwords = yes

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

socket options= TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

wins support= yes

hostname lookups = yes

hosts equiv= /etc/hosts

hosts allow = 192.168.1. 127. localhost

hosts deny = All

interfaces = lo eth0

bind interfaces only = yes

guest ok = yes

browse list = yes

printcap name = cups

printing = cups

load printers = yes

max log size = 50

[homes]

   comment = Home Directories

   browseable = no

   writable = yes

[data]

        comment = Data Drive

        browseable = yes

        writeable = yes

        path = /data

[printers]

   comment = All Printers

   path = /var/spool/samba

   browseable = no

   guest ok = yes

   writable = no

   printable = yes

   public = yes

   create mode = 0700

[HP_Photosmart_D5300_series]

comment = Photosmart

printable = yes

path = /var/spool/samba

public = yes

guest ok = yes

printer admin = root 

```

cupsd.conf:

```

ServerName Handel

ServerAdmin root@HandelPrinting

LogLevel warn

SystemGroup lpadmin

# Allow remote access

Port 631

Listen /var/run/cups/cups.sock

# Enable printer sharing and shared printers.

Browsing On

BrowseOrder deny,allow

BrowseAllow @IF (eth0)

BrowseDeny all

BrowseRemoteProtocols CUPS

BrowseAddress @IF eth0

BrowseLocalProtocols CUPS

DefaultAuthType Basic

<Location />

  # Allow shared printing...

     Order deny,allow

   Deny From all

     Allow From 127.0.0.1 192.168.1.*

</Location>

<Location /admin>

  # Restrict access to the admin pages...

   AuthType Basic

   AuthClass System

   Order deny,allow

   Deny From all

   Allow From 127.0.0.1 192.168.1.*

</Location>

<Location /admin/conf>

  AuthType Default

  Require user @SYSTEM

  # Restrict access to the configuration files...

  Order allow,deny

</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 CUPS-Get-Document>

    Require user @OWNER @SYSTEM

    Order deny,allow

  </Limit>

  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>

    AuthType Default

    Require user @SYSTEM

    Order deny,allow

  </Limit>

  <Limit Pause-Printer Resume-Printer 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-Accept-Jobs CUPS-Reject-Jobs>

    AuthType Default

    Require user @SYSTEM

    Order deny,allow

  </Limit>

  <Limit Cancel-Job CUPS-Authenticate-Job>

    Require user @OWNER @SYSTEM

    Order deny,allow

  </Limit>

  <Limit All>

    Order deny,allow

  </Limit>

</Policy>

<Policy authenticated>

  <Limit Create-Job Print-Job Print-URI>

  AuthType Default

  Order deny,allow

</Limit>

  <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 CUPS-Get-Document>

AuthType Default

Require user @OWNER @SYSTEM

Order deny,allow

  </Limit>

  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>

  AuthType Default

  Require user @SYSTEM

  Order deny,allow

    </Limit>

  <Limit Pause-Printer Resume-Printer 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-Accept-Jobs CUPS-Reject-Jobs>

    AuthType Default

    Require user @SYSTEM

    Order deny,allow

      </Limit>

  <Limit Cancel-Job CUPS-Authenticate-Job>

      AuthType Default

      Require user @OWNER @SYSTEM

      Order deny,allow

        </Limit>

  <Limit All>

        Order deny,allow

          </Limit>

</Policy>

```

I'm rather at a loss, I'm afraid. I'd appreciate any help.

----------

## Etal

Why are you sharing pinters between Gentoo machines using Samba?

Have you tried doing it through CUPS?

http://www.cups.org/documentation.php/doc-1.4/sharing.html

----------

## audiodef

I just want to share the printer - I don't care how. 

I checked out that link and followed the instructions, but I'm still left wondering "now what?" When I open cups in a browser on a client machine, how do I add the printer on the server?

----------

