You are not logged in.

#1 2012-01-12 00:34:59

ianhoolihan
Member
Registered: 2011-08-20
Posts: 85

[SOLVED] Sudo not responding to sudoers

Hi all,

I have edited my sudoers file, but sudo seems not to be responding. All I want is to be able to do the SHUT and PAC commands (see below), without a password. I also don't want to enter a password for each terminal (i.e. tty_tickets).

I made the below changes, and then restarted my computer --- none of the changes appear to have been implemented.

Any ideas?

...

Cmnd_Alias      SHUT = /usr/sbin/pm-sleep, /usr/sbin/pm-hibernate, /usr/sbin/shutdown, \
                        /usr/sbin/reboot, /usr/bin/vlock
Cmnd_Alias      PAC = /usr/bin/pacman

...


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

## Uncomment to allow members of group wheel to execute any command
 %wheel ALL=(ALL) ALL

## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL

## Uncomment to allow members of group sudo to execute any command
# %sudo ALL=(ALL) ALL

## Uncomment to allow any user to run sudo if they know the password
## of the user they are running the command as (root by default).
# Defaults targetpw  # Ask for the password of the target user
# ALL ALL=(ALL) ALL  # WARNING: only use this together with 'Defaults targetpw'

## Read drop-in files from /etc/sudoers.d
## (the '#' here does not indicate a comment)
#includedir /etc/sudoers.d

Defaults timestamp_timeout=60
Defaults !lecture,tty_tickets,!fqdn,insults

#let archimedes do SHUT

archimedes      ALL = (ALL) NOPASSWD: SHUT, NOPASSWD: PAC

Last edited by ianhoolihan (2012-01-12 02:02:51)

Offline

#2 2012-01-12 00:43:45

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [SOLVED] Sudo not responding to sudoers

Change

archimedes      ALL = (ALL) NOPASSWD: SHUT, NOPASSWD: PAC

to

archimedes      ALL=(ALL) NOPASSWD: SHUT, NOPASSWD: PAC

"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2012-01-12 01:08:21

ianhoolihan
Member
Registered: 2011-08-20
Posts: 85

Re: [SOLVED] Sudo not responding to sudoers

Seems to have worked, thanks. To check --- I still have to put sudo, but it just doesn't ask for a password?

Cheers

Offline

#4 2012-01-12 01:44:53

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [SOLVED] Sudo not responding to sudoers

Correct.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB