You are not logged in.

#1 2009-11-17 02:55:38

Tyriel
Member
From: Melbourne, Australia
Registered: 2009-01-20
Posts: 161
Website

[Solved] Sudo Configuration (NOPASSWD)

I am currently trying to configure sudo to not use a password for specific commands.  I am specifically doing this for netcfgGUI, however I will use more basic independent commands to demonstrate my issue.

If I do the following sudo does not require a password for any commands for any user in group wheel as expected.

%wheel  ALL=(ALL) NOPASSWD: ALL

Now if I change this to affect only a certain command like so:

%wheel ALL=(ALL) NOPASSWD: /bin/ls

or

%wheel ALL=NOPASSWD: /bin/ls

I get the following error:

sudo: sorry, you are not allowed to preserve the environment

Does anyone know what I am doing wrong?

Last edited by Tyriel (2009-11-17 14:52:04)


The software required Windows XP or better, so I installed archlinux.

Offline

#2 2009-11-17 07:29:12

deej
Member
Registered: 2008-02-08
Posts: 395

Re: [Solved] Sudo Configuration (NOPASSWD)

Are you using the 'visudo' command ?

Deej

Offline

#3 2009-11-17 07:32:11

t4k1t
Member
Registered: 2009-07-19
Posts: 123

Re: [Solved] Sudo Configuration (NOPASSWD)

Do you use sudo -E? Or have set an alias like

alias sudo="sudo -E"

?


Who we are is but a stepping stone to what we can become.

Offline

#4 2009-11-17 14:39:57

Tyriel
Member
From: Melbourne, Australia
Registered: 2009-01-20
Posts: 161
Website

Re: [Solved] Sudo Configuration (NOPASSWD)

deej wrote:

Are you using the 'visudo' command ?
Deej

Yes I am using visudo

t4k1t wrote:

Do you use sudo -E? Or have set an alias like

alias sudo="sudo -E"

?

Ahh that was it, I forgot I did not commented out the alias of "sudo -E" in my .bashrc.  Thanks for the help guys smile

Last edited by Tyriel (2009-11-17 14:51:29)


The software required Windows XP or better, so I installed archlinux.

Offline

Board footer

Powered by FluxBB