Results 1 to 10 of 10

Thread: Dongle only visible from root

  1. #1

    Default Dongle only visible from root

    Hi,

    I have sw product that needs a dongle to work. I have Openususe 13.1 64 bits.
    The dongle drivers are here :
    http://www.aldec.com/en/support/reso.../articles/1245

    I downloaded them, and then I used rpm to install it :
    rpm -ivh WkRt-Lin64-6.0.501-1.x86_64.rpm

    My machine wouldn't let me, I no longer have the error, but it was something to do with permisisons.
    So I installed it as root. No errors.
    The problem is that now, when I check with :
    ./lmutil lmhostid -flexid

    it says that there's no dongle inserted, unless I'm root.
    Clearly the drivers have been installed with permissions for root only.
    How do I change them to normal user ?
    I can see the device being inserted when I type dmesg but that doesn't give me any
    clues. I can also see it when I probe the hardware from YAST but there's nothing
    I can see regarding access permissions.

    Any help appreciated. Thanks.

  2. #2
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,710
    Blog Entries
    1

    Default Re: Dongle only visible from root


    The problem is that now, when I check with :
    ./lmutil lmhostid -flexid

    it says that there's no dongle inserted, unless I'm root.
    Clearly the drivers have been installed with permissions for root only.
    How do I change them to normal user ?
    I can see the device being inserted when I type dmesg but that doesn't give me any
    clues. I can also see it when I probe the hardware from YAST but there's nothing
    I can see regarding access permissions.

    Any help appreciated. Thanks.
    You could make the utility run with SUID/SGID bits set (so that it will execute with root privileges even when run as user) like this
    Code:
    chmod u+s /path/to/lmutil
    but bear in mind that there are potential security issues associated with doing this.

  3. #3
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Dongle only visible from root

    On 2014-05-09 11:26, oznelig wrote:

    > I downloaded them, and then I used rpm to install it :
    > rpm -ivh -WkRt---Lin64---6.0.501-1-.-x86_64.rpm
    >
    > My machine wouldn't let me, I no longer have the error, but it was
    > something to do with permisisons.
    > So I installed it as root. No errors.



    Well, you can not install any rpm without being root.


    A comment: When pasting here computer commands and such, please use a
    CODE BLOCK, so that the forum software doesn't do silly things like
    converting URLS to tiny urls or otherwise hide or alter the commands you
    entered. You get them by clicking on the '#' button in the forum editor.
    See photo


    And... We also like to see everything, from the command prompt with the
    command that you are running and the complete output to the next prompt
    - so that we know exactly what your are doing :-)


    > The problem is that now, when I check with :
    > -./lmutil lmhostid -flexid
    >
    > it says that there's no dongle inserted, unless I'm root.
    > Clearly the drivers have been installed with permissions for root only.
    > How do I change them to normal user ?
    > I can see the device being inserted when I type dmesg but that doesn't
    > give me any
    > clues. I can also see it when I probe the hardware from YAST but there's
    > nothing
    > I can see regarding access permissions.



    Well, you would have to ask the people that made that code. However, it
    is not clear where you are getting the permission problem, because I
    don't know what that "lmutil" is. If it is a code to activate the
    dongle, it is possibly designed to work as root. Maybe it needs that a
    certain device file (in /dev) gets permissions for the user; if it needs
    to, and doesn't, it is usually that the device creation rules are wrong.
    You may change those permissions, but the directory is volatile.

    You could make that app suid, or call it via sudo.

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  4. #4

    Default Re: Dongle only visible from root

    Thanks for your replies.
    First of all, these utilities that work with the dongle are not meant to be run as root
    and, in fact, this is discouraged for security reasons as deano_ferrari mentioned.
    And, by the way, running as root works fine but I'd like to change that for the
    reason given above.
    It's me basically botching up the installation (also because the lack of clear instructions).
    I logged in as root and ran the rpm command.
    One support person for this software suggested that I ran the installation as :
    Code:
    sudo rpm -ivh <package name>
    Would it have been different from typing :
    Code:
    su
    rpm -ivh <package name>
    more importantly, can I just re-run the installation with sudo now that
    it has already been done the other way ?

  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Dongle only visible from root

    On 2014-05-09 15:06, oznelig wrote:

    > One support person for this software suggested that I ran the
    > installation as :
    >
    > Code:
    > --------------------
    > sudo rpm -ivh <package name>
    > --------------------
    >
    >
    > Would it have been different from typing :
    >
    > Code:
    > --------------------
    > su
    > rpm -ivh <package name>
    > --------------------


    Not really.
    But I would use "su -" instead.

    > more importantly, can I just re-run the installation with sudo now that
    > it has already been done the other way ?


    It should not make any difference, but humour him. :-)


    One problem might be that the package is customized for a different
    distro, like Ubuntu perhaps.

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  6. #6

    Default Re: Dongle only visible from root

    For lack of a better solution, I tried deano_ferrari's suggestion of setting the SUID bit :
    Code:
    chmod u+s /path/to/lmutil
    chmod u+s /path/to/lmgrd
    But I ran in the following problem : the lmgrd command starts the licensing server and uses the following parameters :
    Code:
    /path/to/lmgrd -c /path/to/license_file -l /path/to/log_file
    I got the following error :
    Cannot open /path/to/log_file as log file (-1)
    freopen : Bad file descriptor

    Any ideas ? I tried different locations for the log file to no avail. I could possibly run it without the log file option but,
    I guess, if anything goes wrong , there will be no log to read and understand what's going on.
    By the way, if I run lmgrd as root, the error above doesn't happen and the log file is produced.

    Thanks.

  7. #7
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,710
    Blog Entries
    1

    Default Re: Dongle only visible from root

    Quote Originally Posted by oznelig View Post
    For lack of a better solution, I tried deano_ferrari's suggestion of setting the SUID bit :
    Code:
    chmod u+s /path/to/lmutil
    chmod u+s /path/to/lmgrd
    I hope you actually substituted the actual path to the files -the '/path/to/' is just descriptive of course.
    Code:
    whereis lmutil
    Code:
    whereis lmgrd

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Dongle only visible from root

    On 2014-05-11 19:36, deano ferrari wrote:
    >
    > oznelig;2642456 Wrote:
    >> For lack of a better solution, I tried deano_ferrari's suggestion of
    >> setting the SUID bit :
    >>>

    > Code:
    > --------------------
    > > > chmod u+s /path/to/lmutil

    > > chmod u+s /path/to/lmgrd
    > >

    > --------------------
    >>>

    > I hope you actually substituted the actual path to the files -the
    > '/path/to/' is just descriptive of course.



    Ditto for "/path/to/license_file" and "/path/to/log_file"...

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  9. #9

    Default Re: Dongle only visible from root

    Ditto for "/path/to/license_file" and "/path/to/log_file"...
    Yes, otherwise the very same thing would not work as root :-)

  10. #10
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Dongle only visible from root

    On 2014-05-12 00:36, oznelig wrote:
    >
    >> Ditto for "/path/to/license_file" and "/path/to/log_file"...

    >
    > Yes, otherwise the very same thing would not work as root :-)



    Mmm.

    Maybe that program is calling some other program, which is not SUID, so
    it runs as plain user and fails. You have to find out which. Or use sudo
    instead.

    Or find out what exact files or devices it needs accessing as root, and
    change the permissions of those.

    You can try ltrace/strace, or apparmour profiling.


    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

Tags for this Thread

Posting Permissions

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