You are not logged in.

#1 2012-10-19 11:55:47

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

[SOLVED] sudo trouble

Hi,

newly installed sudo isn't working properly:

$ sudo shutdown -r now
[sudo] password for me:                                                                                                                                 
Sorry, user me is not allowed to execute '/sbin/shutdown -r now' as root on mybox.
$                                                         $

Curiously, sudo honors pacman, for instance:

$ sudo pacman -Syu

as specified in visudo:

root ALL=(ALL) ALL
%wheel ALL=(ALL) ALL
%users ALL=NOPASSWD: /usr/bin/pacman
%users ALL=NOPASSWD: /usr/bin/pacman-color
%users ALL=NOPASSWD: /usr/bin/pacdiffviewer

Any ideas?

Last edited by Llama (2012-10-19 13:26:47)

Offline

#2 2012-10-19 12:00:31

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,725
Website

Re: [SOLVED] sudo trouble

Are you in wheel?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2012-10-19 13:15:59

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: [SOLVED] sudo trouble

Thanks, WorMzy!

# gpasswd -a me wheel

is the soluiton.

By the way, the groups part as a step has vanished from the Beginner's Guide, which is supposed to be a step-by-step instruction. Perhaps 'be sure to consult' remark would be better than 'for more information'.

Last edited by Llama (2012-10-19 13:25:37)

Offline

#4 2012-10-19 14:04:16

SS4
Member
From: !Rochford, Essex
Registered: 2010-12-05
Posts: 699

Re: [SOLVED] sudo trouble

Alternatively you can add permissions on a per-user basis. So instead of

%wheel ALL=(ALL) ALL

you can have

me ALL=(ALL) ALL

FYI your visudo setup let's anyone in the users group update pacman, if you ever add more users you'll probably want to change that.


Rauchen verboten

Offline

Board footer

Powered by FluxBB