How 2 run commands having only root privilige in C if one knows the root password?
Suppose I have two accounts: root(obviously the administrator) and user1
Now user1 runs my program(in Qt/C++). This program contains some commands which can be used only by root user.After checking that it is not the root user who has logged in but someone else my program prompts the user to enter the password for root.After taking & verifying that it is the root password, i want that my program should be able to run those commands also.How can i do that?
Thanks in advance
Last edited by shivaligupta; 01-31-2005 at 03:56 AM.