I am in need of adding root privileges to a bash script which uses sudo; so that whenever we run the script from the terminal; irrespective of the fact that the user is root or not it should not prompt for password. Please help! Doing Run Bash Script as Root did not help.
Tell me more
×
Ask Ubuntu is a question and answer site for
Ubuntu users and developers. It's 100% free, no registration required.
|
|
|||||
|
|
The best solution would be use As a workaround, you can run this:
(start the command with a space so it won't be saved in bash history). Regards. |
|||
|
|
|
Keeping in mind that by doing this you are allowing anyone to run it I believe you need to chmod it by giving it appropriate permission, 0755 should do it. |
|||||
|
