Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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 )
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.