Using a scanner (USB) as user and not as root
Warren Block
wblock at wonkity.com
Thu Apr 29 21:32:36 UTC 2010
On Thu, 29 Apr 2010, Warren Block wrote:
>
> On Wed, 28 Apr 2010, Warren Block wrote:
>
> You can use devd.conf for this:
>
> attach 100 {
> device-name "ugen[0-9].[0-9]";
> match "vendor" "0x04b8";
> match "product" "0x010a";
> action "usb_devaddr=`echo $device-name | sed 's#^ugen##'` && \
> chown root:saned /dev/usb/${usb_devaddr}.* && \
> chmod 0660 /dev/usb/${usb_devaddr}.*
One more problem: there should be a quote at the end of the last line.
attach 100 {
device-name "ugen[0-9].[0-9]";
match "vendor" "0x04b8";
match "product" "0x010a";
action "usb_devaddr=`echo $device-name | sed 's#^ugen##'` && \
chown root:saned /dev/usb/${usb_devaddr}.* && \
chmod 0660 /dev/usb/${usb_devaddr}.*"
(My fault, my script does other stuff after that.)
-Warren Block * Rapid City, South Dakota USA
More information about the freebsd-questions
mailing list