give root permission to a program?

Discussion in 'all things UNIX' started by lurningcerv, May 25, 2014.

Thread Status:
Not open for further replies.
  1. lurningcerv

    lurningcerv Registered Member

    Joined:
    Dec 27, 2011
    Posts:
    87
    I have a program i want to use. I installed it as the administrator, and I'm able to run it while logged in as administrator. When I run it, it wants the administrators password, which happens to currently be the same as the root password. I tried to give the standard user permission to use it, and now it looks like this program is a .py file (Python script?) and it wants root privileges.

    Should I be allowing this program to run as root? Seems risky to me.
     
  2. WSFuser

    WSFuser Registered Member

    Joined:
    Oct 7, 2004
    Posts:
    10,632
    What does the program do? Do you have a link to the script?
     
  3. tlu

    tlu Guest

    o_O

    I must admit that I have no clue what you're talking about. Are you talking about Windows or Linux? And what's your "administrator" and how is it different from root?
     
  4. lurningcerv

    lurningcerv Registered Member

    Joined:
    Dec 27, 2011
    Posts:
    87
    This is in Linux. I don't know what the .py file does. I think that's a Python script, and I am not familiar with Python. It's a purportedly a proprietary VPN client based on OpenVPN.

    This issue has been a recurring problem for me in trying to migrate to Linux. I have set up an admin user and a standard user. I don't want the standard user to be installing software. But of course the standard user has to use software, and when software is installed by the admin user, the standard user usually can't run it.

    In this case, I tried to give permission to the standard user to run the program by an entry in the sudoers file, but it did not work.
     
  5. WSFuser

    WSFuser Registered Member

    Joined:
    Oct 7, 2004
    Posts:
    10,632
    Where did you place the script and what permissions does the file have?

    Also post what you tried adding to the sudoers file.
     
  6. lurningcerv

    lurningcerv Registered Member

    Joined:
    Dec 27, 2011
    Posts:
    87
    The .py file is in the /usr/share folder. I believe the sudoer command used (which did not work) was username ALL=NOPASSWD: /user/share/filename.py, but I'll have to see if I can find out for sure.
    In any case, I am having to reevaluate the whole concept of using some proprietary front-end to openvpn, because I read somewhere that Openvpn runs as root as default. This seems to me to be a serious security problem. Maybe it's appropriate for someone connecting to a corporate server from a corporate laptop, but for someone connecting to a public VPN service from a "personal" laptop, it does not make sense to me from my very limited knowledge of Linux.
    But, I'd still like to know how to run programs in Linux as standard user that are installed by the admin user.
     
  7. WSFuser

    WSFuser Registered Member

    Joined:
    Oct 7, 2004
    Posts:
    10,632
    Why is it installed in /usr/share/? Usually programs are in /usr/bin/ or sometimes /opt/programname/.

    As for running programs as standard user, you just need to make sure that the user has proper permissions to access the path where the program is located as well as permissions for the program itself too.
     
    Last edited: May 30, 2014
  8. lurningcerv

    lurningcerv Registered Member

    Joined:
    Dec 27, 2011
    Posts:
    87
    I don't know why it installed to /usr/share/. It seemed a bit strange to me too.
     
Loading...
Thread Status:
Not open for further replies.