Results 1 to 7 of 7

Thread: Permanent user access to a device?

  1. #1
    Join Date
    Jul 2010
    Beans
    28

    Permanent user access to a device?

    Hi,
    I managed to make an old parallel port scanner work in ubuntu 11.04 with SANE.
    Everything's perfect but one thing: scanner applications work only if they are executed as a root.
    After further researching, I've found the cause is that only the root has read and write permissions on the device /dev/parport0 which is my parallel port.

    If I set the right permissions giving sudo chmod a+rw /dev/parport0 I solve my problem, but just untill next reboot... the system resets root only permissions at each restart.

    I would like to make that change permanent... what can I do?
    Somewhere I read that I must put myself into the group which has access to the device...but I'm quite a newbie and I don't understand what I have to do.

  2. #2
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    group membership

    Quote Originally Posted by Marco.75 View Post
    ...I've found the cause is that only the root has read and write permissions on the device /dev/parport0 which is my parallel port.
    What group does /dev/parport0 belong to?
    Try adding your account to that group, logout and then log in again.

  3. #3
    Join Date
    Jul 2010
    Beans
    28

    Re: Permanent user access to a device?

    I don't know... as I said I'm quite new to linux. How can I find what group does /dev/parport0 belong to?

  4. #4
    Join Date
    Oct 2005
    Location
    Wabasha MN
    Beans
    2,571
    Distro
    Ubuntu

    Re: Permanent user access to a device?

    Go to Users Settings unders System. Select "Manage Groups", Find the the right group in the list of groups, select "Properties" and see if the only user is "root", if it is than you need to add yourself to the list. you may need to do this with "root" access.
    Screenshot.jpg
    Information on my Main laptop. Information on my small laptop Dell 11 3000
    Using a Asus 3632QM laptop with 8gig RAM, 250 SSD.
    Machine Registered 366271, 366273, 366275.
    Registered Ubuntu user number 18630. Registered Linux user number 458093.

  5. #5
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Permanent user access to a device?

    Quote Originally Posted by Marco.75 View Post
    How can I find what group does /dev/parport0 belong to?
    Code:
    ls -la /dev/parport0
    
    groups marco

  6. #6
    Join Date
    Oct 2005
    Location
    Wabasha MN
    Beans
    2,571
    Distro
    Ubuntu

    Re: Permanent user access to a device?

    You need to use the useradd command to add new users to existing group (or create a new group and then add user). If group does not exist, create it. The syntax is as follows:

    Code:
    sudo useradd -G {group-name} username
    Information on my Main laptop. Information on my small laptop Dell 11 3000
    Using a Asus 3632QM laptop with 8gig RAM, 250 SSD.
    Machine Registered 366271, 366273, 366275.
    Registered Ubuntu user number 18630. Registered Linux user number 458093.

  7. #7
    Join Date
    Jul 2010
    Beans
    28

    Re: Permanent user access to a device?

    Problem solved!
    I used the ls -l command, and discovered that the device parport0 belongs to the group named lp.
    Then used the GUI approach to add myself to that group...
    Many thanks for your help!

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
  •