Inhalt der /etc/sudoers: ---snip--- Cmnd_Alias NET = /sbin/ifconfig br0 up,/sbin/ifconfig br0 down root ALL=(ALL) ALL %wheel ALL=(ALL) ALL foo ALL=NOPASSWD:NET ---snip---Was bei mir erst ein korrektes funktionieren verhindert hatte: foo ist in der Gruppe Wheel, und ich hatte den Eintrag für die Gruppe Wheel am Schluss, damit wurden die Berechtigungen für den NET Cmnd_Alias wieder überschrieben.
So funktioniert es bei mir wunderbar: foo@bar ~ $ alias "boff=sudo /sbin/ifconfig br0 down" foo@bar ~ $ alias "bon=sudo /sbin/ifconfig br0 up" foo@bar ~ $ boff foo@bar ~ $ /sbin/ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:19208 errors:0 dropped:0 overruns:0 frame:0 TX packets:19208 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:8081497 (7.7 Mb) TX bytes:8081497 (7.7 Mb) foo@bar ~ $ bon foo@bar ~ $ /sbin/ifconfig br0 Link encap:Ethernet HWaddr 00:C0:26:28:50:B1 inet addr:192.168.2.32 Bcast:192.168.2.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:173103 errors:0 dropped:0 overruns:0 frame:0 TX packets:124227 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:232794324 (222.0 Mb) TX bytes:11687384 (11.1 Mb) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:19208 errors:0 dropped:0 overruns:0 frame:0 TX packets:19208 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:8081497 (7.7 Mb) TX bytes:8081497 (7.7 Mb) Mit freundlichen Grüßen, Christian Franke
Attachment:
signature.asc
Description: OpenPGP digital signature