LinuxQuestions.org
Help answer threads with 0 replies.
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 08-02-2012, 11:13 AM   #1
Fed
LQ Newbie
 
Registered: Aug 2012
Location: England, UK.
Distribution: Fedora, RHEL.
Posts: 6

Rep: Reputation: Disabled
Configuring ACL on CentOS - mount/fstab


I'm attempting to configure the following things via an ACL on CentOS 6:
  1. Allow UserX to mount any directory without sudo
  2. Allow UserX ability to edit /etc/fstab without sudo

Having never configured an ACL before, I'm not sure where to start. Can anyone offer any assistance?
 
Old 08-04-2012, 09:09 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Fed View Post
Having never configured an ACL before, I'm not sure where to start.
The Linux ACL site (used to be http://www.bestbits.at/acl/ but moved to http://savannah.nongnu.org/projects/acl), local getfacl and setfacl documentation, LQ and 'net setfacl examples like this, this, this (PDF), this, this or this.


Quote:
Originally Posted by Fed View Post
Allow UserX to mount any directory without sudo
It is not always transparent what being (un)able to execute system commands means. If you like figuring things out for yourself I suggest the following manual pages in no particular order:
- 'man capabilities' (search for CAP_SYS_ADMIN) to see why mounting requires root rights (and as such why /sbin/mount is setuid root),
- 'man 5 fstab' for a terse overview of options used in /etc/fstab (fourth field),
- 'man mount', search for the "users" /etc/fstab option (vs "owner").
From that you'd see that Linux ACL's, as in the fourth field "acl" option, doesn't have anything to do with who is (un)able to mount a file system.


Quote:
Originally Posted by Fed View Post
Allow UserX ability to edit /etc/fstab without sudo
Regardless of your system not being connected to any network or not being used by other users than yourself or you "not caring about security anyway", this should not ever be allowed to not override discretionary access control, DAC for short, the separation of privileges Linux uses for good reason.
 
Old 08-06-2012, 02:40 AM   #3
Fed
LQ Newbie
 
Registered: Aug 2012
Location: England, UK.
Distribution: Fedora, RHEL.
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
Regardless of your system not being connected to any network or not being used by other users than yourself or you "not caring about security anyway", this should not ever be allowed to not override discretionary access control, DAC for short, the separation of privileges Linux uses for good reason.
Said user needs the ability to create and mount/umount shares without having root access. I assumed an ACL would be able to configure this but if what you say it correct then obviously it isn't possible. I've been reading about adding UserX to the 'fuse' group and then doing a 'fusermount share'. Though I can't seem to get this working.

Last edited by Fed; 08-06-2012 at 02:41 AM.
 
Old 08-06-2012, 09:20 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
What's wrong with using sudo; it sounds like just the job for this (at least the mounting anyway)?
 
Old 08-07-2012, 03:19 AM   #5
Fed
LQ Newbie
 
Registered: Aug 2012
Location: England, UK.
Distribution: Fedora, RHEL.
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
What's wrong with using sudo; it sounds like just the job for this (at least the mounting anyway)?
It isn't sufficient to my needs because it requires a password when prompted (need the ability to just execute the command without elevating a user's security) and it gives the user power to edit other things which I don't want them to do. It's literally a user where once logged in, they can edit the file systems table and mount/unmount shares without elevating their security.
 
Old 08-07-2012, 05:31 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Fed View Post
Said user needs the ability to create and mount/umount shares without having root access. I assumed an ACL would be able to configure this but if what you say it correct then obviously it isn't possible.
Access Control Lists (ACL) extend Discretionary Access Control (DAC), the basic, static "rwx" access rights. ACL has no concept of and does not modify any processes.


Quote:
Originally Posted by Fed View Post
it requires a password when prompted
I pointed you to reading manual pages in my first reply. So by now you should have found 'man sudoers' (and while reading you may not have found the "NOPASSWD" directive.)


Quote:
Originally Posted by Fed View Post
(need the ability to just execute the command without elevating a user's security)
Saying that suggests you haven't read 'man capabilities' or haven't understood its implications: some actions just require root rights.


Quote:
Originally Posted by Fed View Post
and it gives the user power to edit other things which I don't want them to do.
False. Sudo allows for fine-grained control over which user, group, on which host may execute which commands and you can even deny access to certain switches. As far as I'm aware any non-Ubuntu distro by default wouldn't allow unprivileged users carte blance through /etc/sudoers but give examples of per command or per command group configuration.


Quote:
Originally Posted by Fed View Post
It's literally a user where once logged in, they can edit the file systems table and mount/unmount shares without elevating their security.
If automation on login is a requirement then there are PAM modules to look at, if it needs to be scripted or command line then, as chrism01 already said, Sudo is the safest, most efficient, best configurable option.
 
  


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
CIFS mount - no acl Unclesmiff Linux - Networking 3 03-06-2007 02:11 AM
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
FSTAB: My Win Share Wont Mount @ Boot, but will when I sudo mount -a...please help! TruANTOlogy Ubuntu 8 06-20-2006 08:00 AM
Help me in Configuring Squid ACL tina_gora Linux - Networking 0 05-22-2001 02:31 AM

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

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