LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 05-04-2006, 07:58 AM   #1
tuxuser19
Member
 
Registered: Oct 2005
Posts: 67

Rep: Reputation: 15
CUPS web interface doesn't open ?


I am trying to enable a local printer to work in my home LAN network so that my second pc can use it via my first pc. I have gone through a very decent tutorial on LQ and very much excited in implementing it, but now I have a problem in opening the CUPS web interface in web browser.

I have tried to open the CUPS web interface by typing http://127.0.0.1:631 at first it asked for user-id and password i tried logged in as "root" but it didn't work and after that I tried with the normal user-'coz I thought Ubuntu doesn't encourage "root" login but I enabled it. Now when I type in teh above URL the web interface doesn't even open!!!!!! Nothing is working! I am really disappointed after trying 4 hours of configuring CUPS config file.

The 2 pc's are running on Ubuntu Breezy. I find Ubuntu's "sudo" thing and disabling by default is annoying a bit...some times I feel like they have created a concept which is a not a big issue in the Linux system! (Sorry if I hurted other Ubuntu fans)
 
Old 05-04-2006, 11:53 AM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
You can always enable the root account and set a password. Maybe that would solve your problem...
 
Old 05-04-2006, 09:04 PM   #3
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
The CUPS web interface is disabled in Ubuntu for security reasons.

To add a printer, use the Gnome Print Manager. It is under the System menu, called Printing. It has a wizard to add a new printer.

Alternatively, I find kdeprint to be better. You can install it using "sudo apt-get install kdeprint", and it will install some of the KDE libraries to make it work. I find this to be a better interface than Gnome's.

I hope this helps
--Ian
 
Old 05-06-2006, 11:48 PM   #4
tuxuser19
Member
 
Registered: Oct 2005
Posts: 67

Original Poster
Rep: Reputation: 15
In fact the printer works fine with the pc to which it is connected. What I want now is to make it network enable so that the other pc's can use it via through the pc to which it is connected.

One more thing i have seen is ( and also I said b4) that the CUPS web interface is not opening when it type in localhost:631, i get a message saying "connection refused when connecting localhost:631".
I thought the CUPS config is stuffed because I made some changes in the cupsd.conf. So I have removed the CUPSYS through 'apt-get remove'
even after removing the CUPSYS I can see the CUPSYS folder in /etc/init.d ? How can it be possible? Does apt-get remove doesn't remove everything ?

Even after reinstalling cupsys through apt-get install cupsys still the cupsys web interface is not opening !!

I have enabled the "root" account as well.

Any suggestions? Or can any one post their cupsys config file ? Is there any other way I can make my local printer to work in my computer network so that otehr pc's can share it ?
 
Old 05-07-2006, 12:04 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I had the same problem in SuSE.
Cups runs as the user "lp", and entering the root name and password in that cups password dialog will not work.
However, you need to be root to save the configuration, so there is a bit of a catch-22 when configuring cups through the web interface.

Instead what you need to do is use the "lppasswd" program to add a user name and password. I would recommend entering your own username and password for the "lppasswd" program. Then use sudo or sux or kdesu to start the browser as root. Use your new cups username/password you entered earlier in the cups password dialog. When it comes to writing the cups.conf file in the end, it will be successful.

Last edited by jschiwal; 05-07-2006 at 12:06 AM.
 
Old 05-07-2006, 06:28 AM   #6
tuxuser19
Member
 
Registered: Oct 2005
Posts: 67

Original Poster
Rep: Reputation: 15
jschiwal, is "lppasswd" program installed on kde or gnome by default or I have to install it 'coz i have searched in Synaptic and on my pc I couldn't find it! May be I am DUMb !
 
Old 07-24-2006, 01:42 AM   #7
geoff_f
Member
 
Registered: May 2003
Location: Canberra, Australia
Distribution: openSUSE 11.3
Posts: 445

Rep: Reputation: 31
CUPS web interface access solved

