Hello,

On Sep 14 08:06 Joe Morris (NTM) wrote (shortened):
> On 09/13/2007 10:34 PM, Johannes Meixner wrote:
> > it seems there is by default no device status via hp-toolbox
> > for normal users which do not have write access to a USB printer
> > even if hpssd runs as root.
> >   
> It works here in 10.2

It works only for all-in-one devices where a scanner is included
and when the scanner unit was set up with YaST.
It does not work out-of-the box for a plain printer.
In the past I fooled myself by testing it with my HP LaserJet 1220
which has a scanner unit.


> > I have HPLIP 2.7.7 running on a AMD 64-bit (X86-64) machine
> > using openSUSE 10.3 (beta2) with a HP DeskJet 3320c USB printer.
>   
> I am running 2.7.7 (from your home repository) on an AMD x86_64 with
> openSUSE 10.2 with a PSC2175.
> > By default it is
> >
> > [EMAIL PROTECTED] lsusb
> > Bus 002 Device 003: ID 03f0:7004 Hewlett-Packard DeskJet 3320c
>    
> [EMAIL PROTECTED]:~> lsusb
> Bus 004 Device 002: ID 03f0:2b11 Hewlett-Packard
> 
> > [EMAIL PROTECTED] ls -l /dev/bus/usb/002/003
> > crw-rw-r-- 1 root lp 189, 130 2007-09-13 15:55 /dev/bus/usb/002/003
>    
> [EMAIL PROTECTED]:~> ls -l /dev/bus/usb/004/002
> crw-rw-r--+ 1 root lp 189, 385 2007-09-14 06:27 /dev/bus/usb/004/002

Note the '+' which indicates the ACL set via HAL/resmgr because
of the scanner unit which grants access for the user who is
locally logged in (i.e. via "console"/XDM/KDM).
Such an ACL is not set for a plain printer.

> > [EMAIL PROTECTED] lpstat -v
> > device for deskjet_3320: hp:/usb/deskjet_3320?serial=TH27T2H35B35
> >   
> [EMAIL PROTECTED]:~> lpstat -v
> device for HP_PSC2175: hp:/usb/PSC_2170_Series?serial=MY3AEF74PF73

Here you see the difference:
My DeskJet 3320 is a plain printer, your PSC 2175 has a scanner
included and I assume you did set up the scanner unit with YaST
which creates a matching HAL/resmgr entry in
/etc/hal/fdi/policy/10osvendor/80-scanner.fdi
 
> > [EMAIL PROTECTED] ps auxw | grep hp
> > root ... hpssd /usr/share/hplip/hpssd.py
> >   
> [EMAIL PROTECTED]:~> ps auxw | grep hp
> root      ... hpssd /usr/share/hplip/hpssd.py
> 
> >
> > When I run hp-toolbox as normal user I get:
> > --------------------------------------------------------------------
> > [EMAIL PROTECTED] hp-toolbox
> >
> > HP Linux Imaging and Printing System (ver. 2.7.7)
> > HP Device Manager ver. 10.0
> >
> > Copyright (c) 2001-7 Hewlett-Packard Development Company, LP
> > This software comes with ABSOLUTELY NO WARRANTY.
> > This is free software, and you are welcome to distribute it
> > under certain conditions. See COPYING file for more details.
> 
> Here it works fine.
> [EMAIL PROTECTED]:~> /usr/sbin/hal-resmgr --list
> UDI /org/freedesktop/Hal/devices/usb_device_3f0_2b11_MY3AEF74PF73_usbraw
> Device /dev/bus/usb/004/002
> Class scanner
> 
> [EMAIL PROTECTED]:~> getfacl /dev/bus/usb/004/002
> getfacl: Removing leading '/' from absolute path names
> # file: dev/bus/usb/004/002
> # owner: root
> # group: lp
> user::rw-
> user:joe:rw-
> group::rw-
> mask::rw-
> other::r--
> 
> [EMAIL PROTECTED]:~> hp-toolbox
> 
> HP Linux Imaging and Printing System (ver. 2.7.7)
> HP Device Manager ver. 10.0
> 
> Copyright (c) 2001-7 Hewlett-Packard Development Company, LP
> This software comes with ABSOLUTELY NO WARRANTY.
> This is free software, and you are welcome to distribute it
> under certain conditions. See COPYING file for more details.
> 
> and it opens and is usable, though for a short instance there is an
> error at first (I assume connection attempt.  There is no info related
> in /var/log/messages.
>
> > But when I do
> >
> > [EMAIL PROTECTED] chmod o+w /dev/bus/usb/002/003
> >
> > [EMAIL PROTECTED] ls -l /dev/bus/usb/002/003
> > crw-rw-rw- 1 root lp 189, 130 2007-09-13 15:55 /dev/bus/usb/002/003
> >
> > and re-start hp-toolbox as normal user, I get the device status.
> >
>    
> I thought that was the importance of hal-resmgr in this mix, so that a
> normal user does have rw access.  Maybe I am not understanding
> something, but I can report it does work as a normal user here with
> openSUSE 10.2

If I had a list of USB product IDs for HP printers, I could create
a matching /etc/hal/fdi/policy/10osvendor/80-HPprinter.fdi file
to grant read/wrire access even for HP printers for locally logged
in users.

If I had a list of USB product IDs for all HPLIP supported devices,
I could create a matching /etc/hal/fdi/policy/10osvendor/70-hplip.fdi
file to grant the access out-of-the box for HPLIP devices even without
the need to do the permission stuff via YaST for HP all-in-one devices.

If there was a list of USB product IDs for all HPLIP supported devices,
even the udev rules would be correct and would no longer set HPLIP
permissions for any HP USB device. In particular no longer read access
for all users for a HP USB mass storage device or a HP USB keyboard.
(If any user can read the keyboard, any user may be able to read the
keystrokes e.g. when the login password is typed.)


Kind Regards
Johannes Meixner
-- 
SUSE LINUX Products GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
AG Nuernberg, HRB 16746, GF: Markus Rex

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
HPLIP-Help mailing list
HPLIP-Help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hplip-help

Reply via email to