LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-08-2009, 06:04 AM   #1
mike11
Member
 
Registered: Apr 2009
Posts: 222

Rep: Reputation: 17
Debian Lenny: sudo seems to ignore changes to sudoers


Hi All,

I (a normal user, not root) wrote a shell script but want to grant another user (guest) permission to run it.

As a su, I've edited the /etc/sudoers file and added at its bottom:
guest ALL= (xxx) NOPASSWD: /home/xxx/script_name

where xxx is my login name.

I edited sudoers with visudo, where the environment variable EDITOR=pico.

Doing:
/etc/init.d/sudo restart
sudo -l

shows:
User root may run the following commands on this host:
(ALL) ALL

so nothing is updated. I also confirmed this: I login as guest and try to run the script as
sudo -u xxx ./script_name
but the system requests a password.

Any suggestions will be appreciated.

Cheers,
Mike.
 
Old 06-08-2009, 08:12 AM   #2
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Two things:
It looks like you are running "sudo -l" as root and you need to run it as guest
Quote:
-l[l] [command]
If no command is specified, the -l (list) option will list the allowed (and forbidden) commands for the invoking user (or the user specified by the -U option) on the current host.
and try using the full path to the script in the sudo -u command
Code:
sudo -u xxx /home/xxx/script_name

Last edited by norobro; 06-08-2009 at 08:18 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sudo(/etc/sudoers) issue knockout_artist Linux - Newbie 2 03-24-2009 04:39 PM
Help with sudo and sudoers zeeple Linux - Newbie 2 12-06-2008 11:51 AM
Preventing Sudoers from doing sudo su DejaCpp Linux - Security 4 12-22-2007 04:47 AM
sudo not working, sudoers edited DIGITAL39 Linux - Newbie 2 12-18-2006 06:59 AM
sudo and sudoers syntax mikemrh9 Linux - Security 7 06-04-2005 07:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration