Bug 332750 - HP scanner only works as root
Summary: HP scanner only works as root
Status: VERIFIED WORKSFORME
Alias: None
Product: openSUSE 10.3
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Final
Hardware: i586 openSUSE 10.3
: P5 - None : Major (vote)
Target Milestone: ---
Assignee: Johannes Meixner
QA Contact: Jiri Srain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 184798
  Show dependency treegraph
 
Reported: 2007-10-10 20:01 UTC by Mads Lundby
Modified: 2007-11-22 19:18 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
y2logs (1.46 MB, application/x-compressed-tar)
2007-10-11 19:27 UTC, Mads Lundby
Details
y2logs (561.32 KB, application/x-compressed-tar)
2007-10-14 22:12 UTC, Alberto Passalacqua
Details
70-scanner.fdi (157.78 KB, text/plain)
2007-10-15 18:54 UTC, Alberto Passalacqua
Details
lshal.txt (122.69 KB, text/plain)
2007-10-15 18:57 UTC, Alberto Passalacqua
Details
Providing information requested in comment #15 (1.93 KB, text/plain)
2007-10-31 14:03 UTC, Alberto Passalacqua
Details
70-scanner.fdi (157.78 KB, text/plain)
2007-11-01 09:58 UTC, Mads Lundby
Details
lshal (43.70 KB, text/plain)
2007-11-01 10:41 UTC, Mads Lundby
Details
out (2.13 KB, text/plain)
2007-11-02 12:39 UTC, Mads Lundby
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mads Lundby 2007-10-10 20:01:02 UTC
I have tried to get the scanner in a HP Photosmart C3180 USB multi-function printer to work with the hpaio driver. I actually succeeded, but the scanner only works, when I'm logged in as root user.

Both Kooka and xsane doesn't seem to access the scanner in "normal" user mode.

Where is the bug, and could you release please release a patch? I obviously seems to be an access permission issue.
Comment 1 Cyril Hrubis 2007-10-11 17:10:39 UTC
Please attach y2logs. If you are in doubt follow:

http://en.opensuse.org/Bugs/YaST

Thanks!
Comment 2 Mads Lundby 2007-10-11 19:27:04 UTC
Created attachment 177868 [details]
y2logs

If more info is needed, please contact me.
Comment 3 Alberto Passalacqua 2007-10-14 22:12:53 UTC
Created attachment 178315 [details]
y2logs

I confirm this issue with HP PSC 2350. I attach YaST logs too, if they can be of help.

Regards,
Alberto
Comment 4 Alberto Passalacqua 2007-10-14 22:14:21 UTC
Considering these scanners are probably among the most used in Linux, I increase severity a bit :-)
Comment 5 Matej Horvath 2007-10-15 12:23:28 UTC
Please post your /etc/hal/fdi/policy/10osvendor/70-scanner.fdi , output of 'hwinfo --scanner' and 'lshal'.
Comment 6 Mads Lundby 2007-10-15 12:32:26 UTC
Unfortunately I am not home in at a least 2 weeks from now! I will post the requested info at that time. I'm truly sorry! 
Comment 7 Alberto Passalacqua 2007-10-15 18:54:55 UTC
Created attachment 178617 [details]
70-scanner.fdi
Comment 8 Alberto Passalacqua 2007-10-15 18:57:57 UTC
Created attachment 178621 [details]
lshal.txt

The hwinfo --scanner command doesn't output anything.

I attached the information you requested before installing the today provided security patch for hplip. After installing the patch, I can start xsane as a user and scan documents, so it seems the patch fixed this issue too.

I'll do some more check, but it seems to work ok now for me.

Regards,
Alberto
Comment 9 Matej Horvath 2007-10-19 12:49:44 UTC
Mads, could you please confirm the hplip patch fixes this issue also for you?
Comment 10 Mads Lundby 2007-10-20 16:51:58 UTC
As soon as I get home. Next monday. I'm sorry. Can you mark it as resolved for the time being?
Comment 11 Matej Horvath 2007-10-26 07:14:10 UTC
#10: ok
Comment 12 Jarl Friis 2007-10-26 13:46:10 UTC
To me, the security patch does not fix the problem.
Comment 13 Jarl Friis 2007-10-26 13:55:11 UTC
I suspect bug#309933 and bug#309933 are related if not duplicates.
Comment 14 Jarl Friis 2007-10-27 21:04:18 UTC
(In reply to comment #13 from Jarl Friis)
> I suspect bug#309933 and bug#309933 are related if not duplicates.
> 

I ment bug#309933 and bug#332750 may be related.
Comment 15 Johannes Meixner 2007-10-30 10:34:32 UTC
Can both of you activate the "set -x" line in
/usr/lib/YaST2/bin/test_and_set_scanner_access_permissions
and then run it as root as
/usr/lib/YaST2/bin/test_and_set_scanner_access_permissions 2>/tmp/out
and attach /tmp/out text/plain attachments to this bug.

Comment 16 Alberto Passalacqua 2007-10-31 14:03:03 UTC
Created attachment 181472 [details]
Providing information requested in comment #15
Comment 17 Johannes Meixner 2007-10-31 14:42:54 UTC
/usr/lib/YaST2/bin/test_and_set_scanner_access_permissions
detects the HP USB device but then
hp-makeuri -s 001:002
seems to result no useful output so that in the end
no entry for your device is written to 
/etc/hal/fdi/policy/10osvendor/80-scanner.fdi

To find out what goes wrong, run
lsusb -d 03f0:
which should result something like
Bus 123 Device 456: ID 03f0:7004 HP Photosmart C3180

Note the actual bus and device numbers and run
hp-makeuri -s 123:456
with your actual bus and device numbers.

For example on my machine:
------------------------------------------------------------------
# lsusb -d 03f0:
Bus 003 Device 017: ID 03f0:0417 HP LaserJet 1220

# hp-makeuri -s 003:017
hpaio:/usb/HP_LaserJet_1220?serial=00XXXXXXXXXX
------------------------------------------------------------------

By the way:
The easiest workaround to get scanner access for normal users
is to use the saned and the net meta-backend on your local host
to access the scanner, for example via "YaST scanner setup" ->
"Other" -> "Scanning via Network" -> "Local Host Configuration".
A little drawback is that now scanning-frontends for root will "see"
the scanner twice. Once directly as "hpaio:..." and a duplicate
via the net meta-backend as "net:localhost:hpaio:...".
Comment 18 Mads Lundby 2007-11-01 09:58:31 UTC
Created attachment 181632 [details]
70-scanner.fdi

This is from another PC (my laptop) - but same problem.
Comment 19 Mads Lundby 2007-11-01 10:41:38 UTC
Created attachment 181641 [details]
lshal

Again. This is the output from my other computer - again, the same problem. 

The hwinfo --scanner command doesn't output anything.
Comment 20 Mads Lundby 2007-11-01 10:42:54 UTC
(In reply to comment #9 from Matej Horvath)
> Mads, could you please confirm the hplip patch fixes this issue also for you?
> 

It doesn't fix the issue. On none of my pc's. Unfortunately. 
Comment 21 Jarl Friis 2007-11-02 06:56:08 UTC
(In reply to comment #15 from Johannes Meixner)
> Can both of you activate the "set -x" line in
> /usr/lib/YaST2/bin/test_and_set_scanner_access_permissions
> and then run it as root as
> /usr/lib/YaST2/bin/test_and_set_scanner_access_permissions 2>/tmp/out
> and attach /tmp/out text/plain attachments to this bug.

I did this as well...

However after doing so, the scanner (OfficeJet G85) is now available to non-root. So I cannot reproduce this bug anymore.

To be honest, I don't know exactly what fixed my problem, but it seems like running /usr/lib/YaST2/bin/test_and_set_scanner_access_permissions fixed the problem. It could  also be that that the security patch + reboot (i.e. restart hplip) solved the problem. Even though I claimed in comment #12 that the security patch (alone) did not fix the problem. I may be wrong here.

If you are still interested in the output of the command let me know, but I don't think it is that interesting anymore since my system works now...
Comment 22 Mads Lundby 2007-11-02 12:39:06 UTC
Created attachment 181792 [details]
out

I did what I was asked to do in #15, but it makes no difference. The user access for the scanner still doesn't work. I've also double checked that the patch is in fact installed... and it is.

I have attached the /tmp/out file.
Comment 23 Johannes Meixner 2007-11-06 10:50:51 UTC
Regarding comment #21:
/usr/lib/YaST2/bin/test_and_set_scanner_access_permissions is run
by YaST for each scanner setup.
I have no idea why it didn't work on the first run.
For some background information see comment #17.

Regarding comment #22:
In attachment #181792 [details] there is the error "lsusb: command not found".
Without "lsusb" it cannot work.
It looks like a messed up system installation
(e.g. "usbutils" RPM not installed or removed).
When you manually remove packages which are installed
in the default system, arbitrary problems can happen.
Comment 24 Mads Lundby 2007-11-06 11:49:06 UTC
(In reply to comment #23 from Johannes Meixner)
> When you manually remove packages which are installed
> in the default system, arbitrary problems can happen.

Instead of when, try if... I don't recall changing or deleting the usbutils package. I did a fresh install from the KDE cd. But who knows... Anyway... I'm on the road (again), so I can't test the scanner. Happy to see the RESOLVED tag, though... :) :)

Comment 25 Jarl Friis 2007-11-22 19:18:42 UTC
As per comment #21 and comment #24 the fix is verified.