LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-14-2010, 10:33 PM   #1
withanh
LQ Newbie
 
Registered: Sep 2008
Location: In my own private hell
Distribution: Debian
Posts: 9

Rep: Reputation: 0
Question Installing CUPS on Debian Lenny server - no GUI


I'm posting in the noob forum because I am a noob still (at least by my standards). I'm getting better, but still have to ask a lot of questions :-)

I have installed CUPS on my Debian 5 Lenny server. I do not have a GUI installed, only SSH to command line.

I cannot get CUPS to let me browse to the html interface from another machine. I believe that CUPS is running only on localhost because when I run
Code:
netstat -tap | grep cups
I get
Code:
tcp        0      0 localhost:ipp           *:*                     LISTEN      2083/cupsd
tcp6       0      0 localhost:ipp           [::]:*                  LISTEN      2083/cupsd
When I browse (or telnet) to port 631 from another machine it refuses the connection, if I telnet from my Debian server to port 631 it connects.

My cups.conf is
Code:
#
#
#   Sample configuration file for the Common UNIX Printing System (CUPS)
#   scheduler.  See "man cupsd.conf" for a complete description of this
#   file.
#

# Log general information in error_log - change "info" to "debug" for
# troubleshooting...
LogLevel warning

# Administrator user group...
SystemGroup lpadmin


# Only listen for connections from the local machine.
Listen localhost:631
#listen 192.168.2.203
Listen /var/run/cups/cups.sock

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all

# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Restrict access to the server...
<Location />
  Order allow,deny
#  allow localhost
#  allow 192.168.2.*
  allow all
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
#  allow localhost
#  allow 192.168.2.*
  allow all
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Basic
  Require user @SYSTEM
  Order allow,deny
#  allow localhost
#  allow 192.168.2.*
  allow all
</Location>

# Set the default printer/job policies...
<Policy default>
  # Job-related operations must be done by the owner or an administrator...
  <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>

  # All administration operations require an administrator to authenticate...
  <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>

  # All printer operations require a printer operator to authenticate...
  <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 Basic
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
I'm not sure how to make it allow me to browse from another machine that does have a GUI so I can configure a printer.

Thanks!

h
 
Old 09-14-2010, 11:17 PM   #2
brother.sand
LQ Newbie
 
Registered: Oct 2004
Distribution: Debian
Posts: 14

Rep: Reputation: 0
You have tried it with ssl right? I mean httpS://localhost:631 Last I checked CUPS would only allow secured connections.
 
Old 09-14-2010, 11:18 PM   #3
brother.sand
LQ Newbie
 
Registered: Oct 2004
Distribution: Debian
Posts: 14

Rep: Reputation: 0
Sorry, I meant httpS://servername:631

D.
 
Old 09-14-2010, 11:19 PM   #4
withanh
LQ Newbie
 
Registered: Sep 2008
Location: In my own private hell
Distribution: Debian
Posts: 9

Original Poster
Rep: Reputation: 0
Yes, that didn't work either. Of course, I can't https://localhost:631 because localhost is a CLI server only, but if I https://<server-ip>:631 the connection is refused. It's like it's only listening on localhost and not listening on <server-ip>.

h

replied before your correction, but still same deal, https://<server-ip>:631 is no-go.
 
Old 09-14-2010, 11:24 PM   #5
brother.sand
LQ Newbie
 
Registered: Oct 2004
Distribution: Debian
Posts: 14

Rep: Reputation: 0
Another option, use X11 forwarding on the machine you're using to do the config with. So like this:

1. Install Firefox on the Debian server
2. Connect to the Debian server with ssh like this: ssh -X user@servername
3. From the ssh session run: firefox https://localhost:631

The X11 forwarding will cause the display of the firefox session to appear on your client machine. It runs on the Debian server, but displays on your remote machine.

If your remote machine is a Windows machine you can install something like XMing and get the same result.

Cheers,
D.
 
Old 09-14-2010, 11:38 PM   #6
withanh
LQ Newbie
 
Registered: Sep 2008
Location: In my own private hell
Distribution: Debian
Posts: 9

Original Poster
Rep: Reputation: 0
I found the issue, it was in this section:
Code:
# Only listen for connections from the local machine.
Listen localhost:631
#listen 192.168.2.203 #commented out because it didn't help but I wanted to leave it in for reference
Listen /var/run/cups/cups.sock
The 192.168.2.203 is my local workstation, I had tried putting that in to see if it would allow me to connect from this IP, then I thought "wait, that's what it's listening on" so I changed it to
Code:
# Only listen for connections from the local machine.
Listen localhost:631
listen 192.168.2.197:631 #server IP
Listen /var/run/cups/cups.sock
and it works, I can now connect to http://192.168.2.197:631 and get to the printer config. I have added and tested a printer and I'm golden.

Woo hoo!

h

Last edited by withanh; 09-14-2010 at 11:47 PM.
 
  


Reply

Tags
cups, debian


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Installing VMware Tools On Debian Lenny 5.0.2 With Gnome Desktop On ESX Server LXer Syndicated Linux News 0 07-22-2009 02:20 PM
CUPS-gutenprint (with Epson printer) not working on Debian Lenny / Mandriva 2009.1 Hartmut Linux - Newbie 2 05-29-2009 09:58 AM
Debian Lenny: no GUI after install navy80 Linux - Newbie 15 04-13-2009 02:07 PM
LXer: How To Upgrade A Debian Etch System (Server & Desktop) To Debian Lenny LXer Syndicated Linux News 0 02-20-2009 05:30 PM
LXer: The Perfect Server - Debian Lenny (Debian 5.0) [ISPConfig 2] LXer Syndicated Linux News 0 02-19-2009 12:00 PM


All times are GMT -5. The time now is 04:01 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration