
Originally Posted by
d58e7
I want to run wondershaper at startup but it requires that I run it as sudo. So how would I go about having the command run at startup?
ie. sudo wondershaper eth1 x x
Go to your terminal and type sudo visudo. A text file will pop out in your terminal, go to the line where's
in ubuntu under 'root ALL=(ALL) ALL' there should be a line like 'user.name ALL=(ALL) ALL' probably looking like this
Code:
root ALL=(ALL) ALL
user.name ALL=(ALL) ALL
anyway under the line 'root ALL=(ALL) ALL' you should write a line that would look like this
Code:
root ALL=(ALL) ALL
user.name ALL=NOPASSWD: /path_to_your_program_bin_file
where user.name it's the name u are using to log in. After editind press F2 and enter to confirm saving. What this will do it's that when you will use sudo no password will be required and this will help you to run that program of yours at startup.
!!! I've modified my post 'cause I have to agree it's not safe to advise anybody to do that. So the proper way to do this would be "user.name ALL=NOPASSWD: /path_to_your_program_bin_file" so only that program could be executed with sudo without the use of a password. Sorry for doing a post that could had endangered your PC especially if you're connected at a local network> I didn't thought much at that moment 'cause I have this bad habit to believe most people have the same Internet connection as I do, the same PC configurations and so on, though I know this it's impossible that's my first impressiom he he
Cheers