Still not working: sudoers file has no effect

Hi guys,
I've recently added the following lines via visudo to the sudoers file when installing yaourt:
schorsch ALL=NOPASSWD: /usr/bin/pacman
schorsch ALL=NOPASSWD: /usr/bin/pacdiffviewer
However I'm still asked a password when using pacman and yaourt. Even when I manually type "sudo pacman -Ss foo" I have to enter my password. What's wrong?
Here's my complete sudoers file:
# sudoers file.
# This file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors
# that prevent sudo from running.
# See the sudoers man page for the details on how to write a sudoers file.
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
# Runas alias specification
# User privilege specification
root ALL=(ALL) ALL
schorsch ALL=NOPASSWD: /usr/bin/pacman
schorsch ALL=NOPASSWD: /usr/bin/pacdiffviewer
# Uncomment to allow people in group wheel to run all commands
%wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
TIA,
Blackhole
Last edited by blackhole (2009-03-11 07:37:08)

First, please stay with your config and then try to run pacdiffviewer with sudo, I'm quite sure, that it doesn't ask for a password. If so, I understood it right
Mine:
# sudoers file.
# This file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors
# that prevent sudo from running.
# See the sudoers man page for the details on how to write a sudoers file.
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
Defaults !lecture,tty_tickets,!fqdn,insults
# Runas alias specification
# User privilege specification
root ALL=(ALL) ALL
army ALL=(ALL) ALL
army ALL=NOPASSWD: /sbin/reboot
army ALL=NOPASSWD: /sbin/halt
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
I guess you FIRST have to give yourself the right to use sudo and THEN allow yourself the useage of sudo without a password for specific commands.
Last edited by Army (2009-03-11 09:33:39)

Similar Messages

Maybe you are looking for