3

I got syntax error when i add this rules to sudoers :

ifdown eth0:1
ifup eth0:1

I also try with :

ifdown eth0\:1
ifup eth0\:1

And:

ifdown "eth0:1"
ifup "eth0:1"

How to allow a non root user to start and stop the eth0:1 interface ?

GAD3R
  • 66,769
Med
  • 125

1 Answers1

1

Create a new file in /etc/sudoers.d with visudo -f /etc/suoders.d/mysudo and replace username with your username
username ALL=(ALL) NOPASSWD:/sbin/ifdown eth0\:1,/sbin/ifup eth0\:1

GAD3R
  • 66,769
Sagar
  • 438