Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

THe below output from my terminal probably should make sense to those able to help:

[root@Plugbox ~]# cd /dev/bus/usb
[root@Plugbox usb]# ls
[root@Plugbox usb]# cd 001
[root@Plugbox 001]# ls -l
total 0
crw-rw-r-- 1 root root    189, 0 Mar 17 16:11 001
crw-rw-r-- 1 root scanner 189, 1 Mar 17 16:11 002
(at this point I can not print)
[root@Plugbox 001]# chown root:lp 001
[root@Plugbox 001]# chown root:lp 002
[root@Plugbox 001]# ls -l
total 0
crw-rw-r-- 1 root lp 189, 0 Mar 17 16:11 001
crw-rw-r-- 1 root lp 189, 1 Mar 17 16:11 002
(now the printing starts)

The system is a plug computer running Plugbox linux ( When it uses CUPS for printing and Samba to share this with my windows network.

I'm sure the details are irrelevent, but my problem is that I require the printer to belong to the lp group when it is connected. How do I go about doing this?

I assume I use the permissions files in rules.d but I am unsure of the syntax.


share|improve this question

migrated from Mar 20 '11 at 10:50

This question came from our site for professional and enthusiast programmers.

I have not tested it, but I believe that this should work:

SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="07", ATTR{bInterfaceSubClass}=="01", GROUP="lp", MODE="660"

You have to place this line in a file under /etc/udev/rules.d/. Keep in mind that the files in that directory are parsed in alphabetic order. If there are other rules that match, you may have to choose an appropriate name for that file, so that it is parsed last.

share|improve this answer
Thanks, ill give it a try. I did try it already using idVendor and idProduct for the particular device but it had no effect. I made it the last executes rule file in the directory. The problem with your version is that if it does work, all USB devices will belong to the group lp. I only want it to be true for the printer. – Hamid Mar 20 '11 at 10:59
@Hamid: not all devices - just all printers. The interface class and subclass constraints make sure of that. – thkala Mar 20 '11 at 11:51
I tried this at number 40. It seemed to make no difference. DO I possibly need to make the number higher to ensure the bus is initialized properly and the printer detected by the time it is run. At present, the printer belongs to root:root and the scanner is root:scanner (it's a multifunctional). – Hamid Mar 20 '11 at 20:25
@Hamid: why don't you have a look at the libsane rule file under rules.d? The logic for the printer shouldn't be all that different than then one for the scanner. – thkala Mar 20 '11 at 21:37
Thanks, I'll take a look as you suggested when I get home. – Hamid Mar 21 '11 at 10:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.