USB hplip scanner - user permissions issue - only root can scan
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
USB hplip scanner - user permissions issue - only root can scan
Hi all,
First thread here so I hope this is the good subforum, not really hardware related issue as the scanner works (tested as root) and not really software either... My guess it's all about permissions/groups...
I want to share an HP Photosmart C4100 series scanner connected via USB to a server box running ClearOS... (CentOS)
So far I have connected the scanner, installed hplip & sane...
Root user is able to see the scanner... and scan from it...
Sane deamon is installed and running, I can connect to it from a remote system.
Quote:
[root@local ~]# uname -a
Linux local 2.6.18-194.8.1.v5 #1 SMP Thu Jul 15 01:14:04 EDT 2010 i686 i686 i386 GNU/Linux
[root@local ~]# lsusb
Bus 001 Device 004: ID 03f0:5711 Hewlett-Packard PhotoSmart C4100 series
Bus 001 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
[root@local ~]# scanimage -L
device `hpaio:/usb/Photosmart_C4100_series?serial=MY71IH724R05J7' is a Hewlett-Packard Photosmart_C4100_series all-in-one
[root@local ~]#
My problem however is that no user apart from root detects the scanner... This Linux distribution has no groups like scanner or usb...
Quote:
djeeke@local:~$ scanimage -L
No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
djeeke@local:~$
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Rep:
I have a H-P Photosmart C4680, essentially the same thing you've got. The way it seems to want to work is that my user ID is included the these groups:
You won't care about vboxusers and cvs but you do care about lp and scanner. If you don't have a scanner group, add it with a unique GID (you can do that with vi, by the way); 93 in this case. I then use xsane to scan.
Once you've got it going, you'll have a .sane directory in your home directory:
My test account on the ClearOS box is added to the new 'scanner' group and I do see the scanner !
Quote:
scanner:x:93:root,saned,xinetd,djeeke
Quote:
[djeeke@local ~]$ /sbin/lsusb
Bus 001 Device 010: ID 03f0:5711 Hewlett-Packard PhotoSmart C4100 series
Bus 001 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
[djeeke@local ~]$ scanimage -L
device `hpaio:/usb/Photosmart_C4100_series?serial=MY71IH725R04J7' is a Hewlett-Packard Photosmart_C4100_series all-in-one
[djeeke@local ~]$
Next issue is the remote connection...
I have saned running, when connecting from a remote system I see the incoming connection in /var/log/messages :
Quote:
May 19 13:11:52 local xinetd[7860]: START: sane-port pid=27174 from=10.8.0.10
May 19 13:11:52 local xinetd[7860]: EXIT: sane-port status=0 pid=27174 duration=0(sec)
But I do not see the scanner : scanimage -L output from my ubuntu :
Quote:
djeeke@djeeke-laptop:~$ scanimage -L
No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
djeeke@djeeke-laptop:~$
I have tried adding saned and xinetd to the scanner group as well but no luck...
I'm one step away from having this working now !
Can someone push me in the right direction ?
Thanks
Last edited by djeeke; 05-26-2011 at 05:16 AM.
Reason: typo
I found some information but it's above my head and I don't know if it's relevant or not ...
Could someone explain what the following file is about ?
/etc/udev/rules.d/60-libsane.rules
It does list some scanners (mine is not included)...
Same with
/etc/udev/rules.d/55-hpmud.rules
I guess I might need a udev crashcourse ;-)
Last edited by djeeke; 05-19-2011 at 07:52 AM.
Reason: added some info ...
I recently had something similar with my HP OfficeJet 8500. What I found was if I tried to set up the printer directly through CUPS, the scanner wasn't seen by sane/xsane. However, if I set up the printer using hp-setup, that produced the proper configuration in CUPS for the scanner to be seen.
What kind of URL is CUPS using to try and connect to the printer? I know it is kind of fishing, but I've never had any problems like this with a HP scanner set up by hp-setup. By the way, I can't imagine that you would have to mess with udev. I may be wrong, but it seems more like a driver-level issue to me.
Well yes I hope I have made 'beginner' error like forgetting to power on the system ;-)
thanks for thinking with me...
CUPS does not seem to be the issue... Printing works fine... It is a sane/saned issue...
On my test ubuntu 'client' system /etc/sane.d/net.conf has 192.168.0.254 as single entry
on the 'server' /var/log/messages shows up the following at each connectivity attempt through 'telnet on port 6566' or 'scanimage -L' from the client system :
Quote:
May 26 12:09:00 local xinetd[30197]: START: sane-port pid=21879 from=10.8.0.10
May 26 12:09:00 local xinetd[30197]: EXIT: sane-port status=0 pid=21879 duration=0(sec)
on the server system, my saned.conf file allows access from three subnets:
CUPS does not seem to be the issue... Printing works fine... It is a sane/saned issue...
Sorry, I should have explained my thinking a bit more. When I was having problems with my Officejet, one of the clues was that CUPS was connecting with the wrong URL. Like you, I could print but not scan. When I dug into it, I found that the setup had been goofed up, and running hp-setup was the key. Now I do realize that you have run hp-setup, but I'm trying to look for clues.
Quote:
I checked and my test user djeeke and saned user are part of lp and scanner groups...
from the 'group' file :
Are you in both groups on both the client and the server?
Sorry, I should have explained my thinking a bit more. When I was having problems with my Officejet, one of the clues was that CUPS was connecting with the wrong URL. Like you, I could print but not scan. When I dug into it, I found that the setup had been goofed up, and running hp-setup was the key. Now I do realize that you have run hp-setup, but I'm trying to look for clues.
No apologies Hangdog, thanks for trying to help !!! I did re-run hp-setup more than once though...
But still, what would be the link between CUPS and saned ? One would expect to be able to run saned and scan from a remote system even without CUPS (printing is another story) What would be the dependencies
Quote:
Originally Posted by Hangdog42
Are you in both groups on both the client and the server?
OK, user djeeke is in both groups on both systems I have no saned on my client system... I do not get a response even if I'm root on the client system...
Do you think I need to run a server deamon on the client ? As ultimately the client systems will be windows clients and I don't now how the windows 'sanetwain' application manages this...
Quote:
Originally Posted by H_TeXMeX_H
Go: http://localhost:631/
click printers, then your printer, and look for a 'serial=' on the connection line.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.