LinuxQuestions.org
Visit Jeremy's Blog.
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-30-2011, 01:32 PM   #1
mccartjd
Member
 
Registered: Apr 2008
Posts: 108

Rep: Reputation: 15
Smile RHEL 5 sudo question


I have created a local group with associated users and the group is called PowerUsers. When I edit my sudoers file (visudo) what should I type in the sudoers file, so users in the PowerUser Group can type [B]sudo PowerUser [/B, be prompted for a password and have the ability execute files in the /sbin/ directory?

A million thanks
Johnny Mac
 
Old 11-30-2011, 02:08 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
You will have to use sudo with -g to specify what group you want to run as. When coming to configuring your sudo config, it would have to be as such:
Code:
PowerUser ALL=(ALL) /sbin/
Note that I don't think that will work as advertised, and you will have to tweak it to your liking's. I highly suggest reading the man page for more information, and better coverage on what means what, and how to do what.

Cheers,

Josh
 
Old 11-30-2011, 02:33 PM   #3
mccartjd
Member
 
Registered: Apr 2008
Posts: 108

Original Poster
Rep: Reputation: 15
Smile Command Line dialogue

After I enter what you said, at the command line to I type

sudo -g PowerUser /sbin/ipconfig -a

I ask becuase that does not seem to work.

Thanks,
Johnny Mac
 
Old 11-30-2011, 02:35 PM   #4
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Well did you edit it to reflect exactly what you need? I only gave you a rough draft.
 
Old 11-30-2011, 02:37 PM   #5
mccartjd
Member
 
Registered: Apr 2008
Posts: 108

Original Poster
Rep: Reputation: 15
Edit sudo file

I did edit it exactly as you mentioned.
 
Old 11-30-2011, 02:39 PM   #6
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
And that's where the problem lays; I gave you a rough draft so you can see briefly how to do it. As I said in my first post, read the man page, and learn how to actually do it, since if I do it for you, you won't really understand what is going on, and why. I am doing this because you should really understand why and how, and not just using someone else's code, and calling it good.
 
Old 12-01-2011, 07:33 AM   #7
mccartjd
Member
 
Registered: Apr 2008
Posts: 108

Original Poster
Rep: Reputation: 15
Smile Investigated resolution

The problem was I did not identify properly the group PowerUser. Running visudo and add under the catagorey ##User Alisas I added User_Alias FULLTIMERS = %PowerUser Under #Host Alias I added Host_Alias CLIENT = yoda (yoda being the client the user will login). Down near the bottom under the catagories MACHINE COMMANDS I entered FULLTIMERS ALL=(ALL) /sbin/, /bin/ . Thus members of the Linux Group PowerUser which is linked to the sudo group FULLTIMERS can run commands found in /sbin and /bin.

Take care,
Johnny Mac
 
Old 12-02-2011, 07:58 PM   #8
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Awesome, glad you got it all figured. Do you fully understand what all is going on?

And since all is taken care of, could you please mark your thread as solved using the thread tools located at the top of the page? Thanks!

Cheers,

Josh
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
SUDO help RHEL 5* aggrishabh Linux - Newbie 6 06-24-2011 02:40 AM
Need Suggestions on Sudo on RHEL 5 coolinux Linux - Newbie 4 10-11-2009 08:33 PM
Sudo upgrade for RHEL to support Ldap ciphyre Red Hat 6 12-08-2008 06:44 PM
LXer: sudo, or not sudo: that is the question LXer Syndicated Linux News 0 02-07-2008 06:40 PM
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 04:20 PM


All times are GMT -5. The time now is 02:06 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration