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) ;) |
You can always enable the root account and set a password. Maybe that would solve your problem...
|
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 |
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 ? |
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. |
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 !:scratch:
|
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.md5made 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 chown lp:sys /usr/sbin/chlppasswdRunning 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. |
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 |
Wow, so I discovered the issue!
In my cupsd.conf, I had my authentication type set to: Code:
DefaultAuthType Basic Code:
DefaultAuthType BasicDigest "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". |
All times are GMT -5. The time now is 09:30 AM. |