Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

Delegating mount in this way is best handled through sudo, as ACLs are inappropriate (read: I cannot for the life of me think of a way to do it via ACLs).

If the only file they need to edit is fstab, you'd probably be better off changing the group ownership to a custom group, and giving UserX secondary group membership of that group.

Upshot: IMHO, nothing that can be done without ACLs should be done with them; they complicate life. In this case, both tasks are better done without them.

Edit: try passwordless sudo for the user who needs to mount/unmount. A sudoers entry like

userx    ALL=(root) NOPASSWD: /bin/mount

may well do what you need it to, though you'd better hope that userx doesn't feel like experimenting or messing around!

share|improve this answer
    
Sorry I'm very new to Linux systems administration (I usually just develop on it!). Changing the permissions of the file is a perfect solution for the fstab issue. However doing a sudo requires a user to input the password and this isn't suitable. I need to be able to mount/unmount a share at the command line without a sudo. –  user130810 Aug 7 '12 at 11:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.