Sample Header Ad - 728x90

Why sudo isn't acceptable?

0 votes
2 answers
788 views
I need to create a network bridge with 'brctl addbr br-lan' command in a sh script without using sudo. I have a script like; brctl addbr br-lan ifconfig lo up I have tried to set capabilities to my script with sudo ./setcap cap_net_raw,cap_net_admin,cap_dac_override+eip ./myscript.sh But it didn't change anything. To call './myscript.sh' returns the following output; add bridge failed: Operation not permitted SIOCSIFFLAGS: Operation not permitted What should I do to run my script without root rights or which capabilities should I define to my script? Tx.
Asked by SayMyName (125 rep)
Jan 31, 2019, 06:53 PM
Last activity: Feb 1, 2019, 04:05 PM