Hardy RC CUPS crashes during printer installation with lynx

Bug #221087 reported by Dennis Cardinale
12
Affects Status Importance Assigned to Milestone
cupsys (Ubuntu)
Invalid
Undecided
Jamie Strandboge

Bug Description

I am trying to build a headless file/print server for my home network. Decided to use Ubuntu Hardy 8.04 RC on Pentium III 500MHz. Printer is HP Office Jet G85 on USB. No GUI, so trying to use lynx for setup. Upon "Add Printer", CUPS crashes. Must restart cupsys, but no printer installed. I tried using lpadmin to install printer, but I cannot figure out how to install/find driver.

-----------------------------------------------

$ lpinfo -v
network socket
network beh
direct hpfax
direct hp
network http
network ipp
network lpd
direct parallel:/dev/lp0
direct parallel:/dev/lp1
direct scsi
network smb
dennis@hserve:~$ lpinfo -v
network socket
network beh
direct hpfax
direct usb://HP/OfficeJet%20G85?serial=SGG0CE2D6FVL
direct hp:/usb/OfficeJet_G85?serial=SGG0CE2D6FVL
network http
network ipp
network lpd
direct parallel:/dev/lp0
direct parallel:/dev/lp1
direct scsi
network smb

-----------------------------------------------

$ sudo /etc/init.d/cupsys restart
 * Restarting Common Unix Printing System: cupsd [ OK ]

I get this message immediately upon restart:

$ sudo tail /var/log/messages
Apr 23 11:14:51 hserve kernel: [56130.081309] audit(1208963691.159:6): type=1503 operation="inode_permission" requested_mask="a::" denied_mask="a::" name="/dev/tty" pid=5720 profile="/usr/sbin/cupsd" namespace="default"

-----------------------------------------------

$ lynx localhost:631

<SELECT ADMINISTRATION>

Printers

   Add Printer Find New Printers Manage Printers

<SELECT ADD PRINTER>

Available Printers

          * Add This Printer HP OfficeJet G85 (HP OfficeJet G85 USB #1)
          * Add This Printer HP OfficeJet G85 (HP OfficeJet G85 USB
            SGG0CE2D6FVL HPLIP)

<SELECT FIRST OPTION>

Add New Printer

     Name: HP_OfficeJet_G85_USB_1__________________
               (May contain any printable characters except "/", "#", and space)
   Location: Local Printer___________________________
               (Human-readable location such as "Lab 1")
  Description: HP OfficeJet G85________________________
               (Human-readable description such as "HP LaserJet with Duplexer")
               Continue

<SELECT CONTINUE>

Model/Driver for HP_OfficeJet_G85_USB_1

   Model:
   [HP OfficeJet G85 - CUPS+Gutenprint v5.0.2 (en)______________________________
______________.........]
   Or Provide a PPD File: ____________________
   Add Printer

<SELECT ADD PRINTER>
<ENTER USERNAME>
<ENTER PASSWORD>

"Alert: Unable to connect to host"

-----------------------------------------------

CUPS is now crashed.

$ sudo /etc/init.d/cupsys status

Status of Common Unix Printing System: cupsd is not running but /var/run/cups/cupsd.pid exists.

$ sudo tail /var/log/messages

Apr 23 12:16:34 hserve kernel: [59832.326772] audit(1208967394.759:7): type=1503 operation="inode_permission" requested_mask="rw::" denied_mask="rw::" name="/var/lib/samba/secrets.tdb" pid=5720 profile="/usr/sbin/cupsd" namespace="default"
Apr 23 12:16:34 hserve kernel: [59832.329176] audit(1208967394.759:8): type=1503 operation="inode_permission" requested_mask="rw::" denied_mask="rw::" name="/var/lib/samba/passdb.tdb" pid=5720 profile="/usr/sbin/cupsd" namespace="default"
Apr 23 12:16:34 hserve kernel: [59832.330656] audit(1208967394.759:9): type=1503 operation="inode_permission" requested_mask="rw::" denied_mask="rw::" name="/var/lib/samba/passdb.tdb" pid=5720 profile="/usr/sbin/cupsd" namespace="default"
Apr 23 12:16:34 hserve kernel: [59832.332537] audit(1208967394.759:10): type=1503 operation="inode_permission" requested_mask="rw::" denied_mask="rw::" name="/var/lib/samba/secrets.tdb" pid=5720 profile="/usr/sbin/cupsd" namespace="default"
Apr 23 12:16:34 hserve kernel: [59832.334145] audit(1208967394.759:11): type=1503 operation="inode_permission" requested_mask="rw::" denied_mask="rw::" name="/var/lib/samba/secrets.tdb" pid=5720 profile="/usr/sbin/cupsd" namespace="default"
Apr 23 12:16:34 hserve kernel: [59832.343104] audit(1208967394.769:12): type=1503 operation="inode_permission" requested_mask="Ux::" denied_mask="Ux::" name="/usr/share/samba/panic-action" pid=5860 profile="/usr/sbin/cupsd" namespace="default"

Revision history for this message
Dennis Cardinale (dennis-core-enterprises) wrote :

This installation is from Ubuntu 8.04 RC Server iso.

Revision history for this message
ilektron (robotoman) wrote :

I have the same problem with the actual release for Hardy Heron.

here is my /var/log/cups/error_log

E [30/Apr/2008:19:19:58 -0600] CUPS-Add-Modify-Printer: Unauthorized
E [30/Apr/2008:19:23:45 -0600] CUPS-Add-Modify-Printer: Unauthorized
E [30/Apr/2008:19:24:23 -0600] CUPS-Add-Modify-Printer: Unauthorized
E [30/Apr/2008:19:25:22 -0600] CUPS-Add-Modify-Printer: Unauthorized
E [30/Apr/2008:19:29:13 -0600] CUPS-Add-Modify-Printer: Unauthorized
E [30/Apr/2008:19:32:12 -0600] CUPS-Add-Modify-Printer: Unauthorized
E [30/Apr/2008:19:39:58 -0600] CUPS-Add-Modify-Printer: Unauthorized
E [30/Apr/2008:19:45:49 -0600] CUPS-Add-Modify-Printer: Unauthorized

But I know that the user I supplied is in the lpadmin group. This worked fine in Gutsy.

Revision history for this message
ilektron (robotoman) wrote :

I forgot to add, that this happens using both the command line www-browser and firefox beta 3 from a remote system, so I don't think that is browser specific.

Revision history for this message
ilektron (robotoman) wrote :

Alright, I found another bug and running the following let me at least add the printer. I don't know app-armor, so I really don't know what this command does.

$ sudo aa-complain cupsd

Revision history for this message
Magnus Hjorth (magnus-hjorth) wrote :

I had the exact same problem with 8.04 server edition. I solved it by adding some lines to /etc/apparmor.d/usr.sbin.cupsd:

#include <abstractions/samba>
/var/lib/samba/* rwk,
/usr/share/samba/panic-action Pxr,

Revision history for this message
Jeldert (jeldert) wrote :

I can confirm this bug. Using a clean install of Ubuntu 8.04 Server.

However, after trying to add a printer cupsd also stopped working:
/etc/init.d/cupsys status
Status of Common Unix Printing System: cupsd is not running but /var/run/cups/cupsd.pid exists.

I tried both aa-complain, and the modifications in /etc/apparmor.d/usr.sbin.cupsd, but it is still the same.

Changed in cupsys:
status: New → Confirmed
Revision history for this message
Dennis Cardinale (dennis-core-enterprises) wrote :

Modified /etc/apparmor.d/usr.sbin/cupsd

Cups still crashes when adding printer (same messages)

Do: $ sudo /etc/init.d/apparmor restart
       $ sudo /etc/init.d/cupsys restart

Cups still crashes when adding printer (same messages)

Do: $ sudo aa-complain cupsd
       $ sudo /etc/init.d/cupsys restart

Printer installed sucessfully!

For some reason, printer don't print....but that is probably something else, I hope.

BTW, $ sudo /etc/init.d/cupsys restart still gives message:

May 1 20:34:37 hserve kernel: [90225.357198] audit(1209688477.984:18): type=1502 operation="inode_permission" requested_mask="a::" denied_mask="a::" name="/dev/tty" pid=8253 profile="/usr/sbin/cupsd" namespace="default"

so something is still broken. I don't know apparmor. Not a clue.

Will this issue be assigned and resolved anytime soon? If not, will revert to Gutsy.

Revision history for this message
Chris Vigelius (chris-vigelius) wrote :

Notice: this seems to be the same problem as described #217787, whereas the later contains a patch which worked for me (I can add printers and print test pages now, Hardy release/I386).

Steps to solve problem:

1.) download http://de.archive.ubuntu.com/ubuntu/pool/main/a/apparmor/apparmor_2.1+1075-0ubuntu9.1_i386.deb ( or http://de.archive.ubuntu.com/ubuntu/pool/main/a/apparmor/apparmor_2.1+1075-0ubuntu9.1_amd64.deb, depending on your architecture )

2.) install downloaded package with "dpkg -i"

3.) /etc/init.d/cupsys restart

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 217787, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Feel free to continue to report any other bugs you may find.

Changed in cupsys:
assignee: nobody → jdstrand
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.