LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   application need root permission to run (https://www.linuxquestions.org/questions/programming-9/application-need-root-permission-to-run-921772/)

sfarazaz 01-03-2012 08:17 AM

application need root permission to run
 
Hi all,
I am new member to this group. how i can give root permissions to an application so that it can run on simple user. i mean like wire shark application to capture the packets.

Snark1994 01-03-2012 08:19 AM

Have you tried using "sudo" ? Try reading http://www.unixtutorial.org/2008/01/sudo-tutorial/ (or any other tutorial) if you haven't :)

Hope this helps,

perfect_circle 01-03-2012 08:32 AM

you can also setuid the executable, but using sudo is cleaner and better. See here if you don't know what I'm talking about.

dwhitney67 01-03-2012 08:32 AM

You could also modify the permissions of the application so that it can be used by a regular user without requiring a password; 'ping' is one such application.

This is how you would do this:
Code:

# chown root:root <app>

# chmod u+s <app>

where <app> is the name of your application. You must be logged in as root (or use sudo) to perform the commands above.


All times are GMT -5. The time now is 11:17 AM.