Results 1 to 10 of 10

Thread: how to grant full USB privileges to a user?

  1. #1
    Join Date
    May 2005
    Beans
    110

    how to grant full USB privileges to a user?

    How do I grant full privileges to a user to do whatever they want to do to USB devices? For example, I have software ( https://github.com/bcrowell/freelab ) that needs to claim a USB interface, and I get this error:

    Code:
    /usr/lib/ruby/1.8/usb.rb:401:in `usb_claim_interface': Operation not permitted - usb_claim_interface (Errno::EPERM) from /usr/lib/ruby/1.8/usb.rb:401:in `claim_interface' from ./vernier.rb:246:in `initialize' from -e:1:in `new' from -e:1
    Can I do this by editing /etc/group? By doing something with udev? This post http://ubuntuforums.org/showthread.php?t=1851620 describes a failed attempt to do it with udev; I don't know anything about udev, and just based that attempt on what I found by googling.

    This is on lucid.

    Thanks in advance!

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Beans
    435
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: how to grant full USB privileges to a user?

    i'd do this in the fstab if it prooved to every be a problem for me, but I've never had a problem with usb permissions before...

    just add a line with no auto and user priv so user can mount and it wont auto mount at boot (cause it wont be there)...
    My personal website with blog n apps
    http://www.mikejonesey.co.uk/

  3. #3
    Join Date
    May 2005
    Beans
    110

    Re: how to grant full USB privileges to a user?

    Thanks for the reply -- but it isn't a device with a filesystem on it. It's an interface to a sensor.

  4. #4
    Join Date
    Sep 2009
    Location
    UK
    Beans
    435
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: how to grant full USB privileges to a user?

    blowing all security out the window...

    edit the /etc/sudoers file to enable user to run your prog or whaterver uses the interface without a password, you can then setup an alias to call the sudo so the commands run the same...

    ps... obviously make the binary read and execute only to regular users for some security...
    Last edited by mikejonesey; October 6th, 2011 at 01:04 AM.
    My personal website with blog n apps
    http://www.mikejonesey.co.uk/

  5. #5
    Join Date
    Sep 2007
    Location
    Oklahoma, USA
    Beans
    2,313
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: how to grant full USB privileges to a user?

    Try adding the user to the "plugdev" group, which is GID 46 on my Lucid system. You can do this by using the GUI's user administration tools (I use Xubuntu which has a different GUI than plain Ubuntu) or by editing the /etc/group file with sudo privilege as you prefer...
    --
    Jim Kyle in Oklahoma, USA
    Linux Counter #259718
    Howto mark thread: https://wiki.ubuntu.com/UnansweredPo.../SolvedThreads

  6. #6
    Join Date
    Sep 2009
    Location
    UK
    Beans
    435
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: how to grant full USB privileges to a user?

    for JKyleOKC's suggestion;

    Code:
    sudo usermod -a -G plugdev USERNAME
    My personal website with blog n apps
    http://www.mikejonesey.co.uk/

  7. #7
    Join Date
    May 2005
    Beans
    110

    Re: how to grant full USB privileges to a user?

    Aha! Thanks, folks, I'll try that.

  8. #8
    Join Date
    May 2005
    Beans
    110

    Re: how to grant full USB privileges to a user?

    Thanks, all, for the help!

    Adding the user to the plugdev group did not turn out to help. The solution using the sudoers file did work. I would prefer not to have to do it that way, for security reasons, but if that's the way it is, at least it works

  9. #9
    Join Date
    Jun 2006
    Location
    San Jose, CA
    Beans
    83
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: how to grant full USB privileges to a user?

    I was reading this thread http://ubuntuforums.org/showthread.php?t=880550

    and someone did say they had to have write permissions on the particular device in /dev/bus/usb to be able to claim it.

  10. #10
    Join Date
    May 2005
    Beans
    110

    Re: how to grant full USB privileges to a user?

    Thanks, wt8008, changing write permissions could be a much better solution.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •