To enable an "ordinary" user to run a program as root, that program must be owned by root and have suid permission set. Login as root and use the "chown" command to change the ownership of the file to root and then use the "chmod" command to set suid permission (chmod +s program-name). Now any user can execute this program and it will run with root as the user id. Now figure out when you want to run the program. The simplest solution to running a program at login would be to add the execution of the program to your login script in /etc/profile or whatever shell profile file you use.
|