I wanted to follow this guide to avoid typing a password every time I want to use "sudo iwconfig" command
http://ubuntuforums.org/showthread.php?t=1132821
I tried the steps with "apt-get" command and it worked
sudo select-editor
sudo visudo
add %admin ALL=(ALL)NOPASSWD:/usr/bin/apt-get to the bottom line
but they didn't work with "iwconfig"
I believe the reason behind that is "iwconfig" source files are not stored in "/usr/bin/" directory because ls /usr/bin/ | less
doesn't show anything named iwconfig
So, what is the directory I should enter before iwconfig?
Thanks in advance
sudo -u root iwconfig
? This should not bring up a password prompt. Additionallysudo -l
should display:(root) NOPASSWD: /sbin/iwconfig
– suqed Feb 02 '14 at 20:22nano ~/.bashrc
and addalias iwconfig="sudo iwconfig"
at the end of the file. – suqed Feb 02 '14 at 20:31source ~/.bashrc
. – suqed Feb 02 '14 at 20:38