LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-31-2010, 04:36 PM   #1
jnreddy
Member
 
Registered: May 2008
Location: INDIA
Distribution: RHEL
Posts: 171

Rep: Reputation: 15
Reduce privilages sudo users


Dear Friends & Gurus

i want to create a sudo user, sudo user should not start or stop
the service.

as like a normal user i created a user called root2
and i edited the user with visudo command and added the below line
to the user root2 and got the full privilages.
root2 ALL=(ALL) ALL

i commented the below line
##Cmnd_Alias SERVICES = /sbin/service, /sbin/chkconfig
eventhough the sudo user root2 can start and stop the service
which i dont want to give that privilage.

Can any one guide the where am doing mistake.

Any help is appreciated
Thanks In Advance
JNReddy
 
Old 07-31-2010, 04:43 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
right, well "ALL" means.... "ALL" You're not references the SERVICES value at all, otherwise the line would say "SERVICES" not "ALL". Read the manpage for sudoers to clear things up.

root2?? That's a really dubious choice of name, really really confusing. Remember that there should be no such thing as a "sudo user", you are meant to use NORMAL user accounts, to allow regular users to do some additional admin tasks. It sounds like you're just generally not that comfortable with the sudo framework.
 
Old 07-31-2010, 05:03 PM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Remember, if you want to stop a sudo user from doing something, you must disable all ability for them to start a shell. For example, if you give a sudo user the ability to run vi as root then they can do whatever they want because vi can spawn a shell.

I don't have a lot of experience with this, but from what I've heard auditing this can be a nightmare. Since you're using Red Hat, you might look at using the mandatory access controls of SELINUX to limit what superusers can do.
 
Old 08-01-2010, 11:12 PM   #4
jnreddy
Member
 
Registered: May 2008
Location: INDIA
Distribution: RHEL
Posts: 171

Original Poster
Rep: Reputation: 15
Thank you

Dear acid_kewpie and btmiller

Thanks for your replies

i will try to gather some more info


Thanks
JNreddy.
 
  


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
[SOLVED] Listing sudo users dilipvp Programming 6 05-21-2010 09:50 AM
Configuring SUDO for users, a.k.a. sudoers Micro420 Linux - Newbie 10 04-21-2006 11:12 PM
Sudo password for users, a.k.a. sudoers Micro420 SUSE / openSUSE 2 04-21-2006 09:23 PM
accessing of directory using sudo users abhis_mail2002 Fedora 3 02-22-2006 03:34 AM
how do i grant privilages to 'normal users' jogurt666 Linux - General 1 12-18-2003 01:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:48 AM.

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