LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 04-19-2011, 12:51 AM   #1
it_guy
LQ Newbie
 
Registered: Jul 2009
Posts: 25

Rep: Reputation: 1
Linux User Permission


Hi ,
I'd like to configure one power user in Redhat Linux and would like to grant permission to do almost anything without using sudo. My concern is I don't want to give anyone "root" password but want someone to do almost everything like "root" account using this newly created power user account. Kindly guide how to configure.
 
Old 04-19-2011, 01:01 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Can you tell us why you don't like to use sudo? Sudo is just the tool for the job, to control to what a user has access. You could create a user and force the UID to 0, that way that user will have the same 'powers' as root, but that would be just the same as using root. If you could indicate what you have against using sudo and what your needs are then we might be able to point you to a solution.

Kind regards,

Eric
 
Old 04-19-2011, 03:06 AM   #3
rajatmendus
LQ Newbie
 
Registered: Mar 2011
Posts: 19

Rep: Reputation: 6
Ya, EricTRA is right. One way is to use sudo and I think it is the best way.
 
Old 04-19-2011, 09:13 AM   #4
SL00b
Member
 
Registered: Feb 2011
Location: LA, US
Distribution: SLES
Posts: 375

Rep: Reputation: 112Reputation: 112
Sudo can be configured so the power user has to enter his own password, not root's.

It's the right tool for the job, since what you describe is exactly what it was created for.
 
Old 04-20-2011, 09:52 PM   #5
it_guy
LQ Newbie
 
Registered: Jul 2009
Posts: 25

Original Poster
Rep: Reputation: 1
Hi EricTRA,
Thanks for your helpful answer.
My concern is that if I grant something ( commands ) to power user inside the "visudo" file , it will basically affect to the whole system and the power user can execute using sudo anywhere in the system . The customer don't want to this power user get that kind of system wide permission. But the customer want that power user restrict on that particular non system folder inside the system only. Anyway I have granted full access right for that folder for power user. Is that possible ? Thanks.
 
Old 04-21-2011, 04:33 AM   #6
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

Have you looked at some documentation about sudo? What you want to do can be obtained with sudo by configuring it correctly. Here's an example of what you might need to get what you want.

Kind regards,

Eric
 
Old 04-24-2011, 09:02 AM   #7
it_guy
LQ Newbie
 
Registered: Jul 2009
Posts: 25

Original Poster
Rep: Reputation: 1
EricTRA,
Thanks for your reference. I have gone through the document that you have provided. My requirement could be a bit different. The power user need to delete files which belongs to other users inside /DATA folder for the purpose of house keeping. But if I grant this power user
"sudo rm" , he will have access to delete any files inside the whole system. That will be the security breach already.
 
Old 04-24-2011, 09:44 AM   #8
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

You're welcome. You can also limit the commands a user can use to a directory. But maybe ACL is more suited for your needs. Have a look at these two links:
Linux File Security
Know your rights

With the tools explained in those two articles you can define lots of access control lists which will get you far more protection than the standard file permissions. Hope it helps.

Kind regards,

Eric
 
Old 04-25-2011, 09:49 AM   #9
SL00b
Member
 
Registered: Feb 2011
Location: LA, US
Distribution: SLES
Posts: 375

Rep: Reputation: 112Reputation: 112
Yeah, granting root authority to rm is not the way to accomplish this. Here are some alternatives:

1) Use ACLs (as described above).
2) Use sudo, but not as root. Grant the group of power users sudo rights to a service account that has delete rights in the /DATA folder.
3) Create scripts that perform the necessary housekeeping routines, and rather than giving the power users sudo rights to the rm command, give them sudo rights to the scripts that execute rm. This gives you the opportunity to fence them into your pre-determined usage of rm.

And if we're talking about routine housekeeping, then the best solution is to use option 3 and execute from cron.

Last edited by SL00b; 04-25-2011 at 09:50 AM.
 
Old 04-27-2011, 12:17 AM   #10
it_guy
LQ Newbie
 
Registered: Jul 2009
Posts: 25

Original Poster
Rep: Reputation: 1
sudo but not as root ?

Use sudo, but not as root. Grant the group of power users sudo rights to a service account that has delete rights in the /DATA folder.

IT_GUY ( Could you please elaborate more on this? How do I grant sudo but not as root ? And who are the service account ? )
 
Old 05-04-2011, 08:39 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
You could use
Code:
chmod g+s
on the DATA dir and add that user to the group. Possibly even make him the owner of that dir.

Incidentally, the default for sudo is that the user supplies his own passwd, not root passwd. However, as above, this is not really the way to solve your problem.
 
  


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
Set the linux user permission beparas Linux - General 2 02-14-2009 05:33 AM
Enabling printer permission to user in suse linux 10.0 Ismail Shariff Linux - Newbie 1 06-26-2008 02:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

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