Results 1 to 7 of 7
Hello,
I have a binary (generated from a c program) that performs ioctl(...) system call, which requires root or sudo rights. How can this binary be run by a normal ...
- 11-13-2009 #1Just Joined!
- Join Date
- Nov 2009
- Posts
- 6
How to run binary as root or su
Hello,
I have a binary (generated from a c program) that performs ioctl(...) system call, which requires root or sudo rights. How can this binary be run by a normal user without entering su password? Thanks.
George
- 11-13-2009 #2
try this link
Setuid Program Example - The GNU C LibraryMake mine Arch Linux
- 11-14-2009 #3Linux Newbie
- Join Date
- Jul 2004
- Location
- Scotland
- Posts
- 144
- 11-14-2009 #4
- 11-14-2009 #5Linux Newbie
- Join Date
- Jul 2004
- Location
- Scotland
- Posts
- 144
- 11-14-2009 #6
- 11-15-2009 #7Linux Newbie
- Join Date
- Jul 2004
- Location
- Scotland
- Posts
- 144
These daemons I guess you're thinking of are launched during startup while the system is still in single-user mode, and run based on a configuration file which only root should be able to edit. A non-root user could run these programs but in general they would still be run as that users PID.
Generally the best way to do what you're wanting to do is in fact write an abstraction daemon which runs at start-up and provides a mechanism for reporting the result of the call to the program. This still requires root to install the program, unless a non-priviledged user has access to the init scripts (insecure)."If it compiles, sell it."


Reply With Quote

