how to get root privilage
I'm creating an appilcation in C which requires root privilage.....How can I invoke root privilage amidst the execution..I mean I can ask the user to enter the root passwd, but how I can substitute the user with root using C once I got the passwd.???????????
|
do you want to elevate the privileges while executing or at the begining itself?
if its at the begining of the execution you can check the documentation for sudo, chmod +s , or if you are in a graphical environment check out kdesu or gnomesu |
But I need it while executing
|
Code:
#include <stdio.h> |
And to add on, you should really check user input very carefully before you do something with it as root. Otherwise you wilkl compromise your system's security.
|
All times are GMT -5. The time now is 02:53 PM. |