jschiwal, thank you for the info on 'lppasswd'. I've been having trouble with getting access to the CUPS interface to do administrative tasks. While I could enter a password with the 'lppasswd' command, authentication still failed when trying to enter 'Do Administration Tasks' in the CUPS web interface. Looking into it further, I found that the CUPS password file - /etc/cups/passwd.md5 - had user and group owner as 'root'. Changing those to 'lp' and 'sys' (the same as for the '/usr/bin/lppasswd' command) with:
chown lp:sys /etc/cups/passwd.md5
made authentication succeed (at least with SUSE 10.0). It seems that user 'lp', operating the Cups web interface, was being denied access to the root-owned password file, causing the authentication failure. Changing ownership to 'lp' and 'sys' fixed the permissions problem. Unfortunately, every time the 'lppasswd' command is used, the owners of '/etc/cups/passwd.md5' revert to 'root' and 'root', so the 'chown' command has to be run after the 'lppasswd' command every time it is run. To make things a bit easier, I created a small Bash script to do this automatically:
Code:
#!/bin/bash
# chlppasswd: script to work around 'root' ownership of the CUPS password file,
# /etc/cups/passwd.md5 (which should be owned by 'lp')
# Method is to take same command line arguments as 'lppasswd', invoke that command,
# then 'chown lp:sys /etc/cups/passwd.md5'.
# This uses the same permissions as the /usr/bin/lppasswd command.

PASSWD_MD5=/etc/cups/passwd.md5
LPPASSWD=/usr/bin/lppasswd

parameters=$*

$LPPASSWD $parameters

chown lp:sys $PASSWD_MD5
I named this script 'chlppasswd' and put it in /usr/sbin, then gave it user and group of 'lp' and 'sys', and execute permissions with:
chown lp:sys /usr/sbin/chlppasswd
chmod 755 /usr/sbin/chlppasswd
Running this script will only succeed if run as 'root', as the 'chmod' command is root-owned.

So, after having completed these steps, the procedure is to add your normal <username> and your <password> to the CUPS password file with the command:
chlppasswd -a <username>
then open the browser in Super User mode, browse to 'http://localhost:631', click on 'Do Administration Tasks' and enter your normal username and password (not root's). Authentication should succeed, and you will be able to add and delete printers, etc.

tuxuser19, '/usr/bin/lppasswd' is part of the 'cups-client' package, so if you've got that installed, you should be able to access it.
 
Old 05-16-2014, 08:16 PM   #8
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 503

Rep: Reputation: 46
Thanks, geoff_f; however, that did not work for me on Slackware 14.1 with CUPS 1.5.4.

What's strange is that lppasswd seems to create the wrong md5 checksum.

For example, if I use the example password "testpass1" with lppasswd, it puts "fe5551dcb4de843904b05b6c443a662a" in my passwd.md5 file, yet "echo -n testpass1 | md5sum" produces a different checksum, "0b91dec4fe98266a03b136b59219d0d6". Manually putting that checksum in passwd.md5 still doesn't fix things.

Do I need to reboot or login/logout to fix things? I've tried this before, but to no avail.

thanks
 
Old 05-16-2014, 09:04 PM   #9
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 503

Rep: Reputation: 46
Wow, so I discovered the issue!

In my cupsd.conf, I had my authentication type set to:

Code:
DefaultAuthType Basic
It needs to be:

Code:
DefaultAuthType BasicDigest
From the CUPS manual,
"Basic - Basic authentication should be performed using the UNIX password and group files"
whereas
"BasicDigest - Basic authentication should be performed using the /etc/cups/passwd.md5 file".
 
  


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 Web Interface treedstang Linux - General 1 10-18-2005 05:04 PM
Cups Web Interface not available m-blaster Linux - Software 3 03-27-2005 11:33 AM
disabling the CUPS web interface xmnemonic Linux - Hardware 1 06-04-2004 07:43 PM
cups web interface brasuca Linux - Networking 0 05-31-2004 10:42 AM
cups web interface j-me Linux - Software 3 03-24-2003 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:04 AM.

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