LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   sudo does not work (https://www.linuxquestions.org/questions/linux-security-4/sudo-does-not-work-389935/)

powah 12-06-2005 03:47 PM

sudo does not work
 
I want to allow a user to execute some privileged commands.

I setup the sudoer configurations as follows:
First configuration:
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# User privilege specification
root ALL=(ALL) ALL

powah ALL = NOPASSWD: /usr/sbin/tethereal
powah ALL = NOPASSWD: /usr/local/sbin/iwconfig



Second configuration:

# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# User privilege specification
root ALL=(ALL) ALL
powah ALL=(ALL) ALL


Login as powah using the first and then the second configurations, the privileged command can not be executed:
$ /sbin/ifconfig ath0 up
SIOCSIFFLAGS: Permission denied


Login as root, then the privileged command can be executed:
$ su
Password:
# /sbin/ifconfig ath0 up

int0x80 12-06-2005 04:49 PM

Try
Code:

$ sudo /sbin/ifconfig ath0 up


All times are GMT -5. The time now is 12:15 PM.