Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have been given a tool that uses a closed source library to operate the hardware watchdog timer on my "PC". The library insists on being run as root.

I have tried modifying the sudoers file to allow admin to run the program with NOPASSWORD set and I tried this also with a new group. I also tried making the permission of the file rwsw-x--. None of these worked or I just did them wrong. So,

How can I mark a program to allow a simple user (i.e. my userid) to run with root privileges? TNX.

share|improve this question
2  
What about sudo proram_name? That's the way programs are run as root in Ubuntu. –  mikewhatever Aug 29 '12 at 13:19
    
Well, without some machinations, sudo requires a password which I don't want to have to supply or use. It an embedded system and the app tickles a watchdog. Shouldn't have to be root but some dimkwit decided to do it that way. –  Wes Miller Sep 4 '12 at 13:14
add comment

1 Answer

up vote 1 down vote accepted

You can use the setuid command to make it so anyone running the binary is root. Keep in mind this is a massive security hole, if the binary is compromised then they have root access to your PC.

For the most part setuid is evil. Does sudo /path/to/bin really not work?

share|improve this answer
    
Sorry for the long delay in replying. Yes, sudo path-ro-bin does work. I just didn't catch the required-ness of "sudo". Thanks for your help! –  Wes Miller Sep 4 '12 at 13:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.