ifconfig command access for sudo
Hi,
I am trying to implement the sudo on the server. Currently what i did is as follow. Made a group = operation added a user to the group = abcd in the sudo file i have made the following entry abcd, %operation ALL= NOPASSWD: /sbin/, /usr/sbin/, /bin , /usr/bin Now if i login to the server as a abcd user. Then i am using the following command to know the ipaddress of the machine. sudo ifconfig and i get the following out. sudo: ifconfig: command not found Pls let me know how to configure the sudo file so that the abcd user can use the ifconfig command. Thanks Anand |
As root edit the sudoers file, There should be a line in it somewhere that says something like:
root ALL = (ALL) ALL so add your user after this line: abcd ALL = (ALL) ALL You haven't mentioned your distro but on some distros I think you need to run /sbin/ifconfig as opposed to just ifconfig |
Quote:
|
Quote:
It worked man. Thanks for the help. |
Yes, as Matir said, this gives full access. Would suggest reading up on sudoers file. Full access is not always wise as sometimes the hand can be faster than the head and thats when mistakes happen!
|
Thanks ...
Quote:
|
All times are GMT -5. The time now is 07:16 AM. |