LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-03-2008, 01:17 PM   #1
kaiser123
LQ Newbie
 
Registered: Nov 2008
Posts: 2

Rep: Reputation: 0
using sudo


I'm a newbie trying to figure out the best way to use sudo.
I am trying to only allow a group of users to execute one file as root.
I have used visudo to add the following:-
%users ALL=/bin/ktest1
once i have saved and tried to run from a user account i get the following error message
Sorry, user ******** is not allowed to execute '/bin/ktest1' as root on localhost.localdomain.
Does anyone have any ideas where i have gone wrong?

Thanks
 
Old 11-03-2008, 01:38 PM   #2
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
What permissions does /bin/ktest1 have? (ls -l /bin/ktest1)
 
Old 11-03-2008, 01:50 PM   #3
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527
Blog Entries: 1

Rep: Reputation: 35
Did you try
Code:
chmod +x /bin/ktest1
 
Old 11-03-2008, 01:50 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Also, you put your user in the 'users' group, right?

(Note: it's a good idea to include your OS / version when requesting help.)
 
Old 11-04-2008, 03:40 AM   #5
kaiser123
LQ Newbie
 
Registered: Nov 2008
Posts: 2

Original Poster
Rep: Reputation: 0
more info

thanks for the replies,

after checking through your questions i had the permissions wrong, and trying to run the program using ./bin/ktest1 instead of /bin/ktest1

Is there any loopholes that i should be aware of when giving users access to this command i have heard that you can add a no breakout command is this wise? basically how do i ensure that the user cannot use this to gain more privilidges?

i am currently using
fedora
release
Kernel Linux 2.6.25-14.fc9.i686
GNOME 2.22.1

Thanks
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: The Ultimate Sudo FAQ — To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 01:36 AM
cannot "sudo apt-get uptate" or "sudo" anything! plz help mdguy21061 Linux - Newbie 7 04-13-2008 11:59 PM
LXer: sudo, or not sudo: that is the question LXer Syndicated Linux News 0 02-07-2008 05:40 PM
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM
Sudo without having to type "sudo?" Mitch G Linux - Security 3 09-28-2006 02:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:33 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