LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-20-2007, 02:13 AM   #1
nominruil
LQ Newbie
 
Registered: Mar 2005
Distribution: gentoo
Posts: 17

Rep: Reputation: 0
CUPS Remote Administration


How can administer CUPS server through its web-GUI on another machine inside the LAN? I've appended the 'Allow From All' under <Location /admin> category yet the connection cannot be established.

I can not enable remote administration through the GUI on the local machine because I only have the program links for browsing (it's a pure server, no X, so no Mozilla) and although the GUI does load, it does not let change anything without authentication, which links does not ask for.
 
Old 06-20-2007, 02:37 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Have you opened port 631 on your firewall?
 
Old 06-20-2007, 02:50 AM   #3
nominruil
LQ Newbie
 
Registered: Mar 2005
Distribution: gentoo
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by billymayday
Have you opened port 631 on your firewall?
Both machines are on the same lan so that is irrelevant.

Sorry if that sounded a bit harsh, bit annoyed with the problem.

Last edited by nominruil; 06-20-2007 at 04:24 AM.
 
Old 06-20-2007, 03:51 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Quote:
Originally Posted by nominruil
Both machines are on the same lan so that is irrelevant.
It is relevent if the hosts themselves have firewalls (netfilter).

I enabled remote administration via the cups web interface to examine the config file:
Code:
sed -n '1,29p' cupsd.conf1
# Show general information in error_log.
LogLevel info
SystemGroup sys root
# Allow remote access
Port 631
Listen /var/run/cups/cups.sock
# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow @LOCAL
DefaultAuthType Basic
<Location />
  # Allow remote administration...
  Order allow,deny
  Allow @LOCAL
</Location>
<Location /admin>
  Encryption Required
  # Allow remote administration...
  Order allow,deny
  Allow @LOCAL
</Location>
<Location /admin/conf>
  AuthType Basic
  Require user @SYSTEM
  # Allow remote access to the configuration files...
  Order allow,deny
  Allow @LOCAL
</Location>
Here is the same part when remote administration wasn't enabled:
Code:
sed -n '1,29p' cupsd.conf2
# Show general information in error_log.
LogLevel info
SystemGroup sys root
# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock
# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow @LOCAL
DefaultAuthType Basic
<Location />
  # Restrict access to the server...
  Order allow,deny
  Allow localhost
</Location>
<Location /admin>
  Encryption Required
  # Restrict access to the admin pages...
  Order allow,deny
  Allow localhost
</Location>
<Location /admin/conf>
  AuthType Basic
  Require user @SYSTEM
  # Restrict access to the configuration files...
  Order allow,deny
  Allow localhost
</Location>
Here is the diff between the two:
Code:
diff cupsd.conf1 cupsd.conf2
4,5c4,5
< # Allow remote access
< Port 631
---
> # Only listen for connections from the local machine.
> Listen localhost:631
13c13
<   # Allow remote administration...
---
>   # Restrict access to the server...
15c15
<   Allow @LOCAL
---
>   Allow localhost
19c19
<   # Allow remote administration...
---
>   # Restrict access to the admin pages...
21c21
<   Allow @LOCAL
---
>   Allow localhost
26c26
<   # Allow remote access to the configuration files...
---
>   # Restrict access to the configuration files...
28c28
<   Allow @LOCAL
---
>   Allow localhost
After making the change I was able to remotely adminster CUPS from another machine in a web browser.

If you have an ssh connection to the server, you could use a text based browser such as links. Browse to http://localhost:631
Press the down arrow until you get to the Administration Tab and press enter. Then press the down arrow until you get to the "Allow Remote Administration" box and press enter. Press the down arrow to "Change Settings" and press enter. You may need to enter the root username and password. After that, you should be able to connect remotely via the web browser ( https://hostname:631 )

Last edited by jschiwal; 06-20-2007 at 04:05 AM.
 
Old 06-20-2007, 04:20 AM   #5
nominruil
LQ Newbie
 
Registered: Mar 2005
Distribution: gentoo
Posts: 17

Original Poster
Rep: Reputation: 0
Thank you very very much, thanks for taking the time to help me out, thats exactly the kind of thing that would help

That code listing helped me Fix it, too bad the documentation didn't list some of if...

Last edited by nominruil; 06-20-2007 at 04:29 AM.
 
Old 06-20-2007, 04:55 AM   #6
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
You'd be surprised how many solutions are as simple as firewalls and SELinux - as jschiwal points our, same lan or not same lan.


Anyway, wasn't near a linux box before.


Here's another snip from a cupsd.conf

# Restrict access to the server...
<Location />
Order allow,deny
Allow 192.168.1
</Location>
 
Old 06-08-2012, 10:46 AM   #7
linuxandtsm
Member
 
Registered: May 2011
Posts: 194

Rep: Reputation: Disabled
Thumbs up

Hi jschiwal,

Great reply from you...you just solved my problem that i am struggling to solve in few simple steps with clean explanation!.
I just re-opened this thread to thank you!

PS:sorry for re-opening an old thread
 
  


Reply



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
CUPS Administration with USB Printer Dymitry Linux - Hardware 4 12-14-2006 09:44 PM
CUPS web-administration interface on SuSE 9.1 LUB997 Linux - Hardware 1 03-09-2005 02:16 AM
remote cups printing to a smb/cups print server? justanothergeek Linux - Networking 2 09-15-2004 08:31 AM
Remote Administration DavidPhillips Linux - General 4 04-13-2002 01:58 PM
REmote Administration gblydenburgh Linux - General 4 06-27-2001 08:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:16 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration